Skip to content

Commit

Permalink
Merge pull request #1365 from mattrjacobs/upgrade-nebula-and-gradle
Browse files Browse the repository at this point in the history
Upgrade to Gradle 3.1 / Nebula 3.4.0
  • Loading branch information
mattrjacobs authored Sep 27, 2016
2 parents 9433411 + 14df0f4 commit 02b8be7
Show file tree
Hide file tree
Showing 16 changed files with 35 additions and 60 deletions.
31 changes: 3 additions & 28 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ buildscript {
}

plugins {
id 'nebula.netflixoss' version '3.3.0'
id 'nebula.netflixoss' version '3.4.0'
id 'me.champeau.gradle.jmh' version '0.2.0'
id 'net.saliman.cobertura' version '2.2.8'
}
Expand All @@ -29,7 +29,8 @@ subprojects {
apply plugin: 'nebula.netflixoss'
apply plugin: 'java'
apply plugin: 'nebula.provided-base'

apply plugin: 'nebula.compile-api'

sourceCompatibility = 1.6
targetCompatibility = 1.6

Expand All @@ -52,30 +53,4 @@ subprojects {
scopes.COMPILE.plus += [configurations.provided]
}
}

//mark all first-level dependencies as 'compile' in generated POM
//except for 'servlet-api', which should be 'provided'
publishing {
publications {
nebula(MavenPublication) {
if (!project.name.equals("hystrix-dashboard") && !project.name.equals("hystrix-examples-webapp")) {
pom.withXml {
configurations.compile.resolvedConfiguration.firstLevelModuleDependencies.each { dep ->
if (dep.moduleName == "servlet-api") {
asNode().dependencies[0].dependency.find {
it.artifactId[0].text() == dep.moduleName &&
it.groupId[0].text() == dep.moduleGroup
}.scope[0].value = 'provided'
} else {
asNode().dependencies[0].dependency.find {
it.artifactId[0].text() == dep.moduleName &&
it.groupId[0].text() == dep.moduleGroup
}.scope[0].value = 'compile'
}
}
}
}
}
}
}
}
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-2.14-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-3.1-all.zip
2 changes: 1 addition & 1 deletion hystrix-contrib/hystrix-clj/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ repositories {
}

dependencies {
compile project(':hystrix-core')
compileApi project(':hystrix-core')
compile 'org.clojure:clojure:1.7.0'
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies {
compile project(':hystrix-core')
compile 'io.dropwizard.metrics:metrics-core:3.1.2'
compileApi project(':hystrix-core')
compileApi 'io.dropwizard.metrics:metrics-core:3.1.2'
testCompile 'junit:junit-dep:4.10'
testCompile 'org.mockito:mockito-all:1.9.5'
}
8 changes: 4 additions & 4 deletions hystrix-contrib/hystrix-javanica/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -94,16 +94,16 @@ task ajcJar(type: Jar) {
assemble.dependsOn(jar, ajcJar)

dependencies {
compile project(':hystrix-core')
compileApi project(':hystrix-core')
ajtools "org.aspectj:aspectjtools:$aspectjVersion"
testRuntime "org.aspectj:aspectjrt:$aspectjVersion"
compile "org.aspectj:aspectjweaver:$aspectjVersion"
compileApi "org.aspectj:aspectjweaver:$aspectjVersion"
compile "org.aspectj:aspectjrt:$aspectjVersion"

compile 'com.google.guava:guava:15.0'
compileApi 'com.google.guava:guava:15.0'
compile 'commons-collections:commons-collections:3.2.2'
compile 'org.apache.commons:commons-lang3:3.1'
compile 'com.google.code.findbugs:jsr305:2.0.0'
compileApi 'com.google.code.findbugs:jsr305:2.0.0'
compile 'org.ow2.asm:asm:5.0.4'
testCompile group: 'junit', name: 'junit', version: '4.12'
testCompile 'pl.pragmatists:JUnitParams:1.0.5'
Expand Down
4 changes: 2 additions & 2 deletions hystrix-contrib/hystrix-junit/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
dependencies {
compile project(':hystrix-core')
compile "junit:junit:4.11"
compileApi project(':hystrix-core')
compileApi "junit:junit:4.11"
}
2 changes: 1 addition & 1 deletion hystrix-contrib/hystrix-metrics-event-stream/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
dependencies {
compile project(':hystrix-core')
compileApi project(':hystrix-core')
compile project(':hystrix-serialization')
provided 'javax.servlet:servlet-api:2.5'
testCompile 'junit:junit-dep:4.10'
Expand Down
2 changes: 1 addition & 1 deletion hystrix-contrib/hystrix-network-auditor-agent/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
dependencies {
compile 'org.javassist:javassist:3.19+'
compileApi 'org.javassist:javassist:3.19+'

jar {
// make a fatjar otherwise it's painful getting the boot-class-path correct when deploying
Expand Down
2 changes: 1 addition & 1 deletion hystrix-contrib/hystrix-request-servlet/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
dependencies {
compile project(':hystrix-core')
compileApi project(':hystrix-core')
provided 'javax.servlet:servlet-api:2.5'
}
4 changes: 2 additions & 2 deletions hystrix-contrib/hystrix-rx-netty-metrics-stream/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
dependencies {
compile project(':hystrix-core')
compileApi project(':hystrix-core')
compile project(':hystrix-serialization')
compile 'io.reactivex:rxnetty:0.4.17'
compileApi 'io.reactivex:rxnetty:0.4.17'
testCompile 'junit:junit-dep:4.10'
testCompile 'org.powermock:powermock-easymock-release-full:1.5.5'
testCompile 'org.easymock:easymock:3.2'
Expand Down
4 changes: 2 additions & 2 deletions hystrix-contrib/hystrix-servo-metrics-publisher/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies {
compile project(':hystrix-core')
compile 'com.netflix.servo:servo-core:0.7.5'
compileApi project(':hystrix-core')
compileApi 'com.netflix.servo:servo-core:0.7.5'
testCompile 'junit:junit-dep:4.10'
testCompile 'org.mockito:mockito-all:1.9.5'
}
4 changes: 2 additions & 2 deletions hystrix-contrib/hystrix-yammer-metrics-publisher/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
dependencies {
compile project(':hystrix-core')
compile 'com.yammer.metrics:metrics-core:2.2.0'
compileApi project(':hystrix-core')
compileApi 'com.yammer.metrics:metrics-core:2.2.0'
}
6 changes: 3 additions & 3 deletions hystrix-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ apply plugin: 'osgi'
apply plugin: 'me.champeau.gradle.jmh'

dependencies {
compile 'com.netflix.archaius:archaius-core:0.4.1'
compile 'io.reactivex:rxjava:1.2.0'
compileApi 'com.netflix.archaius:archaius-core:0.4.1'
compileApi 'io.reactivex:rxjava:1.2.0'
compile 'org.slf4j:slf4j-api:1.7.0'
compile 'org.hdrhistogram:HdrHistogram:2.1.9'
compileApi 'org.hdrhistogram:HdrHistogram:2.1.9'
testCompile 'junit:junit-dep:4.10'
testCompile project(':hystrix-junit')
}
Expand Down
8 changes: 4 additions & 4 deletions hystrix-examples-webapp/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ apply plugin: 'war'
apply plugin: 'jetty'

dependencies {
compile project(':hystrix-core')
compile project(':hystrix-examples')
compile project(':hystrix-request-servlet')
compile project(':hystrix-metrics-event-stream')
compileApi project(':hystrix-core')
compileApi project(':hystrix-examples')
compileApi project(':hystrix-request-servlet')
compileApi project(':hystrix-metrics-event-stream')
}

jettyRun {
Expand Down
2 changes: 1 addition & 1 deletion hystrix-examples/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apply plugin: 'osgi'

dependencies {
compile project(':hystrix-core')
compileApi project(':hystrix-core')
provided 'junit:junit-dep:4.10'
}

Expand Down
10 changes: 5 additions & 5 deletions hystrix-serialization/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ sourceCompatibility = JavaVersion.VERSION_1_6
targetCompatibility = JavaVersion.VERSION_1_6

dependencies {
compile project(':hystrix-core')
compileApi project(':hystrix-core')

//if we bump into the the 2.8.0 series, we are forced to use Java7
compile 'com.fasterxml.jackson.core:jackson-core:2.7.5'
compile 'com.fasterxml.jackson.core:jackson-databind:2.7.5'
compile 'com.fasterxml.jackson.core:jackson-annotations:2.7.5'
compileApi 'com.fasterxml.jackson.core:jackson-core:2.7.5'
compileApi 'com.fasterxml.jackson.core:jackson-databind:2.7.5'
compileApi 'com.fasterxml.jackson.core:jackson-annotations:2.7.5'
compile 'com.fasterxml.jackson.module:jackson-module-afterburner:2.7.5'
compile 'com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:2.7.5'
compileApi 'com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:2.7.5'

testCompile 'junit:junit-dep:4.10'
testCompile 'org.mockito:mockito-all:1.9.5'
Expand Down

0 comments on commit 02b8be7

Please sign in to comment.