Skip to content

Commit

Permalink
Merge pull request #1474 from Netflix/upgrade-gradle
Browse files Browse the repository at this point in the history
Upgrade to Gradle 7.5.1
  • Loading branch information
rpalcolea committed Nov 8, 2022
2 parents 6643795 + 8e1b180 commit eb14927
Show file tree
Hide file tree
Showing 11 changed files with 118 additions and 104 deletions.
8 changes: 4 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ buildscript {
}

dependencies {
classpath 'com.netflix.nebula:gradle-extra-configurations-plugin:2.2.+'
classpath 'com.netflix.nebula:gradle-extra-configurations-plugin:8.+'
}
}

plugins {
id 'nebula.netflixoss' version '9.1.0'
id 'org.gretty' version '2.1.0'
id 'com.netflix.nebula.netflixoss' version '11.1.1'
id 'org.gretty' version '4.0.3'
}

idea {
Expand Down Expand Up @@ -55,7 +55,7 @@ allprojects {
}

subprojects {
apply plugin: 'nebula.netflixoss'
apply plugin: 'com.netflix.nebula.netflixoss'
apply plugin: 'java'

group = "com.netflix.${githubProjectName}"
Expand Down
18 changes: 9 additions & 9 deletions eureka-client-archaius2/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apply plugin: 'nebula.test-jar'
apply plugin: 'java-library'

def archaius2Version = '2.1.7'

Expand All @@ -9,16 +9,16 @@ sourceSets {
}

dependencies {
compile project(':eureka-client')
api project(':eureka-client')

// archaius2
compile "com.netflix.archaius:archaius2-core:${archaius2Version}"
compile "com.netflix.archaius:archaius2-api:${archaius2Version}"
api "com.netflix.archaius:archaius2-core:${archaius2Version}"
api "com.netflix.archaius:archaius2-api:${archaius2Version}"

testCompile project(':eureka-test-utils')
testImplementation project(':eureka-test-utils')

testCompile "junit:junit:${junit_version}"
testCompile 'org.mortbay.jetty:jetty:6.1H.22'
testCompile "org.mockito:mockito-core:${mockitoVersion}"
testCompile "org.mock-server:mockserver-netty:${mockserverVersion}"
testImplementation "junit:junit:${junit_version}"
testImplementation 'org.mortbay.jetty:jetty:6.1H.22'
testImplementation "org.mockito:mockito-core:${mockitoVersion}"
testImplementation "org.mock-server:mockserver-netty:${mockserverVersion}"
}
18 changes: 9 additions & 9 deletions eureka-client-jersey3/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

apply plugin: 'nebula.test-jar'
apply plugin: 'java-library'

configurations.all {
// jersey1
Expand All @@ -24,18 +24,18 @@ configurations.all {
}

dependencies {
compile project(':eureka-client')
compile 'org.glassfish.jersey.core:jersey-client:3.0.5'
compile 'org.glassfish.jersey.inject:jersey-hk2:3.0.5'
compile 'org.glassfish.jersey.connectors:jersey-apache-connector:3.0.5'
api project(':eureka-client')
api 'org.glassfish.jersey.core:jersey-client:3.0.5'
api 'org.glassfish.jersey.inject:jersey-hk2:3.0.5'
api 'org.glassfish.jersey.connectors:jersey-apache-connector:3.0.5'

testCompile (project(':eureka-test-utils')) {
testImplementation (project(':eureka-test-utils')) {
// exclude all transitives to avoid bringing in jersey1 eureka-core
transitive = false
}
// bring in jersey3 compatible eureka-core-jersey3 directly
testCompile project(':eureka-core-jersey3')
testImplementation project(':eureka-core-jersey3')

testCompile "junit:junit:${junit_version}"
testCompile "org.mockito:mockito-core:${mockitoVersion}"
testImplementation "junit:junit:${junit_version}"
testImplementation "org.mockito:mockito-core:${mockitoVersion}"
}
48 changes: 24 additions & 24 deletions eureka-client/build.gradle
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
apply plugin: 'nebula.test-jar'
apply plugin: 'java-library'

configurations.all {
// jersey3
exclude group: 'org.glassfish.jersey'
}

dependencies {
compile "com.netflix.netflix-commons:netflix-eventbus:0.3.0"
compile 'com.thoughtworks.xstream:xstream:1.4.18'
compile "com.netflix.archaius:archaius-core:${archaiusVersion}"
compile 'jakarta.ws.rs:jakarta.ws.rs-api:3.0.0'
compile 'jakarta.inject:jakarta.inject-api:2.0.1'
compile 'jakarta.annotation:jakarta.annotation-api:2.1.0'
compile "com.netflix.servo:servo-core:${servoVersion}"
api "com.netflix.netflix-commons:netflix-eventbus:0.3.0"
api 'com.thoughtworks.xstream:xstream:1.4.18'
api "com.netflix.archaius:archaius-core:${archaiusVersion}"
api 'jakarta.ws.rs:jakarta.ws.rs-api:3.0.0'
api 'jakarta.inject:jakarta.inject-api:2.0.1'
api 'jakarta.annotation:jakarta.annotation-api:2.1.0'
api "com.netflix.servo:servo-core:${servoVersion}"
// compile "com.sun.jersey:jersey-core:${jerseyVersion}"
// compile "com.sun.jersey:jersey-client:${jerseyVersion}"
// compile "com.sun.jersey.contribs:jersey-apache-client4:${jerseyVersion}"
compile "org.apache.httpcomponents:httpclient:${apacheHttpClientVersion}"
compile "com.google.code.findbugs:jsr305:${jsr305Version}"
compile "commons-configuration:commons-configuration:${commonsConfigurationVersion}"
api "org.apache.httpcomponents:httpclient:${apacheHttpClientVersion}"
api "com.google.code.findbugs:jsr305:${jsr305Version}"
api "commons-configuration:commons-configuration:${commonsConfigurationVersion}"

compile "com.github.vlsi.compactmap:compactmap:2.0"
api "com.github.vlsi.compactmap:compactmap:2.0"

compile "com.fasterxml.jackson.core:jackson-annotations:${jacksonVersion}"
compile "com.fasterxml.jackson.core:jackson-core:${jacksonVersion}"
compile "com.fasterxml.jackson.core:jackson-databind:${jacksonDatabindVersion}"
api "com.fasterxml.jackson.core:jackson-annotations:${jacksonVersion}"
api "com.fasterxml.jackson.core:jackson-core:${jacksonVersion}"
api "com.fasterxml.jackson.core:jackson-databind:${jacksonDatabindVersion}"

// Eureka client uses JSON encoding by default
compileOnly "com.fasterxml.jackson.dataformat:jackson-dataformat-xml:${jacksonVersion}"
Expand All @@ -33,13 +33,13 @@ dependencies {

runtimeOnly "org.codehaus.jettison:jettison:${jettisonVersion}"

testCompile project(':eureka-test-utils')
testCompile "junit:junit:${junit_version}"
testCompile 'org.eclipse.jetty:jetty-server:11.0.11'
testCompile 'org.eclipse.jetty:jetty-servlet:11.0.11'
testCompile "org.mockito:mockito-core:${mockitoVersion}"
testCompile "org.mock-server:mockserver-netty:${mockserverVersion}"
testCompile "com.github.tomakehurst:wiremock-jre8:2.25.1"
testCompile "org.assertj:assertj-core:3.11.1"
testCompile "jakarta.servlet:jakarta.servlet-api:5.0.0"
testImplementation project(':eureka-test-utils')
testImplementation "junit:junit:${junit_version}"
testImplementation 'org.eclipse.jetty:jetty-server:11.0.11'
testImplementation 'org.eclipse.jetty:jetty-servlet:11.0.11'
testImplementation "org.mockito:mockito-core:${mockitoVersion}"
testImplementation "org.mock-server:mockserver-netty:${mockserverVersion}"
testImplementation "com.github.tomakehurst:wiremock-jre8:2.25.1"
testImplementation "org.assertj:assertj-core:3.11.1"
testImplementation "jakarta.servlet:jakarta.servlet-api:5.0.0"
}
22 changes: 12 additions & 10 deletions eureka-core-jersey3/build.gradle
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
apply plugin: 'java-library'

configurations.all {
exclude module: 'jsr311-api'
exclude group: 'com.sun.jersey'
exclude group: 'com.sun.jersey.contribs'
}

dependencies {
compile project(':eureka-core')
compile project(':eureka-client-jersey3')
compile 'org.glassfish.jersey.core:jersey-client:3.0.5'
compile 'org.glassfish.jersey.connectors:jersey-apache-connector:3.0.5'
api project(':eureka-core')
api project(':eureka-client-jersey3')
api 'org.glassfish.jersey.core:jersey-client:3.0.5'
api 'org.glassfish.jersey.connectors:jersey-apache-connector:3.0.5'

testCompile (project(':eureka-test-utils')) {
testImplementation (project(':eureka-test-utils')) {
// exclude all transitives to avoid bringing in jersey1 eureka-core
transitive = false
}
// bring in jersey3 compatible eureka-core-jersey3 directly
testCompile project(':eureka-core-jersey3')
testImplementation project(':eureka-core-jersey3')

testCompile "junit:junit:${junit_version}"
testCompile "org.mock-server:mockserver-netty:${mockserverVersion}"
testCompile "org.mockito:mockito-core:${mockitoVersion}"
testRuntime 'org.slf4j:slf4j-simple:1.7.10'
testImplementation "junit:junit:${junit_version}"
testImplementation "org.mock-server:mockserver-netty:${mockserverVersion}"
testImplementation "org.mockito:mockito-core:${mockitoVersion}"
testRuntimeOnly 'org.slf4j:slf4j-simple:1.7.10'
}
40 changes: 21 additions & 19 deletions eureka-core/build.gradle
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
apply plugin: 'java-library'

dependencies {
compile project(':eureka-client')
api project(':eureka-client')

compile "com.amazonaws:aws-java-sdk-core:${awsVersion}"
compile "com.amazonaws:aws-java-sdk-ec2:${awsVersion}"
compile "com.amazonaws:aws-java-sdk-autoscaling:${awsVersion}"
compile "com.amazonaws:aws-java-sdk-sts:${awsVersion}"
compile "com.amazonaws:aws-java-sdk-route53:${awsVersion}"
compile "jakarta.servlet:jakarta.servlet-api:${servletVersion}"
compile 'jakarta.inject:jakarta.inject-api:2.0.1'
compile 'com.thoughtworks.xstream:xstream:1.4.17'
api "com.amazonaws:aws-java-sdk-core:${awsVersion}"
api "com.amazonaws:aws-java-sdk-ec2:${awsVersion}"
api "com.amazonaws:aws-java-sdk-autoscaling:${awsVersion}"
api "com.amazonaws:aws-java-sdk-sts:${awsVersion}"
api "com.amazonaws:aws-java-sdk-route53:${awsVersion}"
api "jakarta.servlet:jakarta.servlet-api:${servletVersion}"
api 'jakarta.inject:jakarta.inject-api:2.0.1'
api 'com.thoughtworks.xstream:xstream:1.4.17'

// These dependencies are marked 'compileOnly' in the client, but we need them always on the server
compile "com.fasterxml.jackson.dataformat:jackson-dataformat-xml:${jacksonVersion}"
compile "com.fasterxml.woodstox:woodstox-core:${woodstoxVersion}"
api "com.fasterxml.jackson.dataformat:jackson-dataformat-xml:${jacksonVersion}"
api "com.fasterxml.woodstox:woodstox-core:${woodstoxVersion}"

testCompile project(':eureka-test-utils')
testCompile "junit:junit:${junit_version}"
testCompile 'org.eclipse.jetty:jetty-server:11.0.11'
testCompile 'org.eclipse.jetty:jetty-servlet:11.0.11'
testCompile "org.mock-server:mockserver-netty:${mockserverVersion}"
testCompile "com.jcraft:jzlib:1.1.3" // netty dependency
testCompile "org.mockito:mockito-core:${mockitoVersion}"
testRuntime 'org.slf4j:slf4j-simple:1.7.10'
testImplementation project(':eureka-test-utils')
testImplementation "junit:junit:${junit_version}"
testImplementation 'org.eclipse.jetty:jetty-server:11.0.11'
testImplementation 'org.eclipse.jetty:jetty-servlet:11.0.11'
testImplementation "org.mock-server:mockserver-netty:${mockserverVersion}"
testImplementation "com.jcraft:jzlib:1.1.3" // netty dependency
testImplementation "org.mockito:mockito-core:${mockitoVersion}"
testRuntimeOnly 'org.slf4j:slf4j-simple:1.7.10'
}
21 changes: 15 additions & 6 deletions eureka-examples/build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
apply plugin: 'application'

dependencies {
compile project(':eureka-client')
compile files('conf')
compile 'jakarta.inject:jakarta.inject-api:2.0.1'
implementation project(':eureka-client')
implementation files('conf')
implementation 'jakarta.inject:jakarta.inject-api:2.0.1'

runtimeOnly 'org.slf4j:slf4j-simple:1.7.7'
}
Expand Down Expand Up @@ -43,23 +43,23 @@ task ExampleServiceStartScript(type: CreateStartScripts) {
mainClassName = "com.netflix.eureka.ExampleEurekaService"
applicationName = "ExampleEurekaService"
outputDir = new File(project.buildDir, 'scripts')
classpath = jar.outputs.files + project.configurations.runtime
classpath = jar.outputs.files + project.configurations.runtimeClasspath
defaultJvmOpts = ["-Deureka.client.props=sample-eureka-service"]
}

task ExampleGovernatedServiceStartScript(type: CreateStartScripts) {
mainClassName = "com.netflix.eureka.ExampleEurekaGovernatedService"
applicationName = "ExampleEurekaGovernatedService"
outputDir = new File(project.buildDir, 'scripts')
classpath = jar.outputs.files + project.configurations.runtime
classpath = jar.outputs.files + project.configurations.runtimeClasspath
defaultJvmOpts = ["-Deureka.client.props=sample-eureka-service"]
}

task ExampleClientStartScript(type: CreateStartScripts) {
mainClassName = "com.netflix.eureka.ExampleEurekaClient"
applicationName = "ExampleEurekaClient"
outputDir = new File(project.buildDir, 'scripts')
classpath = jar.outputs.files + project.configurations.runtime
classpath = jar.outputs.files + project.configurations.runtimeClasspath
defaultJvmOpts = ["-Deureka.client.props=sample-eureka-client"]
}

Expand All @@ -78,3 +78,12 @@ applicationDistribution.into("lib/conf") {
from("conf")
fileMode = 0755
}

tasks.withType(Tar).configureEach {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}

tasks.withType(Zip).configureEach {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}

22 changes: 11 additions & 11 deletions eureka-server/build.gradle
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
apply plugin: 'war'

dependencies {
compile project(':eureka-client-jersey3')
compile project(':eureka-core-jersey3')
// compile "com.sun.jersey:jersey-server:$jerseyVersion"
// compile "com.sun.jersey:jersey-servlet:$jerseyVersion"
compile 'org.slf4j:slf4j-log4j12:1.6.1'
compile 'org.glassfish.jaxb:jaxb-runtime:2.3.3'
implementation project(':eureka-client-jersey3')
implementation project(':eureka-core-jersey3')
// implementation "com.sun.jersey:jersey-server:$jerseyVersion"
// implementation "com.sun.jersey:jersey-servlet:$jerseyVersion"
implementation 'org.slf4j:slf4j-log4j12:1.6.1'
implementation 'org.glassfish.jaxb:jaxb-runtime:2.3.3'

runtimeOnly 'xerces:xercesImpl:2.12.0'
runtimeOnly 'org.codehaus.jettison:jettison:1.2'

providedCompile "jakarta.servlet:jakarta.servlet-api:$servletVersion"

testCompile project(':eureka-test-utils')
testCompile "org.mockito:mockito-core:${mockitoVersion}"
testCompile "org.eclipse.jetty:jetty-server:$jetty_version"
testCompile "org.eclipse.jetty:jetty-webapp:$jetty_version"
testImplementation project(':eureka-test-utils')
testImplementation "org.mockito:mockito-core:${mockitoVersion}"
testImplementation "org.eclipse.jetty:jetty-server:$jetty_version"
testImplementation "org.eclipse.jetty:jetty-webapp:$jetty_version"
}

task copyLibs(type: Copy) {
into 'testlibs/WEB-INF/libs'
from configurations.runtime
from configurations.runtimeClasspath
}

war {
Expand Down
7 changes: 4 additions & 3 deletions eureka-test-utils/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
apply plugin: 'java-library'
dependencies {
compile project(':eureka-core-jersey3')
compile "junit:junit:${junit_version}"
compile "org.mockito:mockito-core:${mockitoVersion}"
api project(':eureka-core-jersey3')
api "junit:junit:${junit_version}"
api "org.mockito:mockito-core:${mockitoVersion}"
}
16 changes: 8 additions & 8 deletions eureka-tests/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@
*/

dependencies {
testCompile project(':eureka-core-jersey3')
testImplementation project(':eureka-core-jersey3')

testCompile (project(':eureka-test-utils')) {
testImplementation (project(':eureka-test-utils')) {
// exclude all transitives to avoid bringing in jersey1 eureka-core
transitive = false
}

testCompile project(':eureka-test-utils')
testCompile "junit:junit:${junit_version}"
testCompile "org.mockito:mockito-core:${mockitoVersion}"
testCompile 'org.eclipse.jetty:jetty-server:11.0.11'
testCompile 'org.eclipse.jetty:jetty-servlet:11.0.11'
testRuntime 'org.slf4j:slf4j-simple:2.0.0-beta1'
testImplementation project(':eureka-test-utils')
testImplementation "junit:junit:${junit_version}"
testImplementation "org.mockito:mockito-core:${mockitoVersion}"
testImplementation 'org.eclipse.jetty:jetty-server:11.0.11'
testImplementation 'org.eclipse.jetty:jetty-servlet:11.0.11'
testImplementation 'org.slf4j:slf4j-simple:2.0.0-beta1'

}
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,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-7.5.1-bin.zip

0 comments on commit eb14927

Please sign in to comment.