1- rootProject. version = ' 9.9.2 '
1+ rootProject. version = " 9.10.0 "
22group = ' javasabr'
33
4- allprojects {
4+ subprojects {
55
66 repositories {
77 mavenCentral()
@@ -11,26 +11,33 @@ allprojects {
1111 apply plugin : " java-test-fixtures"
1212 apply plugin : ' maven-publish'
1313
14- sourceCompatibility = JavaVersion . VERSION_17
15- targetCompatibility = JavaVersion . VERSION_17
14+ java {
15+ toolchain {
16+ languageVersion = JavaLanguageVersion . of(21 )
17+ }
18+ }
1619
1720 javadoc {
1821 failOnError = false
1922 }
2023
2124 test {
2225 useJUnitPlatform()
26+ failOnNoDiscoveredTests = false
2327 }
2428
2529 dependencies {
2630 compileOnly libs. jetbrains. annotations
31+ compileOnly libs. jspecify
2732 compileOnly libs. lombok
2833 annotationProcessor libs. lombok
2934
3035 testImplementation libs. junit. api
3136 testCompileOnly libs. lombok
3237 testCompileOnly libs. jetbrains. annotations
38+ testCompileOnly libs. jspecify
3339 testRuntimeOnly libs. junit. engine
40+ testRuntimeOnly libs. junit. platform. launcher
3441 testAnnotationProcessor libs. lombok
3542 }
3643
@@ -44,32 +51,28 @@ allprojects {
4451 }
4552 }*/
4653
47- compileJava {
48- options. encoding = " UTF-8"
49- }
50-
51- compileTestJava {
54+ tasks. withType(JavaCompile ). configureEach {
5255 options. encoding = " UTF-8"
5356 }
5457
5558 tasks. withType(Javadoc ). configureEach {
5659 options. encoding = " UTF-8"
5760 }
5861
59- task sourcesJar( type : Jar , dependsOn : classes ) {
60- afterEvaluate {
61- getArchiveClassifier() . set( " sources " )
62- getArchiveBaseName() . set(jar . getArchiveBaseName())
63- from sourceSets . main . allSource
64- }
62+ tasks . register( " sourcesJar " , Jar ) {
63+ dependsOn " classes "
64+ group " build "
65+ archiveClassifier = " sources "
66+ archiveBaseName = jar . archiveBaseName
67+ from sourceSets . main . allSource
6568 }
6669
67- task javadocJar( type : Jar , dependsOn : javadoc ) {
68- afterEvaluate {
69- getArchiveClassifier() . set( " javadoc " )
70- getArchiveBaseName() . set(jar . getArchiveBaseName())
71- from sourceSets . main . allSource
72- }
70+ tasks . register( " javadocJar " , Jar ) {
71+ dependsOn " javadoc "
72+ group " build "
73+ archiveClassifier = " javadoc "
74+ archiveBaseName = jar . archiveBaseName
75+ from sourceSets . main . allSource
7376 }
7477
7578 publishing {
@@ -106,22 +109,20 @@ allprojects {
106109 }
107110
108111 tasks. register(' testJar' , Jar ) {
109- getArchiveClassifier() . set( " test" )
112+ archiveClassifier = " test"
110113 from sourceSets. test. output
111114 }
112115
113116 artifacts {
114117 testArtifacts testJar
115118 }
116119
117- tasks. withType(Test ). tap {
118- configureEach {
119- maxParallelForks = Runtime . runtime. availableProcessors()
120- }
120+ tasks. withType(Test ). configureEach {
121+ maxParallelForks = Runtime . runtime. availableProcessors()
121122 }
122123}
123124
124125wrapper {
125- gradleVersion = ' 8.11.1 '
126+ gradleVersion = ' 9.0.0 '
126127 distributionType = Wrapper.DistributionType . ALL
127128}
0 commit comments