Skip to content

Commit e90dcb4

Browse files
authored
Update to Gradle 9.2.1 (#978)
* Update GitHub workflow to use JDK21 * Update gradle-license-plugin * Update to Gradle 9.2.1 * Specify JVM vendor for the build toolchains * Gitignore `:morpheus-testing` test directory * Lazy fetch the runApp mainClass property
1 parent 03cbe66 commit e90dcb4

File tree

59 files changed

+247
-224
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+247
-224
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
uses: actions/setup-java@v4
2121
with:
2222
distribution: temurin
23-
java-version: 17
23+
java-version: 21
2424

2525
- name: 'Cache Gradle packages'
2626
uses: actions/cache@v4

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,7 @@ gradle-app.setting
2727

2828
# Demo data sets
2929
yelp_json
30-
yelp_graph
30+
yelp_graph
31+
32+
# For some reason this directory is created when running the tests
33+
/morpheus-testing/target/

build.gradle

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@ allprojects {
2121
mavenCentral()
2222
mavenLocal()
2323
}
24+
25+
java {
26+
toolchain {
27+
languageVersion = JavaLanguageVersion.of(21)
28+
vendor = JvmVendorSpec.ADOPTIUM // Gradle constant for Temurin
29+
}
30+
}
2431
}
2532

2633
apply from: 'build.licenses.gradle'
@@ -138,7 +145,7 @@ subprojects {
138145
description = 'Run a custom Scala app (use -PmainClass=com.my.package.App)'
139146

140147
classpath = sourceSets.main.runtimeClasspath
141-
mainClass = project.getProperty("mainClass")
148+
mainClass = project.provider { project.findProperty('mainClass') }
142149
}
143150

144151
tasks.named('runApp').configure {

build.licenses.gradle

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
// Define a resolvable configuration for license reporting
2+
configurations {
3+
licenseReportRuntimeClasspath {
4+
extendsFrom configurations.runtimeClasspath
5+
canBeResolved = true
6+
canBeConsumed = false
7+
description = 'Resolvable configuration for license reporting.'
8+
}
9+
}
10+
111
// All licenses that we accept, and their aliases
212
def allowList = [
313
[name: 'BSD-2-Clause', url: 'http://opensource.org/licenses/BSD-2-Clause', aliases: [
@@ -69,12 +79,21 @@ subprojects { proj ->
6979

7080
// Dependency license reporting
7181
downloadLicenses {
72-
dependencyConfiguration = 'runtimeClasspath'
82+
dependencyConfiguration = 'licenseReportRuntimeClasspath'
7383
aliases = allowList.collectEntries { lic ->
7484
def actual = license(lic.name, lic.url)
7585
def alternatives = lic.aliases.collect { it.url ? license(it.name, it.url) : it.name }
7686
[(actual): alternatives]
7787
}
88+
89+
report {
90+
json.enabled = true
91+
json.destination = file("build/reports/license")
92+
xml.enabled = false
93+
xml.destination = file("build/reports/license")
94+
html.enabled = false
95+
html.destination = file("build/reports/license")
96+
}
7897
}
7998

8099
tasks.downloadLicenses.ext.licenseToDependencyJson = { ->

dependencies/plugins/repository/com/github/hierynomus/license-base/com.github.hierynomus.license-base.gradle.plugin/0.16.2-37dde1f/com.github.hierynomus.license-base.gradle.plugin-0.16.2-37dde1f.pom

Lines changed: 0 additions & 15 deletions
This file was deleted.

dependencies/plugins/repository/com/github/hierynomus/license-base/com.github.hierynomus.license-base.gradle.plugin/0.16.2-37dde1f/com.github.hierynomus.license-base.gradle.plugin-0.16.2-37dde1f.pom.md5

Lines changed: 0 additions & 1 deletion
This file was deleted.

dependencies/plugins/repository/com/github/hierynomus/license-base/com.github.hierynomus.license-base.gradle.plugin/0.16.2-37dde1f/com.github.hierynomus.license-base.gradle.plugin-0.16.2-37dde1f.pom.sha1

Lines changed: 0 additions & 1 deletion
This file was deleted.

dependencies/plugins/repository/com/github/hierynomus/license-base/com.github.hierynomus.license-base.gradle.plugin/0.16.2-37dde1f/com.github.hierynomus.license-base.gradle.plugin-0.16.2-37dde1f.pom.sha256

Lines changed: 0 additions & 1 deletion
This file was deleted.

dependencies/plugins/repository/com/github/hierynomus/license-base/com.github.hierynomus.license-base.gradle.plugin/0.16.2-37dde1f/com.github.hierynomus.license-base.gradle.plugin-0.16.2-37dde1f.pom.sha512

Lines changed: 0 additions & 1 deletion
This file was deleted.

dependencies/plugins/repository/com/github/hierynomus/license-base/com.github.hierynomus.license-base.gradle.plugin/maven-metadata.xml

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)