Skip to content

Commit

Permalink
Upgrade to gradle 8.4
Browse files Browse the repository at this point in the history
  • Loading branch information
valenad1 committed Apr 12, 2024
1 parent 0dcd2cb commit fe2dc22
Show file tree
Hide file tree
Showing 16 changed files with 22 additions and 20 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ buildscript {
//noinspection GroovyAssignabilityCheck
dependencies {
classpath 'org.ow2.asm:asm:5.1'
classpath 'gradle.plugin.com.github.jengelman.gradle.plugins:shadow:7.0.0'
classpath 'com.github.johnrengelman:shadow:8.1.1'
classpath 'org.gradle.api.plugins:gradle-nexus-plugin:0.7.1'
classpath 'org.testng:testng:6.8'
classpath 'me.champeau.gradle:jmh-gradle-plugin:0.5.2'
Expand Down
10 changes: 5 additions & 5 deletions gradle/copyJars.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
tasks.withType(Jar) { Jar t ->
t.doLast {
copy {
from t.archivePath
into t.destinationDir
from t.archiveFile
into t.destinationDirectory
// Here we expected standard JAR file archive name:
// [baseName]-[appendix]-[version]-[classifier].[extension]
if (t.classifier!=null) {
rename("(.*)-${t.version}(.*)", '$1$2')
if (t.archiveClassifier!=null) {
rename("(.*)-${t.archiveVersion.get()}(.*)", '$1$2')
} else {
rename("(.*)${t.version}-?(.*)", '$1$2')
rename("(.*)${t.archiveVersion.get()}-?(.*)", '$1$2')
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion gradle/java.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ compileJava {
}

task testJar(type: Jar, dependsOn: testClasses, group: "build") {
classifier = 'test'
archiveClassifier.set('test')
from sourceSets.test.output
}

Expand Down
2 changes: 1 addition & 1 deletion gradle/javaIgnoreSymbolFile.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ compileJava {
// This only works when forking and passing 'javac' as an executable
options.compilerArgs << '-XDignore.symbol.file'
options.fork = true
options.forkOptions.executable = 'javac'
options.forkOptions.executable = "${System.properties['java.home']}/../bin/javac"
}
2 changes: 1 addition & 1 deletion gradle/publish.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apply plugin: 'signing'

// Default task to bundle sources code as jar
task sourcesJar(type: Jar) {
classifier = 'sources'
archiveClassifier.set('sources')
from sourceSets.main.allSource
}

Expand Down
2 changes: 1 addition & 1 deletion gradle/ubench.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ task jmhPostProcess(dependsOn: "jmh") {
}

task jmhFatJar(type: ShadowJar) {
classifier = "jmh"
archiveClassifier.set('jmh')
manifest {
attributes "Main-Class": "org.openjdk.jmh.Main"
}
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 1 addition & 1 deletion h2o-assemblies/genmodel/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ for (comp in optionalComponents) {

shadowJar {
mergeServiceFiles()
classifier = ''
archiveClassifier.set('')
relocate 'com.google.gson', 'ai.h2o.com.google.gson' // Should be eventually removed: https://github.com/h2oai/h2o-3/issues/12372
relocate 'org.apache.commons.text', 'ai.h2o.org.apache.commons.text'
relocate 'org.apache.commons.lang3', 'ai.h2o.org.apache.commons.lang3'
Expand Down
2 changes: 1 addition & 1 deletion h2o-assemblies/main/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ dependencies {
shadowJar {
zip64 true
mergeServiceFiles()
classifier = ''
archiveClassifier.set('')
// CDH 5.3.0 provides joda-time v1.6 which is too old, shadow the library instead
if (!project.hasProperty("jacocoCoverage")) {
relocate 'org.joda.time', 'ai.h2o.org.joda.time'
Expand Down
2 changes: 1 addition & 1 deletion h2o-assemblies/minimal/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ dependencies {

shadowJar {
mergeServiceFiles()
classifier = ''
archiveClassifier.set('')
exclude 'META-INF/*.DSA'
exclude 'META-INF/*.SF'
exclude 'synchronize.properties'
Expand Down
2 changes: 1 addition & 1 deletion h2o-assemblies/steam/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ dependencies {

shadowJar {
mergeServiceFiles()
classifier = ''
archiveClassifier.set('')
exclude 'META-INF/*.DSA'
exclude 'META-INF/*.SF'
exclude 'synchronize.properties'
Expand Down
4 changes: 2 additions & 2 deletions h2o-hadoop-2/assemblyjar.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ shadowJar {
relocate 'org.apache.http', 'ai.h2o.org.apache.http'
exclude hadoopShadowJarExcludes
relocate 'com.google.common', 'ai.h2o.com.google.common'
baseName = 'h2odriver'
classifier = ''
archiveBaseName.set('h2odriver')
archiveClassifier.set('')
manifest {
attributes 'Main-Class': 'water.hadoop.h2odriver'
}
Expand Down
4 changes: 2 additions & 2 deletions h2o-hadoop-3/assemblyjar_common.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ shadowJar {
exclude hadoopShadowJarExcludes
relocate 'com.google.common', 'ai.h2o.com.google.common'
relocate 'org.eclipse.jetty', 'ai.h2o.org.eclipse.jetty'
baseName = 'h2odriver'
classifier = ''
archiveBaseName.set('h2odriver')
archiveClassifier.set('')
manifest {
attributes 'Main-Class': 'water.hadoop.h2odriver'
}
Expand Down
2 changes: 1 addition & 1 deletion h2o-k8s-comp/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ dependencies {

shadowJar {
mergeServiceFiles()
classifier = ''
archiveClassifier.set('')
exclude 'META-INF/*.DSA'
exclude 'META-INF/*.SF'
exclude 'synchronize.properties'
Expand Down
1 change: 1 addition & 0 deletions h2o-py-cloud-extensions/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,6 @@ task cleanBuild(type: Delete) {
//
// Define the dependencies
//
jar.dependsOn copySrcFiles
clean.dependsOn cleanBuild, cleanUpTestResults
build.dependsOn copyMainDist
1 change: 1 addition & 0 deletions h2o-py-mlflow-flavor/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,6 @@ task cleanBuild(type: Delete) {
//
// Define the dependencies
//
jar.dependsOn copySrcFiles
clean.dependsOn cleanBuild
build.dependsOn copyMainDist

0 comments on commit fe2dc22

Please sign in to comment.