11import me.champeau.jmh.JmhBytecodeGeneratorTask
2- import org.ajoberstar.grgit.Grgit
32import org.gradle.internal.os.OperatingSystem
43
54import 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
1816scmVersion {
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+ */
6572tasks. 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
105107test {
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
110122tasks. withType(JmhBytecodeGeneratorTask ). configureEach {
@@ -206,15 +218,21 @@ if (System.getenv('GPG_KEY_ID')) {
206218nexusPublishing {
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
220238def getBooleanProperty (String name , boolean defaultValue ) {
0 commit comments