@@ -34,46 +34,57 @@ buildscript {
3434
3535 dependencies {
3636 // using the old "classpath" style of plugins because the new one doesn't play well with multi-modules
37- classpath ' org.asciidoctor:asciidoctor-gradle-plugin:1.5.8'
38- classpath ' org.jfrog.buildinfo:build-info-extractor-gradle:3.0.3'
37+ // Updated asciidoctor plugin for Gradle 9.x compatibility (backported from GROOVY_4_0_X)
38+ classpath ' org.asciidoctor:asciidoctor-gradle-jvm:4.0.2'
39+ // classpath 'org.jfrog.buildinfo:build-info-extractor-gradle:6.0.4'
3940 // classpath 'nl.javadude.gradle.plugins:license-gradle-plugin:0.11.0'
4041 classpath ' org.nosphere.apache:creadur-rat-gradle:0.8.1'
41- classpath ' gradle.plugin.com.github.jk1:gradle-license-report:1.3'
42+ // classpath 'gradle.plugin.com.github.jk1:gradle-license-report:1.3'
4243 }
4344}
4445
4546plugins {
46- id ' me.champeau.buildscan-recipes' version ' 0.2.3'
47- id ' com.github.spotbugs' version ' 4.6.0'
48- id ' com.github.ben-manes.versions' version ' 0.42.0' // 0.43 requires gradle 7+
49- id ' com.github.blindpirate.osgi' version ' 0.0.6'
50- id ' org.sonarqube' version ' 3.0'
47+ // Disabled for Gradle 9.x compatibility - buildscan-recipes uses deprecated APIs
48+ // id 'me.champeau.buildscan-recipes' version '0.2.3'
49+ id ' com.github.spotbugs' version ' 6.4.2'
50+ id ' com.github.ben-manes.versions' version ' 0.51.0'
51+ id ' io.github.goooler.osgi' version ' 0.8.6'
52+ id ' org.sonarqube' version ' 6.0.1.5171'
5153}
5254
53- buildScanRecipes {
54- recipe ' git-commit' , baseUrl : ' https://github.com/apache/groovy/tree'
55- recipe ' teamcity' , baseUrl : ' https://ci.groovy-lang.org' , guest : ' true'
56- recipes ' git-status' , ' gc-stats' , ' teamcity' , ' travis-ci'
57- }
55+ // Disabled for Gradle 9.x compatibility
56+ // buildScanRecipes {
57+ // recipe 'git-commit', baseUrl: 'https://github.com/apache/groovy/tree'
58+ // recipe 'teamcity', baseUrl: 'https://ci.groovy-lang.org', guest: 'true'
59+ // recipes 'git-status', 'gc-stats', 'teamcity', 'travis-ci'
60+ // }
5861
5962ext. modules = {
6063 subprojects. findAll{ ! [' performance' , ' binary-compatibility' ]. contains(it. name) }
6164}
6265ext. isReleaseVersion = ! groovyVersion. toLowerCase(). endsWith(' snapshot' )
6366
6467apply from : ' gradle/bad-practices.gradle'
65- apply from : ' gradle/publish.gradle'
66- apply plugin : ' com.github.jk1.dependency-license-report'
68+ // TODO: Fix publish.gradle for Gradle 9.x compatibility - artifactory plugin API changed
69+ // apply from: 'gradle/publish.gradle'
70+ // Disabled for Gradle 9.x - jk1 plugin uses deprecated APIs
71+ // apply plugin: 'com.github.jk1.dependency-license-report'
6772
6873File javaHome = new File (System . getProperty(' java.home' ))
6974logger. lifecycle " Using Java from $javaHome (version ${ System.getProperty('java.version')} )"
7075
7176allprojects {
7277 apply plugin : ' java-library'
7378
74- buildDir = ' target'
75- sourceCompatibility = 1.8
76- targetCompatibility = 1.8
79+ layout. buildDirectory = file(' target' )
80+ java {
81+ sourceCompatibility = JavaVersion . VERSION_1_8
82+ targetCompatibility = JavaVersion . VERSION_1_8
83+ }
84+
85+ // Stub for provided() method (normally from pomconfigurer.gradle via upload.gradle)
86+ ext. providedDeps = []
87+ ext. provided = { ext. providedDeps << it }
7788
7889 group = ' org.codehaus.groovy'
7990 version = groovyVersion
@@ -98,9 +109,9 @@ allprojects {
98109
99110 apply plugin : ' groovy'
100111 apply from : " ${ rootProject.projectDir} /gradle/indy.gradle"
112+ // Updated for asciidoctor-gradle-jvm 4.x (backported from GROOVY_4_0_X)
101113 apply from : " ${ rootProject.projectDir} /gradle/asciidoctor.gradle"
102-
103- tasks. withType(org.asciidoctor.gradle.AsciidoctorTask ) {
114+ tasks. withType(org.asciidoctor.gradle.jvm.AsciidoctorTask ) {
104115 outputs. cacheIf { true }
105116 }
106117}
@@ -129,7 +140,7 @@ configurations {
129140
130141ext {
131142 antVersion = ' 1.10.15'
132- asmVersion = ' 9.8 '
143+ asmVersion = ' 9.9 '
133144 antlrVersion = ' 2.7.7'
134145 antlr4Version = ' 4.9.0'
135146 bridgerVersion = ' 1.6.Final'
@@ -267,15 +278,16 @@ sourceSets {
267278}
268279
269280task sourceJar (type : Jar ) {
270- classifier = ' sources'
281+ dependsOn ' ensureGrammars' , ' generateGrammarSource'
282+ archiveClassifier = ' sources'
271283 duplicatesStrategy = DuplicatesStrategy . EXCLUDE
272284 from sourceSets. main. allSource
273285 from sourceSets. antlr2. allSource
274286}
275287
276288subprojects {
277289 task sourceJar(type : Jar ) {
278- classifier = ' sources'
290+ archiveClassifier = ' sources'
279291 duplicatesStrategy = DuplicatesStrategy . EXCLUDE
280292 from sourceSets. main. allSource
281293 }
@@ -314,14 +326,16 @@ task ensureGrammars {
314326
315327compileJava {
316328 dependsOn ensureGrammars, generateGrammarSource
317- options. fork(memoryMaximumSize : javacMain_mx)
329+ options. fork = true
330+ options. forkOptions. memoryMaximumSize = javacMain_mx
318331
319332 doLast {
333+ def javaOutputDir = compileJava. destinationDirectory. get(). asFile. canonicalPath
320334 ant. java(classname :' org.jboss.bridger.Bridger' , classpath : rootProject. configurations. tools. asPath, outputproperty : ' stdout' ) {
321- arg(value : " ${ sourceSets.main.java.outputDir.canonicalPath } /org/codehaus/groovy/runtime/DefaultGroovyMethods.class" )
322- arg(value : " ${ sourceSets.main.java.outputDir.canonicalPath } /org/codehaus/groovy/runtime/StringGroovyMethods.class" )
323- arg(value : " ${ sourceSets.main.java.outputDir.canonicalPath } /org/codehaus/groovy/classgen/Verifier.class" )
324- arg(value : " ${ sourceSets.main.java.outputDir.canonicalPath } /org/codehaus/groovy/ast/tools/GeneralUtils.class" )
335+ arg(value : " ${ javaOutputDir } /org/codehaus/groovy/runtime/DefaultGroovyMethods.class" )
336+ arg(value : " ${ javaOutputDir } /org/codehaus/groovy/runtime/StringGroovyMethods.class" )
337+ arg(value : " ${ javaOutputDir } /org/codehaus/groovy/classgen/Verifier.class" )
338+ arg(value : " ${ javaOutputDir } /org/codehaus/groovy/ast/tools/GeneralUtils.class" )
325339 }
326340 ant. echo(' Bridger (groovy): ' + ant. properties. stdout)
327341 }
@@ -356,12 +370,12 @@ task dgmConverter(dependsOn:compileJava) {
356370task bootstrapJar (type : Jar ) {
357371 dependsOn compileJava, dgmConverter
358372
359- from compileJava. destinationDir
373+ from compileJava. destinationDirectory
360374 from dgmConverter. outputDir
361375
362376 duplicatesStrategy = DuplicatesStrategy . EXCLUDE
363- destinationDir = file(" $buildDir /bootstrap" )
364- classifier = ' bootstrap'
377+ destinationDirectory = file(" $buildDir /bootstrap" )
378+ archiveClassifier = ' bootstrap'
365379}
366380
367381allprojects {
@@ -387,16 +401,17 @@ allprojects {
387401 task compileGroovyWithIndy(type : GroovyCompile ) {
388402 source = sourceSets. main. groovy
389403 classpath = compileGroovy. classpath
390- sourceCompatibility = 1.8
391- targetCompatibility = 1.8
404+ sourceCompatibility = JavaVersion . VERSION_1_8
405+ targetCompatibility = JavaVersion . VERSION_1_8
392406 groovyOptions. optimizationOptions[' indy' ] = true
393- destinationDir = file(" $buildDir /classes/indy" )
407+ destinationDirectory = file(" $buildDir /classes/indy" )
394408 }
395409 }
396410
397411 tasks. withType(GroovyCompile ) {
398412 groovyOptions. forkOptions. jvmArgs + = [' -Dgroovy.antlr4.cache.threshold=100' ]
399- groovyOptions. fork(memoryMaximumSize : groovycMain_mx)
413+ groovyOptions. fork = true
414+ groovyOptions. forkOptions. memoryMaximumSize = groovycMain_mx
400415 groovyOptions. encoding = ' UTF-8'
401416 // options.compilerArgs << '-Xlint:unchecked' << '-Xlint:deprecation'
402417 groovyClasspath = files(
@@ -412,7 +427,8 @@ allprojects {
412427}
413428
414429compileTestGroovy {
415- groovyOptions. fork(memoryMaximumSize : groovycTest_mx)
430+ groovyOptions. fork = true
431+ groovyOptions. forkOptions. memoryMaximumSize = groovycTest_mx
416432}
417433
418434task checkCompatibility {
@@ -438,7 +454,9 @@ apply from: 'gradle/test.gradle'
438454apply from : ' gradle/groovydoc.gradle'
439455apply from : ' gradle/docs.gradle'
440456apply from : ' gradle/assemble.gradle'
441- apply from : ' gradle/upload.gradle'
457+ // Legacy upload.gradle (uses deprecated maven plugin) - replaced by upload-publish.gradle
458+ // apply from: 'gradle/upload.gradle'
459+ apply from : ' gradle/upload-publish.gradle'
442460apply from : ' gradle/idea.gradle'
443461apply from : ' gradle/eclipse.gradle'
444462apply from : ' gradle/quality.gradle'
@@ -451,12 +469,13 @@ if (file('user.gradle').exists()) {
451469
452470apply from : ' gradle/signing.gradle'
453471
454- licenseReport {
455- excludeGroups = [
456- ' com.googlecode' , // openbeans has no pom but is ASLv2
457- ' org.multiverse' // we never include this optional dependency of an optional dependency
458- ]
459- }
472+ // Disabled - plugin not loaded
473+ // licenseReport {
474+ // excludeGroups = [
475+ // 'com.googlecode', // openbeans has no pom but is ASLv2
476+ // 'org.multiverse' // we never include this optional dependency of an optional dependency
477+ // ]
478+ // }
460479
461480// UNCOMMENT THE FOLLOWING TASKS IF YOU WANT TO RUN LICENSE CHECKING
462481// task licenseFormatCustom(type:nl.javadude.gradle.plugins.license.License) {
0 commit comments