From 45734a9029e86e67b3707c1618f53dd8a1a3780d Mon Sep 17 00:00:00 2001 From: Roberto Perez Alcolea Date: Thu, 18 Jan 2024 17:22:30 -0800 Subject: [PATCH] Upgrade to modern Gradle --- .github/workflows/nebula-ci.yml | 4 + .github/workflows/nebula-publish.yml | 4 + .github/workflows/nebula-snapshot.yml | 4 + build.gradle | 105 +++++++++++------------ gradle/wrapper/gradle-wrapper.properties | 2 +- priam-dse-extensions/build.gradle | 3 +- priam-web/build.gradle | 8 +- 7 files changed, 70 insertions(+), 60 deletions(-) diff --git a/.github/workflows/nebula-ci.yml b/.github/workflows/nebula-ci.yml index 314ca6f5b..197701b89 100644 --- a/.github/workflows/nebula-ci.yml +++ b/.github/workflows/nebula-ci.yml @@ -17,6 +17,10 @@ jobs: name: CI with Java ${{ matrix.java }} steps: - uses: actions/checkout@v1 + - name: Setup git user + run: | + git config --global user.name "NetflixOss Maintainers" + git config --global user.email "netflix-oss@netflix.com" - name: Setup jdk uses: actions/setup-java@v1 with: diff --git a/.github/workflows/nebula-publish.yml b/.github/workflows/nebula-publish.yml index 5e20218a1..423b4a950 100644 --- a/.github/workflows/nebula-publish.yml +++ b/.github/workflows/nebula-publish.yml @@ -13,6 +13,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 + - name: Setup git user + run: | + git config --global user.name "NetflixOss Maintainers" + git config --global user.email "netflix-oss@netflix.com" - name: Setup jdk 8 uses: actions/setup-java@v1 with: diff --git a/.github/workflows/nebula-snapshot.yml b/.github/workflows/nebula-snapshot.yml index b4ee74093..a90490217 100644 --- a/.github/workflows/nebula-snapshot.yml +++ b/.github/workflows/nebula-snapshot.yml @@ -12,6 +12,10 @@ jobs: - uses: actions/checkout@v2 with: fetch-depth: 0 + - name: Setup git user + run: | + git config --global user.name "NetflixOss Maintainers" + git config --global user.email "netflix-oss@netflix.com" - name: Set up JDK uses: actions/setup-java@v1 with: diff --git a/build.gradle b/build.gradle index 5ae51364f..f74912ddb 100644 --- a/build.gradle +++ b/build.gradle @@ -1,11 +1,7 @@ plugins { - id 'nebula.netflixoss' version '9.1.0' - id 'com.github.sherter.google-java-format' version '0.8' + id 'nebula.netflixoss' version '11.5.0' } -googleJavaFormat { - options style: 'AOSP' -} ext.githubProjectName = 'Priam' @@ -26,62 +22,65 @@ allprojects { } dependencies { - compile 'org.apache.commons:commons-lang3:3.8.1' - compile 'org.apache.commons:commons-text:1.8' - compile 'commons-logging:commons-logging:1.2' - compile 'org.apache.commons:commons-collections4:4.2' - compile 'commons-io:commons-io:2.6' - compile 'commons-cli:commons-cli:1.4' - compile 'com.sun.jersey.contribs:jersey-multipart:1.19.4' - compile 'com.sun.jersey:jersey-json:1.19.4' - compile 'com.sun.jersey:jersey-bundle:1.19.4' - compile 'com.sun.jersey.contribs:jersey-guice:1.19.4' - compile 'com.google.guava:guava:21.0' - compile 'com.google.code.findbugs:jsr305:3.0.2' + implementation 'org.apache.commons:commons-lang3:3.8.1' + implementation 'org.apache.commons:commons-text:1.8' + implementation 'commons-logging:commons-logging:1.2' + implementation 'org.apache.commons:commons-collections4:4.2' + implementation 'commons-io:commons-io:2.6' + implementation 'commons-cli:commons-cli:1.4' + implementation 'com.sun.jersey.contribs:jersey-multipart:1.19.4' + implementation 'com.sun.jersey:jersey-json:1.19.4' + implementation 'com.sun.jersey:jersey-bundle:1.19.4' + implementation 'com.sun.jersey.contribs:jersey-guice:1.19.4' + implementation 'com.google.guava:guava:21.0' + implementation 'com.google.code.findbugs:jsr305:3.0.2' // AWS Services - compile 'com.amazonaws:aws-java-sdk-core:latest.release' - compile 'com.amazonaws:aws-java-sdk-s3:latest.release' - compile 'com.amazonaws:aws-java-sdk-sns:latest.release' - compile 'com.amazonaws:aws-java-sdk-ec2:latest.release' - compile 'com.amazonaws:aws-java-sdk-autoscaling:latest.release' - compile 'com.amazonaws:aws-java-sdk-sts:latest.release' - compile 'com.amazonaws:aws-java-sdk-simpledb:latest.release' + implementation 'com.amazonaws:aws-java-sdk-core:latest.release' + implementation 'com.amazonaws:aws-java-sdk-s3:latest.release' + implementation 'com.amazonaws:aws-java-sdk-sns:latest.release' + implementation 'com.amazonaws:aws-java-sdk-ec2:latest.release' + implementation 'com.amazonaws:aws-java-sdk-autoscaling:latest.release' + implementation 'com.amazonaws:aws-java-sdk-sts:latest.release' + implementation 'com.amazonaws:aws-java-sdk-simpledb:latest.release' - compile 'com.google.inject:guice:4.2.2' - compile 'com.google.inject.extensions:guice-servlet:4.2.2' - compile 'org.quartz-scheduler:quartz:2.3.0' - compile 'com.googlecode.json-simple:json-simple:1.1.1' - compile 'org.xerial.snappy:snappy-java:1.1.7.3' - compile 'org.yaml:snakeyaml:1.25' - compile 'org.apache.cassandra:cassandra-all:3.0.17' - compile 'javax.ws.rs:jsr311-api:1.1.1' - compile 'joda-time:joda-time:2.10.1' - compile 'org.apache.commons:commons-configuration2:2.4' - compile 'xerces:xercesImpl:2.12.0' - compile 'net.java.dev.jna:jna:5.2.0' - compile 'org.apache.httpcomponents:httpclient:4.5.6' - compile 'org.apache.httpcomponents:httpcore:4.4.11' - compile 'com.ning:compress-lzf:1.0.4' - compile 'com.google.code.gson:gson:2.8.5' - compile 'org.slf4j:slf4j-api:1.7.28' - compile 'org.slf4j:slf4j-log4j12:1.7.28' - compile 'org.bouncycastle:bcprov-jdk16:1.46' - compile 'org.bouncycastle:bcpg-jdk16:1.46' - compile ('com.google.appengine.tools:appengine-gcs-client:0.8') { + implementation 'com.google.inject:guice:4.2.2' + implementation 'com.google.inject.extensions:guice-servlet:4.2.2' + implementation 'org.quartz-scheduler:quartz:2.3.0' + implementation 'com.googlecode.json-simple:json-simple:1.1.1' + implementation 'org.xerial.snappy:snappy-java:1.1.7.3' + implementation 'org.yaml:snakeyaml:1.25' + implementation 'org.apache.cassandra:cassandra-all:3.0.17' + implementation 'javax.ws.rs:jsr311-api:1.1.1' + implementation 'joda-time:joda-time:2.10.1' + implementation 'org.apache.commons:commons-configuration2:2.4' + implementation 'xerces:xercesImpl:2.12.0' + implementation 'net.java.dev.jna:jna:5.2.0' + implementation 'org.apache.httpcomponents:httpclient:4.5.6' + implementation 'org.apache.httpcomponents:httpcore:4.4.11' + implementation 'com.ning:compress-lzf:1.0.4' + implementation 'com.google.code.gson:gson:2.8.5' + implementation 'org.slf4j:slf4j-api:1.7.28' + implementation 'org.slf4j:slf4j-log4j12:1.7.28' + implementation 'org.bouncycastle:bcprov-jdk16:1.46' + implementation 'org.bouncycastle:bcpg-jdk16:1.46' + implementation ('com.google.appengine.tools:appengine-gcs-client:0.8') { exclude module: 'guava' } - compile 'com.google.apis:google-api-services-storage:v1-rev141-1.25.0' - compile 'com.google.http-client:google-http-client-jackson2:1.28.0' - compile 'com.netflix.spectator:spectator-api:0.96.0' + implementation 'com.google.apis:google-api-services-storage:v1-rev141-1.25.0' + implementation 'com.google.http-client:google-http-client-jackson2:1.28.0' + implementation 'com.netflix.spectator:spectator-api:0.96.0' compileOnly 'javax.servlet:javax.servlet-api:3.1.0' - testCompile 'org.jmockit:jmockit:1.38' - testCompile "org.spockframework:spock-core:1.1-groovy-2.4" - testCompile "com.google.truth:truth:1.0.1" + testImplementation 'org.jmockit:jmockit:1.38' + testImplementation "org.spockframework:spock-core:1.1-groovy-2.4" + testImplementation "com.google.truth:truth:1.0.1" testImplementation 'org.junit.jupiter:junit-jupiter-api:5.3.1' testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.3.1' } - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 + java { + toolchain { + languageVersion = JavaLanguageVersion.of(8) + } + } } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 68ca99ac4..559efb4c8 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip diff --git a/priam-dse-extensions/build.gradle b/priam-dse-extensions/build.gradle index 6b49ae610..bb87b947b 100644 --- a/priam-dse-extensions/build.gradle +++ b/priam-dse-extensions/build.gradle @@ -1,4 +1,3 @@ dependencies { - compile project(':priam') - testCompile project(path: ':priam') + implementation project(':priam') } diff --git a/priam-web/build.gradle b/priam-web/build.gradle index 9aa4d911f..67a43375e 100644 --- a/priam-web/build.gradle +++ b/priam-web/build.gradle @@ -1,11 +1,11 @@ plugins { - id 'org.akhikhl.gretty' version '1.4.2' + id 'org.gretty' version '3.1.0' } apply plugin: 'war' dependencies { - compile project(':priam') - compile project(':priam-dse-extensions') - compile project(':priam-cass-extensions') + implementation project(':priam') + implementation project(':priam-dse-extensions') + implementation project(':priam-cass-extensions') }