Conversation
Having one settings.gradle in each subfolder is not needed. Also rewriting the rootProject name is not recommended.
Moving build script task creation to configuration or execution will improve performance and caching findByName is an older method replaced by named() which also does not trigger task creation during configuration.
Why: Dependencies were using the older configuration names 'compile' and 'testCompile' which are deprecated. Replacing them with 'implementaiton' caused a lot of compilation errors which made it required to refactor all dependencies. How: Adding dependency-analysis plugin and using the suggested changes in dependencies. This also included adding of all transitive dependencies as direct dependencies wherever code usage existed. Common dependencies were added as they were used in several sub projects. To keep them in sync, a version variable was added according to previous standard.
Also fix 2 deprecation warnings: Update reports according to api, replacing enabled with required Adding explicit task dependency when using generated sources as input. Third deprecation warning is due to usage inside the io.spring.dependency-management plugin and cannot be fixed until plugin is updated.
efe077b to
316c381
Compare
| distributionBase=GRADLE_USER_HOME | ||
| distributionPath=wrapper/dists | ||
| distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip | ||
| distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
| @@ -1 +0,0 @@ | |||
| rootProject.name = 'acceptance-test' | |||
There was a problem hiding this comment.
I was not sure about that change, but the code seemed strange. I removed all of the settings.gradle files since there was already one in the root, and the overall speed of the project made it redundant to have every sub project on it's own. Perhaps it is wrong. We'll see.
There was a problem hiding this comment.
i agree that it should be removed unless these projects can be buillt independently of the root project.
| @@ -1,3 +1,7 @@ | |||
| plugins { | |||
There was a problem hiding this comment.
did you mean to intentionally keep this plugin here?
There was a problem hiding this comment.
Yes I did, I thought it was a good idea to keep the project clean for other maintainers.
Perhaps I should have added a small readme about it?
There was a problem hiding this comment.
Or I could remove it again
There was a problem hiding this comment.
there are a large number of changes in this PR and it makes it hard to review. i would move this to a separate PR.
| source(generateAvro) | ||
| } | ||
|
|
||
| tasks.named("checkstyleMain").configure { |
There was a problem hiding this comment.
is this a new task? or was this moved from somewhere else?
There was a problem hiding this comment.
new configuration of the task (added from root project) to fix deprecation warning
(warning: no dependency from checkstyleMain towards compileTestJava)
Separated into 5 commits:
Preparation is made in first 3 commits, minor cleanup plus improving performance by delaying/avoiding task creation.
Main upgrade work is done in last 2 commits. Dependency changes were major but required, and builds still runs fine.