Skip to content

Commit 02f7cb8

Browse files
committed
update to Gradle 9.2.0; always use Java 25 toolchain to generate javadoc
Notes: - Gradle 9+ requires Java 17 to run - using Java 21 on GitHub Actions - not using Java 25 because Kotlin does not yet support it and output some warnings
1 parent 10677d4 commit 02f7cb8

File tree

13 files changed

+36
-27
lines changed

13 files changed

+36
-27
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ jobs:
2727

2828
- uses: gradle/actions/wrapper-validation@v4
2929

30-
- name: Setup Java 11
30+
- name: Setup Java 21
3131
uses: actions/setup-java@v4
3232
with:
33-
java-version: 11
33+
java-version: 21
3434
distribution: temurin # pre-installed on ubuntu-latest
3535
cache: gradle
3636

@@ -95,10 +95,10 @@ jobs:
9595
steps:
9696
- uses: actions/checkout@v4
9797

98-
- name: Setup Java 11
98+
- name: Setup Java 21
9999
uses: actions/setup-java@v4
100100
with:
101-
java-version: 11
101+
java-version: 21
102102
distribution: temurin # pre-installed on ubuntu-latest
103103
cache: gradle
104104

.github/workflows/error-prone.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ jobs:
2626
steps:
2727
- uses: actions/checkout@v4
2828

29-
- name: Setup Java 11
29+
- name: Setup Java 21
3030
uses: actions/setup-java@v4
3131
with:
32-
java-version: 11
32+
java-version: 21
3333
distribution: temurin # pre-installed on ubuntu-latest
3434
cache: gradle
3535

.github/workflows/fonts.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ jobs:
3434
steps:
3535
- uses: actions/checkout@v4
3636

37-
- name: Setup Java 11
37+
- name: Setup Java 21
3838
uses: actions/setup-java@v4
3939
with:
40-
java-version: 11
40+
java-version: 21
4141
distribution: temurin # pre-installed on ubuntu-latest
4242
cache: gradle
4343

.github/workflows/natives.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@ jobs:
5858
# if: matrix.os == 'ubuntu-latest'
5959
# run: sudo apt-get install g++-aarch64-linux-gnu
6060

61-
- name: Setup Java 11
61+
- name: Setup Java 21
6262
uses: actions/setup-java@v4
6363
with:
64-
java-version: 11
64+
java-version: 21
6565
distribution: temurin
6666
cache: gradle
6767

.github/workflows/pr-snapshots.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ jobs:
2121
steps:
2222
- uses: actions/checkout@v4
2323

24-
- name: Setup Java 11
24+
- name: Setup Java 21
2525
uses: actions/setup-java@v4
2626
with:
27-
java-version: 11
27+
java-version: 21
2828
distribution: temurin # pre-installed on ubuntu-latest
2929
cache: gradle
3030

build.gradle.kts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,10 @@ allprojects {
8080
}
8181
}
8282

83+
withType<AbstractArchiveTask>().configureEach {
84+
isPreserveFileTimestamps = true
85+
}
86+
8387
withType<Javadoc>().configureEach {
8488
options {
8589
this as StandardJavadocDocletOptions
@@ -92,6 +96,12 @@ allprojects {
9296
links( "https://docs.oracle.com/en/java/javase/11/docs/api/" )
9397
}
9498
isFailOnError = false
99+
100+
// use Java 25 to generate javadoc
101+
val javaToolchains = (project as ExtensionAware).extensions.getByName("javaToolchains") as JavaToolchainService
102+
javadocTool.set( javaToolchains.javadocToolFor {
103+
languageVersion.set( JavaLanguageVersion.of( 25 ) )
104+
} )
95105
}
96106
}
97107

buildSrc/src/main/kotlin/flatlaf-publish.gradle.kts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616

1717

18-
open class NativeArtifact( val fileName: String, val classifier: String, val type: String ) {}
18+
open class NativeArtifact( val fileName: String, val classifier: String, val extension: String ) {}
1919

2020
open class PublishExtension {
2121
var artifactId: String? = null
@@ -77,10 +77,10 @@ publishing {
7777

7878
afterEvaluate {
7979
extension.nativeArtifacts?.forEach {
80-
artifact( artifacts.add( "archives", file( it.fileName ) ) {
80+
artifact( file( it.fileName ) ) {
8181
classifier = it.classifier
82-
type = it.type
83-
} )
82+
extension = it.extension
83+
}
8484
}
8585
}
8686
}

flatlaf-natives/flatlaf-natives-windows/build.gradle.kts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ var javaHome = System.getProperty( "java.home" )
4141
if( javaHome.endsWith( "jre" ) )
4242
javaHome += "/.."
4343

44+
interface InjectedExecOps { @get:Inject val execOps: ExecOperations }
45+
val injected = project.objects.newInstance<InjectedExecOps>()
46+
4447
tasks {
4548
register( "build-natives" ) {
4649
group = "build"
@@ -98,9 +101,9 @@ tasks {
98101
val dumpbin = "C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.42.34433/bin/Hostx64/x64/dumpbin.exe"
99102
val dll = linkedFile.asFile.get()
100103
val dllDir = dll.parent
101-
exec { commandLine( dumpbin, "/all", "/rawdata:none", "/out:$dllDir/objdump.txt", dll ) }
102-
exec { commandLine( dumpbin, "/all", "/out:$dllDir/full-contents.txt", dll ) }
103-
exec { commandLine( dumpbin, "/disasm", "/out:$dllDir/disassemble.txt", dll ) }
104+
injected.execOps.exec { commandLine( dumpbin, "/all", "/rawdata:none", "/out:$dllDir/objdump.txt", dll ) }
105+
injected.execOps.exec { commandLine( dumpbin, "/all", "/out:$dllDir/full-contents.txt", dll ) }
106+
injected.execOps.exec { commandLine( dumpbin, "/disasm", "/out:$dllDir/disassemble.txt", dll ) }
104107
dump*/
105108
}
106109
}

gradle/wrapper/gradle-wrapper.jar

1.83 KB
Binary file not shown.

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.0-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

0 commit comments

Comments
 (0)