-
Notifications
You must be signed in to change notification settings - Fork 202
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
build: avoid the use of deprecated Gradle constructs #1934
Conversation
The `buildDir` property has been deprecated in Gradle 8.3 in favor of `layout.buildDirectory` [1][2], so use that instead. [1]: https://docs.gradle.org/8.3/release-notes.html [2]: gradle/gradle#20210 Signed-off-by: Sebastian Schuberth <sebastian@doubleopen.org>
This avoids the use of several deprecated Gradle APIs, see [1]. [1]: https://github.com/johnrengelman/shadow/releases/tag/8.1.1 Signed-off-by: Sebastian Schuberth <sebastian@doubleopen.org>
Gradle 8.5 [1] started to nag about deprecated BasePluginExtension members, so stop using them. [1]: https://docs.gradle.org/8.5/release-notes.html Signed-off-by: Sebastian Schuberth <sebastian@doubleopen.org>
@@ -32,7 +32,7 @@ sonarqube { | |||
property "sonar.dependencyCheck.reportPath", "build/reports/owasp-dependency-check/dependency-check-report.xml" | |||
property "sonar.dependencyCheck.htmlReportPath", "build/reports/owasp-dependency-check/dependency-check-report.html" | |||
property "sonar.exclusions", "**/build/generated-sources/**" | |||
property "sonar.coverage.jacoco.xmlReportPaths", "${rootProject.layout.buildDirectory}/reports/jacoco/jacocoAggregatedReport/jacocoAggregatedReport.xml" | |||
property "sonar.coverage.jacoco.xmlReportPaths", "${rootProject.layout.buildDirectory.get().asFile}/reports/jacoco/jacocoAggregatedReport/jacocoAggregatedReport.xml" |
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.
Shouldn't this then also rather be
rootProject.layout.buildDirectory.dir('reports/jacoco/jacocoAggregatedReport/jacocoAggregatedReport.xml').get().asFile
to avoid string interpolation where not needed? Similar in more places below.
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.
I agree, that it could be more consistent and we should set code style rules for gradle scripts. But that would be bigger change and I wouldn't wan't to incorporate it into this PR.
@@ -21,7 +21,7 @@ jar { | |||
|
|||
tasks.register('copyGpg', Copy) { | |||
from 'src/test/gpg' | |||
into "${layout.buildDirectory}/gpg" | |||
into layout.buildDirectory.dir("gpg") |
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.
Nit: Now that no string interpolation is needed anymore, the string should use single-quotes instead of double-quotes. Similar in more places below.
|
No description provided.