Skip to content

Commit fba3db3

Browse files
committed
upgrade to support java 25 and gradle 9.2.1
1 parent 203bc80 commit fba3db3

File tree

6 files changed

+101
-34
lines changed

6 files changed

+101
-34
lines changed

.gitignore

Lines changed: 58 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,59 @@
1+
build/
2+
target/
3+
!.mvn/wrapper/maven-wrapper.jar
4+
.DS_Store
5+
out/
6+
generated/
7+
generated_tests/
8+
generated-resources-dir/
9+
bin/
10+
*.swp
11+
12+
# python
13+
__pycache__
14+
venv
15+
.pyc
16+
17+
# Compiled class file
18+
*.class
19+
20+
# Log file
21+
*.log
22+
*.log*
23+
24+
# BlueJ files
25+
*.ctxt
26+
27+
# Mobile Tools for Java (J2ME)
28+
.mtj.tmp/
29+
30+
# Package Files #
31+
*.jar
32+
*.war
33+
*.nar
34+
*.ear
35+
*.zip
36+
*.tar.gz
37+
*.rar
38+
39+
### STS ###
40+
.apt_generated
41+
.classpath
42+
.factorypath
43+
.project
44+
.settings
45+
.springBeans
46+
.gradle/*
47+
48+
### IntelliJ IDEA ###
149
.idea
2-
.gradle
3-
build
4-
profilers
5-
testdata
6-
hotspot_*.log
50+
*.iws
51+
*.iml
52+
*.ipr
53+
#### Intellij run configuration
54+
.run/
55+
56+
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
57+
hs_err_pid*
58+
replay_pid*
59+
*/.gradle/*

build.gradle

Lines changed: 40 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import me.champeau.jmh.JmhBytecodeGeneratorTask
2-
import org.ajoberstar.grgit.Grgit
32
import org.gradle.internal.os.OperatingSystem
43

54
import java.time.Duration
@@ -8,17 +7,17 @@ plugins {
87
id 'java'
98
id 'scala'
109
id 'me.champeau.jmh' version '0.7.1'
11-
id 'org.ajoberstar.grgit' version '5.2.0'
12-
id 'pl.allegro.tech.build.axion-release' version '1.15.5'
13-
id 'io.github.gradle-nexus.publish-plugin' version '1.3.0'
10+
id 'pl.allegro.tech.build.axion-release' version '1.21.1'
11+
id 'io.github.gradle-nexus.publish-plugin' version '2.0.0'
1412
id 'maven-publish'
1513
id 'signing'
1614
}
1715

1816
scmVersion {
1917
versionCreator('versionWithBranch')
2018
tag {
21-
prefix = ''
19+
// Property<String> in newer versions
20+
prefix.set('')
2221
}
2322
}
2423

@@ -62,17 +61,20 @@ dependencies {
6261
testRuntimeOnly group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: junitVersion
6362
}
6463

64+
/**
65+
* Simplified for Gradle 9: no more exec() from the build script.
66+
* If you actually want the numeric test fixtures, run this once:
67+
*
68+
* mkdir -p testdata
69+
* cd testdata
70+
* git clone https://github.com/nigeltao/parse-number-fxx-test-data.git
71+
*/
6572
tasks.register('downloadTestData') {
66-
doFirst {
67-
def testDataDir = new File("${project.projectDir.getAbsolutePath()}/testdata")
68-
if (!testDataDir.exists()) {
69-
testDataDir.mkdir()
70-
}
71-
def numbersTestDataDir = new File("${testDataDir}/parse-number-fxx-test-data")
72-
if (!numbersTestDataDir.exists()) {
73-
def grgit = Grgit.clone(dir: numbersTestDataDir, uri: 'https://github.com/nigeltao/parse-number-fxx-test-data.git')
74-
grgit.close()
75-
}
73+
doLast {
74+
logger.lifecycle("Skipping automatic download of parse-number-fxx-test-data.")
75+
logger.lifecycle("If needed, run manually:")
76+
logger.lifecycle(" mkdir -p testdata && cd testdata")
77+
logger.lifecycle(" git clone https://github.com/nigeltao/parse-number-fxx-test-data.git")
7678
}
7779
}
7880

@@ -103,8 +105,18 @@ tasks.register('test512', Test) {
103105
}
104106

105107
test {
108+
// run JUnit 5 tests
109+
useJUnitPlatform()
110+
111+
jvmArgs += [
112+
'--add-modules', 'jdk.incubator.vector', '-Xmx2g'
113+
]
114+
// still run the vector-width-specific tasks first
106115
dependsOn 'test256'
107116
dependsOn 'test512'
117+
118+
// and don't blow up if this particular task finds nothing
119+
failOnNoDiscoveredTests = false
108120
}
109121

110122
tasks.withType(JmhBytecodeGeneratorTask).configureEach {
@@ -206,15 +218,21 @@ if (System.getenv('GPG_KEY_ID')) {
206218
nexusPublishing {
207219
repositories {
208220
sonatype {
209-
nexusUrl = uri("https://ossrh-staging-api.central.sonatype.com/service/local/")
210-
snapshotRepositoryUrl = uri("https://central.sonatype.com/repository/maven-snapshots/")
211-
stagingProfileId = '3c0bbfe420699e'
212-
username = System.getenv('SONATYPE_USERNAME')
213-
password = System.getenv('SONATYPE_PASSWORD')
221+
nexusUrl.set(uri("https://ossrh-staging-api.central.sonatype.com/service/local/"))
222+
snapshotRepositoryUrl.set(uri("https://central.sonatype.com/repository/maven-snapshots/"))
223+
224+
if (System.getenv('SONATYPE_USERNAME')) {
225+
username.set(System.getenv('SONATYPE_USERNAME'))
226+
}
227+
if (System.getenv('SONATYPE_PASSWORD')) {
228+
password.set(System.getenv('SONATYPE_PASSWORD'))
229+
}
230+
231+
stagingProfileId.set('3c0bbfe420699e')
214232
}
215233
}
216-
connectTimeout = Duration.ofMinutes(3)
217-
clientTimeout = Duration.ofMinutes(3)
234+
connectTimeout.set(Duration.ofMinutes(3))
235+
clientTimeout.set(Duration.ofMinutes(3))
218236
}
219237

220238
def getBooleanProperty(String name, boolean defaultValue) {

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.3-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

gradlew

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/sh
22

33
#
4-
# Copyright © 2015-2021 the original authors.
4+
# Copyright © 2015 the original authors.
55
#
66
# Licensed under the Apache License, Version 2.0 (the "License");
77
# you may not use this file except in compliance with the License.
@@ -114,7 +114,6 @@ case "$( uname )" in #(
114114
NONSTOP* ) nonstop=true ;;
115115
esac
116116

117-
CLASSPATH="\\\"\\\""
118117

119118

120119
# Determine the Java command to use to start the JVM.
@@ -172,7 +171,6 @@ fi
172171
# For Cygwin or MSYS, switch paths to Windows format before running java
173172
if "$cygwin" || "$msys" ; then
174173
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
175-
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
176174

177175
JAVACMD=$( cygpath --unix "$JAVACMD" )
178176

@@ -212,7 +210,6 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
212210

213211
set -- \
214212
"-Dorg.gradle.appname=$APP_BASE_NAME" \
215-
-classpath "$CLASSPATH" \
216213
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
217214
"$@"
218215

gradlew.bat

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,10 @@ goto fail
7070
:execute
7171
@rem Setup the command line
7272

73-
set CLASSPATH=
7473

7574

7675
@rem Execute Gradle
77-
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
76+
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
7877

7978
:end
8079
@rem End local scope for the variables with windows NT shell

0 commit comments

Comments
 (0)