11plugins {
2- id ' com.diffplug.spotless' version ' 6.25.0 ' apply false
2+ id ' com.diffplug.spotless' version ' 7.2.1 ' apply false
33 id ' info.solidsoft.pitest' version ' 1.15.0' apply false
44 id ' io.github.gradle-nexus.publish-plugin' version ' 2.0.0'
5- id ' me.champeau.jmh' version ' 0.7.2 ' apply false
6- id ' net.ltgt.errorprone' version ' 3.1 .0' apply false
7- id ' net.researchgate.release' version ' 3.0.2 '
5+ id ' me.champeau.jmh' version ' 0.7.3 ' apply false
6+ id ' net.ltgt.errorprone' version ' 4.3 .0' apply false
7+ id ' net.researchgate.release' version ' 3.1.0 '
88 id ' org.beryx.jar' version ' 2.0.0' apply false
99}
1010
1111subprojects {
12+ if (name == ' xpath-to-xml-bom' ) return // skip empty projects
13+
1214 apply plugin : ' java-library'
1315 apply plugin : ' org.beryx.jar'
1416 apply from : rootProject. file(' gradle/check-checkstyle.gradle' )
@@ -21,6 +23,16 @@ subprojects {
2123 mavenCentral()
2224 }
2325
26+ configurations {
27+ [compileClasspath, runtimeClasspath]* . resolutionStrategy* . activateDependencyLocking()
28+ }
29+
30+ dependencies {
31+ testImplementation platform(libs. junit. bom)
32+
33+ testRuntimeOnly ' org.junit.platform:junit-platform-launcher'
34+ }
35+
2436 java {
2537 withJavadocJar()
2638 withSourcesJar()
@@ -29,13 +41,6 @@ subprojects {
2941 targetCompatibility = JavaVersion . VERSION_1_8
3042 }
3143
32- // after gradle 5.3 we need to set this attribute to mark test configuration targeting java 8
33- [configurations. testCompileClasspath, configurations. testRuntimeClasspath]. each {
34- it. attributes {
35- attribute(TargetJvmVersion . TARGET_JVM_VERSION_ATTRIBUTE , 11 )
36- }
37- }
38-
3944 compileJava {
4045 options. release = 8
4146 options. compilerArgs << ' -Xlint:all,-options' << ' -Werror'
@@ -68,11 +73,23 @@ subprojects {
6873 options. addBooleanOption(' html5' , true )
6974 options. addStringOption(' Xdoclint:all,-missing' , ' -quiet' )
7075 }
76+
77+ tasks. register(' resolveAndLock' ) {
78+ notCompatibleWithConfigurationCache(' Fitlers configurations at execution time' )
79+ doFirst {
80+ assert gradle. startParameter. writeDependencyLocks : " $path must be run from the the command line with the `--write-locks` flag"
81+ }
82+ doLast {
83+ [configurations. compileClasspath, configurations. runtimeClasspath]. each { it. resolve() }
84+ }
85+ }
7186}
7287
7388nexusPublishing {
7489 repositories {
7590 sonatype {
91+ nexusUrl = uri(" https://ossrh-staging-api.central.sonatype.com/service/local/" )
92+ snapshotRepositoryUrl = uri(" https://central.sonatype.com/repository/maven-snapshots/" )
7693 username = sonatypeUsername
7794 password = sonatypePassword
7895 }
@@ -87,5 +104,5 @@ release {
87104}
88105
89106wrapper {
90- gradleVersion = ' 8.7 '
107+ gradleVersion = ' 8.14.3 '
91108}
0 commit comments