-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update to Gradle 7 #4171
Update to Gradle 7 #4171
Conversation
core/build.gradle
Outdated
for (dependency in rootNode.dependencies.children()) { | ||
def coordinates = "${dependency.groupId.text()}:${dependency.artifactId.text()}".toString() | ||
if (!dependencies.contains(coordinates) && !whitelist.contains(coordinates)) { | ||
throw new IllegalStateException("New dependency! ${coordinates}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we make this exception message more helpful for contributors?
e.g.
throw new IllegalStateException("New dependency! ${coordinates}") | |
throw new IllegalStateException("A new dependency has been added ${coordinates} - if this was intentional please add it to the whitelist in PATH_TO_GRADLE_FILE") |
What do we expect the process to be - do we need to be approving new dependencies somehow?
BTW I think it would be good to move this to a separate .gradle
file, so that areas of major scripting are encapsulated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the suggestion! We could, yes 👍
FYI this message is mostly for us, maintainers, as the chance of an external dependency added by external contributors is super low
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extracted and made the message more user friendly 👍
@@ -1,16 +1,16 @@ | |||
description = "Testcontainers :: Selenium" | |||
|
|||
dependencies { | |||
compile project(':testcontainers') | |||
api project(':testcontainers') | |||
|
|||
provided 'org.seleniumhq.selenium:selenium-remote-driver:3.141.59' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW I've verified that the resulting POM files are effectively the same, using the approach described here, so I'm happy with this.
# Conflicts: # modules/database-commons/build.gradle # modules/dynalite/build.gradle # modules/elasticsearch/build.gradle # modules/jdbc/build.gradle # modules/junit-jupiter/build.gradle # modules/kafka/build.gradle # modules/localstack/build.gradle # modules/nginx/build.gradle # modules/vault/build.gradle
for (dependency in rootNode.dependencies.children()) { | ||
def coordinates = "${dependency.groupId.text()}:${dependency.artifactId.text()}".toString() | ||
if (!dependencies.contains(coordinates) && !ignore.contains(coordinates)) { | ||
throw new IllegalStateException("A new dependency '${coordinates}' has been added to 'org.testcontainers:${artifactId}' - if this was intentional please add it to the ignore list in ${project.buildFile}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ignore list
👏
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks Awesome To Me 😄
No description provided.