updte to OpenJDK 21, Gradle 8.5
This commit is contained in:
parent
553c397856
commit
74c0cf6f65
26 changed files with 159 additions and 63 deletions
10
build.gradle
10
build.gradle
|
@ -3,7 +3,7 @@ group = 'org.xbib.gradle.plugin'
|
|||
|
||||
wrapper {
|
||||
gradleVersion = libs.versions.gradle.get()
|
||||
distributionType = Wrapper.DistributionType.ALL
|
||||
distributionType = Wrapper.DistributionType.BIN
|
||||
}
|
||||
|
||||
ext {
|
||||
|
@ -20,11 +20,3 @@ ext {
|
|||
licenseName = 'The Apache License, Version 2.0'
|
||||
licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
|
||||
}
|
||||
|
||||
subprojects {
|
||||
apply plugin: 'java-library'
|
||||
apply from: rootProject.file('gradle/ide/idea.gradle')
|
||||
apply from: rootProject.file('gradle/compile/java.gradle')
|
||||
apply from: rootProject.file('gradle/test/junit5.gradle')
|
||||
apply from: rootProject.file('gradle/repositories/maven.gradle')
|
||||
}
|
||||
|
|
|
@ -1,21 +1,24 @@
|
|||
plugins {
|
||||
id 'java-gradle-plugin'
|
||||
alias(libs.plugins.publish)
|
||||
}
|
||||
|
||||
apply plugin: 'java-gradle-plugin'
|
||||
apply plugin: 'com.gradle.plugin-publish'
|
||||
|
||||
apply from: rootProject.file('gradle/compile/groovy.gradle')
|
||||
apply from: rootProject.file('gradle/test/junit5.gradle')
|
||||
|
||||
dependencies {
|
||||
api gradleApi()
|
||||
implementation libs.asciidoctorj
|
||||
implementation libs.jruby
|
||||
testImplementation libs.spock.core
|
||||
testImplementation libs.jsoup
|
||||
implementation libs.asm
|
||||
implementation libs.asm.commons
|
||||
implementation libs.asm.util
|
||||
testImplementation platform(testLibs.spock.bom)
|
||||
testImplementation testLibs.spock.core
|
||||
testImplementation testLibs.jsoup
|
||||
}
|
||||
|
||||
/*
|
||||
if (project.hasProperty('gradle.publish.key')) {
|
||||
gradlePlugin {
|
||||
website = 'https://xbib.org/joerg/gradle-plugins/src/branch/main/gradle-plugin-asciidoctor'
|
||||
|
@ -32,3 +35,4 @@ if (project.hasProperty('gradle.publish.key')) {
|
|||
}
|
||||
}
|
||||
}
|
||||
*/
|
|
@ -1,2 +1,2 @@
|
|||
name = gradle-plugin-asciidoctor
|
||||
version = 3.0.2
|
||||
version = 3.1.0
|
||||
|
|
|
@ -21,7 +21,7 @@ class AsciidoctorPlugin implements Plugin<Project> {
|
|||
AsciidoctorExtension extension = project.extensions.create(ASCIIDOCTORJ, AsciidoctorExtension, project)
|
||||
|
||||
project.afterEvaluate {
|
||||
if(project.extensions.asciidoctorj.addDefaultRepositories) {
|
||||
if (project.extensions.asciidoctorj.addDefaultRepositories) {
|
||||
project.repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
|
|
@ -174,5 +174,7 @@ class AsciidoctorExtensions {
|
|||
)
|
||||
|
||||
new GroovyShell(new Binding(), config)
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
plugins {
|
||||
id 'java-gradle-plugin'
|
||||
alias(libs.plugins.publish)
|
||||
}
|
||||
|
||||
apply plugin: 'java-gradle-plugin'
|
||||
apply plugin: 'com.gradle.plugin-publish'
|
||||
|
||||
apply from: rootProject.file('gradle/compile/groovy.gradle')
|
||||
apply from: rootProject.file('gradle/test/junit5.gradle')
|
||||
|
||||
dependencies {
|
||||
api gradleApi()
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
name = gradle-plugin-docker
|
||||
version = 3.0.2
|
||||
version = 3.1.0
|
||||
|
|
|
@ -7,12 +7,13 @@ apply plugin: 'java-gradle-plugin'
|
|||
apply plugin: 'com.gradle.plugin-publish'
|
||||
|
||||
apply from: rootProject.file('gradle/compile/groovy.gradle')
|
||||
apply from: rootProject.file('gradle/test/junit5.gradle')
|
||||
|
||||
dependencies {
|
||||
api gradleApi()
|
||||
api libs.groovy.git
|
||||
testImplementation gradleTestKit()
|
||||
testImplementation libs.spock.core
|
||||
testImplementation testLibs.spock.core
|
||||
testImplementation testLibs.junit4
|
||||
}
|
||||
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
name = gradle-plugin-docker
|
||||
version = 3.0.2
|
||||
version = 3.1.0
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
name = gradle-plugin-jacc
|
||||
version = 3.0.2
|
||||
version = 3.1.0
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
name = gradle-plugin-jflex
|
||||
version = 3.0.2
|
||||
version = 3.1.0
|
||||
|
|
|
@ -7,6 +7,7 @@ apply plugin: 'java-gradle-plugin'
|
|||
apply plugin: 'com.gradle.plugin-publish'
|
||||
|
||||
apply from: rootProject.file('gradle/compile/groovy.gradle')
|
||||
apply from: rootProject.file('gradle/test/junit5.gradle')
|
||||
|
||||
dependencies {
|
||||
api gradleApi()
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
name = gradle-plugin-rpm
|
||||
version = 3.0.3
|
||||
version = 3.1.0
|
||||
|
|
|
@ -15,8 +15,8 @@ dependencies {
|
|||
implementation libs.asm.commons
|
||||
implementation libs.asm.util
|
||||
testImplementation gradleTestKit()
|
||||
testImplementation libs.spock.core
|
||||
testImplementation libs.spock.junit4
|
||||
testImplementation testLibs.spock.core
|
||||
testImplementation testLibs.spock.junit4
|
||||
}
|
||||
|
||||
if (project.hasProperty('gradle.publish.key')) {
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
name = gradle-plugin-shadow
|
||||
version = 3.0.2
|
||||
version = 3.1.0
|
||||
|
|
|
@ -62,6 +62,8 @@ public abstract class AbstractUnicodeExtraField implements ZipExtraField {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get the CRC32 name.
|
||||
*
|
||||
* @return The CRC32 checksum of the filename or comment as
|
||||
* encoded in the central directory of the zip file.
|
||||
*/
|
||||
|
@ -70,6 +72,8 @@ public abstract class AbstractUnicodeExtraField implements ZipExtraField {
|
|||
}
|
||||
|
||||
/**
|
||||
* Set teh CRC32 name.
|
||||
*
|
||||
* @param nameCRC32 The CRC32 checksum of the filename as encoded
|
||||
* in the central directory of the zip file to set.
|
||||
*/
|
||||
|
@ -79,6 +83,8 @@ public abstract class AbstractUnicodeExtraField implements ZipExtraField {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get the Unicode name.
|
||||
*
|
||||
* @return The utf-8 encoded name.
|
||||
*/
|
||||
public byte[] getUnicodeName() {
|
||||
|
@ -91,6 +97,8 @@ public abstract class AbstractUnicodeExtraField implements ZipExtraField {
|
|||
}
|
||||
|
||||
/**
|
||||
* Set the Unicode name.
|
||||
*
|
||||
* @param unicodeName The utf-8 encoded name to set.
|
||||
*/
|
||||
public void setUnicodeName(final byte[] unicodeName) {
|
||||
|
|
|
@ -24,6 +24,7 @@ class DependencyUtilsTest {
|
|||
"java.lang.Object",
|
||||
"java.lang.String",
|
||||
"java.lang.StringBuilder",
|
||||
"java.lang.Thread",
|
||||
"java.lang.Throwable")
|
||||
.sort()
|
||||
// we do not care about jdk.internal classes, they vary between JDK versions and even JVMs
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
group = org.xbib.gradle.plugin
|
||||
name = gradle-plugins
|
||||
version = 0.0.6
|
||||
|
||||
org.gradle.warning.mode = ALL
|
||||
# version reflects gradle version plus a patch level version
|
||||
version = 8.5.0
|
||||
|
|
30
gradle/compile/groovy-dynamic-tests.gradle
Normal file
30
gradle/compile/groovy-dynamic-tests.gradle
Normal file
|
@ -0,0 +1,30 @@
|
|||
apply plugin: 'groovy'
|
||||
|
||||
// no groovy dependencies, we must use gradle embedded groovy
|
||||
|
||||
compileGroovy {
|
||||
groovyOptions.configurationScript = rootProject.file('gradle/compile/groovyc.groovy')
|
||||
}
|
||||
|
||||
compileTestGroovy {
|
||||
}
|
||||
|
||||
tasks.withType(GroovyCompile) {
|
||||
options.forkOptions.jvmArgs.add('-Dspock.iKnowWhatImDoing.disableGroovyVersionCheck=true')
|
||||
if (!options.compilerArgs.contains("-processor")) {
|
||||
options.compilerArgs << '-proc:none'
|
||||
}
|
||||
}
|
||||
|
||||
task groovydocJar(type: Jar, dependsOn: 'groovydoc') {
|
||||
from groovydoc.destinationDir
|
||||
archiveClassifier.set('javadoc')
|
||||
}
|
||||
|
||||
// make java source visible to groovy compiler, suppress sources for java compiler
|
||||
sourceSets {
|
||||
main {
|
||||
java { srcDirs = [] }
|
||||
groovy { srcDirs += ['src/main/java'] }
|
||||
}
|
||||
}
|
39
gradle/compile/groovy-static.gradle
Normal file
39
gradle/compile/groovy-static.gradle
Normal file
|
@ -0,0 +1,39 @@
|
|||
apply plugin: 'groovy'
|
||||
|
||||
// no groovy dependencies, we must use gradle embedded groovy
|
||||
|
||||
compileGroovy {
|
||||
// type checked, static
|
||||
groovyOptions.configurationScript = rootProject.file('gradle/compile/groovyc.groovy')
|
||||
}
|
||||
|
||||
compileTestGroovy {
|
||||
// type checked, static
|
||||
groovyOptions.configurationScript = rootProject.file('gradle/compile/groovyc.groovy')
|
||||
}
|
||||
|
||||
tasks.withType(GroovyCompile) {
|
||||
options.forkOptions.jvmArgs.add('-Dspock.iKnowWhatImDoing.disableGroovyVersionCheck=true')
|
||||
options.compilerArgs
|
||||
if (!options.compilerArgs.contains("-processor")) {
|
||||
options.compilerArgs.add('-proc:none')
|
||||
}
|
||||
}
|
||||
|
||||
task groovydocJar(type: Jar) {
|
||||
dependsOn groovydoc
|
||||
from groovydoc.destinationDir
|
||||
archiveClassifier.set('groovydoc')
|
||||
}
|
||||
tasks.assemble.dependsOn(tasks.groovydocJar)
|
||||
|
||||
artifacts {
|
||||
archives groovydocJar
|
||||
}
|
||||
// make java source visible to groovy compiler, suppress sources for java compiler
|
||||
sourceSets {
|
||||
main {
|
||||
java { srcDirs = [] }
|
||||
groovy { srcDirs += ['src/main/java'] }
|
||||
}
|
||||
}
|
|
@ -1,33 +1,37 @@
|
|||
apply plugin: 'groovy'
|
||||
|
||||
dependencies {
|
||||
implementation libs.groovy.core
|
||||
// no groovy dependencies, we must use gradle embedded groovy
|
||||
|
||||
compileGroovy {
|
||||
}
|
||||
|
||||
java {
|
||||
toolchain {
|
||||
languageVersion = JavaLanguageVersion.of(17)
|
||||
}
|
||||
modularity.inferModulePath.set(true)
|
||||
withSourcesJar()
|
||||
withJavadocJar()
|
||||
compileTestGroovy {
|
||||
}
|
||||
|
||||
tasks.withType(GroovyCompile) {
|
||||
options.compilerArgs
|
||||
if (!options.compilerArgs.contains("-processor")) {
|
||||
options.compilerArgs.add('-proc:none')
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
https://github.com/gradle/gradle/issues/15283
|
||||
|
||||
task groovydocJar(type: Jar) {
|
||||
dependsOn groovydoc
|
||||
task groovydocJar(type: Jar, dependsOn: 'groovydoc') {
|
||||
from groovydoc.destinationDir
|
||||
archiveClassifier.set('groovydoc')
|
||||
}
|
||||
tasks.assemble.dependsOn(tasks.groovydocJar)
|
||||
*/
|
||||
|
||||
artifacts {
|
||||
archives groovydocJar
|
||||
}
|
||||
|
||||
// make java source visible to groovy compiler, suppress sources for java compiler
|
||||
sourceSets {
|
||||
main {
|
||||
java { srcDirs = [] }
|
||||
groovy { srcDirs += ['src/main/java'] }
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType(Javadoc) {
|
||||
options.addStringOption('Xdoclint:none', '-quiet')
|
||||
options.encoding = 'UTF-8'
|
||||
}
|
||||
|
|
7
gradle/compile/groovyc.groovy
Normal file
7
gradle/compile/groovyc.groovy
Normal file
|
@ -0,0 +1,7 @@
|
|||
import groovy.transform.TypeChecked
|
||||
import groovy.transform.CompileStatic
|
||||
|
||||
withConfig(configuration) {
|
||||
ast(TypeChecked)
|
||||
ast(CompileStatic)
|
||||
}
|
|
@ -3,7 +3,7 @@ apply plugin: 'java-library'
|
|||
|
||||
java {
|
||||
toolchain {
|
||||
languageVersion = JavaLanguageVersion.of(17)
|
||||
languageVersion = JavaLanguageVersion.of(21)
|
||||
}
|
||||
modularity.inferModulePath.set(true)
|
||||
withSourcesJar()
|
||||
|
@ -13,6 +13,7 @@ java {
|
|||
jar {
|
||||
manifest {
|
||||
attributes('Implementation-Version': project.version)
|
||||
attributes('X-Java-Compiler-Version': JavaLanguageVersion.of(21).toString())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
|
@ -1,6 +1,6 @@
|
|||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
|
|
@ -2,34 +2,41 @@
|
|||
dependencyResolutionManagement {
|
||||
versionCatalogs {
|
||||
libs {
|
||||
version('gradle', '8.4')
|
||||
version('groovy', '3.0.17')
|
||||
version('spock', '2.0-groovy-3.0')
|
||||
version('gradle', '8.5')
|
||||
version('groovy', '3.0.17') // MUST match gradle groovy version
|
||||
version('asm', '9.6')
|
||||
library('groovy-core', 'org.codehaus.groovy', 'groovy').versionRef('groovy')
|
||||
library('spock-core', 'org.spockframework', 'spock-core').versionRef('spock')
|
||||
library('spock-junit4', 'org.spockframework', 'spock-junit4').versionRef('spock')
|
||||
// Attention: it is impossible to develop a gradle plugin with groovy 4!
|
||||
// The gradle plugin publish plugin enforces java-gradle-plugin,
|
||||
// and java-gradle-plugin enforces the embedded groovy of gradle on the compile classpath.
|
||||
// we keep this here as reference when Gradle switsches to Groovy 4+
|
||||
//library('groovy-bom', 'org.apache.groovy', 'groovy-bom').versionRef('groovy')
|
||||
//library('groovy', 'org.apache.groovy', 'groovy').versionRef('groovy')
|
||||
library('asm', 'org.ow2.asm', 'asm').versionRef('asm')
|
||||
library('asm-commons', 'org.ow2.asm', 'asm-commons').versionRef('asm')
|
||||
library('asm-util', 'org.ow2.asm', 'asm-util').versionRef('asm')
|
||||
library('asciidoctorj', 'org.asciidoctor', 'asciidoctorj').version('2.5.8')
|
||||
library('jruby', 'org.jruby', 'jruby').version('9.4.2.0')
|
||||
library('jsoup', 'org.jsoup', 'jsoup').version('1.16.1')
|
||||
library('asciidoctorj', 'org.asciidoctor', 'asciidoctorj').version('2.5.11')
|
||||
library('jruby', 'org.jruby', 'jruby').version('9.4.5.0')
|
||||
library('jflex', 'de.jflex', 'jflex').version('1.9.1')
|
||||
library('jacc', 'org.xbib', 'jacc').version('3.0.0')
|
||||
library('groovy-git', 'org.xbib.groovy', 'groovy-git').version('2.1.0')
|
||||
library('rpm', 'org.xbib', 'rpm-core').version('3.0.1')
|
||||
library('rpm', 'org.xbib', 'rpm-core').version('4.0.0')
|
||||
// MUST be groovy 3 dependency
|
||||
library('groovy-git', 'org.xbib.groovy', 'groovy-git').version('3.0.17.0')
|
||||
plugin('publish', 'com.gradle.plugin-publish').version('1.2.1')
|
||||
}
|
||||
testLibs {
|
||||
version('junit', '5.10.0')
|
||||
version('junit', '5.10.1')
|
||||
version('spock', '2.3-groovy-3.0')
|
||||
library('junit-jupiter-api', 'org.junit.jupiter', 'junit-jupiter-api').versionRef('junit')
|
||||
library('junit-jupiter-params', 'org.junit.jupiter', 'junit-jupiter-params').versionRef('junit')
|
||||
library('junit-jupiter-engine', 'org.junit.jupiter', 'junit-jupiter-engine').versionRef('junit')
|
||||
library('junit-jupiter-vintage', 'org.junit.vintage', 'junit-vintage-engine').versionRef('junit')
|
||||
library('junit-jupiter-platform-launcher', 'org.junit.platform', 'junit-platform-launcher').version('1.10.0')
|
||||
library('junit-jupiter-platform-launcher', 'org.junit.platform', 'junit-platform-launcher').version('1.10.1')
|
||||
library('hamcrest', 'org.hamcrest', 'hamcrest-library').version('2.2')
|
||||
library('junit4', 'junit', 'junit').version('4.13.2')
|
||||
library('spock-bom', 'org.spockframework', 'spock-bom').versionRef('spock')
|
||||
library('spock-core', 'org.spockframework', 'spock-core').versionRef('spock')
|
||||
library('spock-junit4', 'org.spockframework', 'spock-junit4').versionRef('spock')
|
||||
library('jsoup', 'org.jsoup', 'jsoup').version('1.17.2')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue