Skip to content
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

Merged
merged 5 commits into from
Jan 18, 2024
Merged

Conversation

mloitm
Copy link
Contributor

@mloitm mloitm commented Jan 17, 2024

No description provided.

sschuberth and others added 4 commits January 17, 2024 16:01
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"
Copy link
Contributor

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.

Copy link
Contributor Author

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")
Copy link
Contributor

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.

Copy link

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@mloitm mloitm merged commit 0f04331 into develop Jan 18, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants