diff --git a/build.gradle b/build.gradle index 168a442..7072a82 100644 --- a/build.gradle +++ b/build.gradle @@ -1,16 +1,23 @@ plugins { id 'java' id 'application' - id 'com.github.johnrengelman.shadow' version '8.1.1' + id 'com.gradleup.shadow' version '9.2.2' id 'com.github.ben-manes.versions' version '0.49.0' } group = 'com.github.fabienrenaud' version = '8' -mainClassName = 'com.github.fabienrenaud.jjb.Cli' -sourceCompatibility = 17 -targetCompatibility = 17 +application { + mainClass = 'com.github.fabienrenaud.jjb.Cli' +} + +java { + toolchain { + sourceCompatibility = 17 + targetCompatibility = 17 + } +} repositories { mavenCentral() @@ -27,86 +34,86 @@ ext { dependencies { // CLI and misc - implementation group: 'io.airlift', name: 'airline', version: '0.9' - implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0' + implementation 'io.airlift:airline:0.9' + implementation 'org.apache.commons:commons-lang3:3.12.0' // JSON libraries // In alphabetical order. // antons - implementation group: 'io.github.antonsjava', name: 'json', version: '1.17' + implementation 'io.github.antonsjava:json:1.17' // avaje-jsonb - implementation group: 'io.avaje', name: 'avaje-jsonb', version: "${avajeJsonVersion}" - implementation group: 'io.avaje', name: 'avaje-jsonb-jackson', version: "${avajeJsonVersion}" - annotationProcessor group: 'io.avaje', name: 'avaje-jsonb-generator', version: "${avajeJsonVersion}" + implementation "io.avaje:avaje-jsonb:${avajeJsonVersion}" + implementation "io.avaje:avaje-jsonb-jackson:${avajeJsonVersion}" + annotationProcessor "io.avaje:avaje-jsonb-generator:${avajeJsonVersion}" // boon - implementation group: 'io.fastjson', name: 'boon', version: '0.34' + implementation 'io.fastjson:boon:0.34' // DSL-json - implementation group: 'com.dslplatform', name: 'dsl-json', version: "${dslJsonVersion}" - annotationProcessor group: 'com.dslplatform', name: 'dsl-json', version: "${dslJsonVersion}" + implementation "com.dslplatform:dsl-json:${dslJsonVersion}" + annotationProcessor "com.dslplatform:dsl-json:${dslJsonVersion}" // FastJson - implementation group: 'com.alibaba.fastjson2', name: 'fastjson2', version: '2.0.57' + implementation 'com.alibaba.fastjson2:fastjson2:2.0.57' // FlexJson - implementation group: 'net.sf.flexjson', name: 'flexjson', version: '3.3' + implementation 'net.sf.flexjson:flexjson:3.3' // GENSON - implementation group: 'com.owlike', name: 'genson', version: '1.6' + implementation 'com.owlike:genson:1.6' // GSON - implementation group: 'com.google.code.gson', name: 'gson', version: '2.11.0' + implementation 'com.google.code.gson:gson:2.11.0' // Jackson - implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: "${jacksonVersion}" - implementation group: 'com.fasterxml.jackson.module', name: 'jackson-module-afterburner', version: "${jacksonVersion}" - implementation group: 'com.fasterxml.jackson.module', name: 'jackson-module-blackbird', version: "${jacksonVersion}" - implementation group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-jsr310', version: "${jacksonVersion}" + implementation "com.fasterxml.jackson.core:jackson-databind:${jacksonVersion}" + implementation "com.fasterxml.jackson.module:jackson-module-afterburner:${jacksonVersion}" + implementation "com.fasterxml.jackson.module:jackson-module-blackbird:${jacksonVersion}" + implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:${jacksonVersion}" // jodd - implementation group: 'org.jodd', name: 'jodd-json', version: '6.0.3' + implementation 'org.jodd:jodd-json:6.0.3' // johnzon - implementation group: 'org.apache.johnzon', name: 'johnzon-core', version: "${johnzonVersion}" - implementation group: 'org.apache.johnzon', name: 'johnzon-mapper', version: "${johnzonVersion}" + implementation "org.apache.johnzon:johnzon-core:${johnzonVersion}" + implementation "org.apache.johnzon:johnzon-mapper:${johnzonVersion}" // Jakarta - implementation group: 'jakarta.json.bind', name: 'jakarta.json.bind-api', version: '3.0.1' - implementation group: 'jakarta.json', name: 'jakarta.json-api', version: '2.1.3' - implementation group: 'org.glassfish', name: 'jakarta.json', version: '2.0.1' + implementation 'jakarta.json.bind:jakarta.json.bind-api:3.0.1' + implementation 'jakarta.json:jakarta.json-api:2.1.3' + implementation 'org.glassfish:jakarta.json:2.0.1' // json-io - implementation group: 'com.cedarsoftware', name: 'json-io', version: '4.24.0' + implementation 'com.cedarsoftware:json-io:4.24.0' // json-simple - implementation group: 'com.googlecode.json-simple', name: 'json-simple', version: '1.1.1' + implementation 'com.googlecode.json-simple:json-simple:1.1.1' // json-smart - implementation group: 'net.minidev', name: 'json-smart', version: '2.5.1' + implementation 'net.minidev:json-smart:2.5.1' // LoganSquare - implementation group: 'com.bluelinelabs', name: 'logansquare', version: '1.3.7' - annotationProcessor group: 'com.bluelinelabs', name: 'logansquare-compiler', version: '1.3.7' + implementation 'com.bluelinelabs:logansquare:1.3.7' + annotationProcessor 'com.bluelinelabs:logansquare-compiler:1.3.7' // minimal-json - implementation group: 'com.eclipsesource.minimal-json', name: 'minimal-json', version: '0.9.5' + implementation 'com.eclipsesource.minimal-json:minimal-json:0.9.5' // mjson - implementation group: 'org.sharegov', name: 'mjson', version: '1.4.1' + implementation 'org.sharegov:mjson:1.4.1' // moshi - implementation group: 'com.squareup.moshi', name: 'moshi', version: '1.15.1' + implementation 'com.squareup.moshi:moshi:1.15.1' // nanojson - implementation group: 'com.grack', name: 'nanojson', version: '1.9' + implementation 'com.grack:nanojson:1.9' // org.json - implementation group: 'org.json', name: 'json', version: '20240303' + implementation 'org.json:json:20240303' // purejson - implementation group: 'io.github.senthilganeshs', name: 'purejson', version: '1.0.1' + implementation 'io.github.senthilganeshs:purejson:1.0.1' // qson - implementation group: 'io.quarkus.qson', name: 'qson-generator', version: '1.1.1.Final' + implementation 'io.quarkus.qson:qson-generator:1.1.1.Final' // tapestry - implementation group: 'org.apache.tapestry', name: 'tapestry-json', version: '5.8.6' + implementation 'org.apache.tapestry:tapestry-json:5.8.6' // underscore-java - implementation group: 'com.github.javadev', name: 'underscore', version: '1.101' + implementation 'com.github.javadev:underscore:1.101' // yasson - implementation group: 'org.eclipse', name: 'yasson', version: '3.0.3' + implementation 'org.eclipse:yasson:3.0.3' // QuickBuffers - implementation group: 'us.hebi.quickbuf', name: 'quickbuf-runtime', version: '1.4' + implementation 'us.hebi.quickbuf:quickbuf-runtime:1.4' // wast - implementation group: 'io.github.wycst', name: 'wast', version: '0.0.26' + implementation 'io.github.wycst:wast:0.0.26' // Test - testImplementation group: 'junit', name: 'junit', version: '4.13.2' + testImplementation 'junit:junit:4.13.2' // IMPORTANT: Leave JMH at the end! // JMH - implementation group: 'org.openjdk.jmh', name: 'jmh-core', version: "${jmhVersion}" - annotationProcessor group: 'org.openjdk.jmh', name: 'jmh-generator-annprocess', version: "${jmhVersion}" + implementation "org.openjdk.jmh:jmh-core:${jmhVersion}" + annotationProcessor "org.openjdk.jmh:jmh-generator-annprocess:${jmhVersion}" } shadowJar { diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 033e24c..7f93135 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 744c64d..23449a2 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip networkTimeout=10000 +validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 65dcd68..1aa94a4 100755 --- a/gradlew +++ b/gradlew @@ -83,10 +83,8 @@ done # This is normally unused # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -133,10 +131,13 @@ location of your Java installation." fi else JAVACMD=java - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation." + fi fi # Increase the maximum file descriptors if we can. @@ -144,7 +145,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then case $MAX_FD in #( max*) # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 + # shellcheck disable=SC2039,SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac @@ -152,7 +153,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then '' | soft) :;; #( *) # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 + # shellcheck disable=SC2039,SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -197,11 +198,15 @@ if "$cygwin" || "$msys" ; then done fi -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. set -- \ "-Dorg.gradle.appname=$APP_BASE_NAME" \