diff --git a/.github/workflows/nebula-ci.yml b/.github/workflows/nebula-ci.yml new file mode 100644 index 000000000..9150ee402 --- /dev/null +++ b/.github/workflows/nebula-ci.yml @@ -0,0 +1,45 @@ +name: "CI" +on: + push: + branches: + - '*' + tags-ignore: + - '*' + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + # test against JDK 8 + java: [ 8 ] + name: CI with Java ${{ matrix.java }} + steps: + - uses: actions/checkout@v1 + - name: Setup jdk + uses: actions/setup-java@v1 + with: + java-version: ${{ matrix.java }} + - uses: actions/cache@v1 + id: gradle-cache + with: + path: ~/.gradle/caches + key: ${{ runner.os }}-gradle-${{ hashFiles('**/gradle/dependency-locks/*.lockfile') }} + restore-keys: | + - ${{ runner.os }}-gradle- + - uses: actions/cache@v1 + id: gradle-wrapper-cache + with: + path: ~/.gradle/wrapper + key: ${{ runner.os }}-gradlewrapper-${{ hashFiles('gradle/wrapper/*') }} + restore-keys: | + - ${{ runner.os }}-gradlewrapper- + - name: Build with Gradle + run: ./gradlew --info --stacktrace build + env: + CI_NAME: github_actions + CI_BUILD_NUMBER: ${{ github.sha }} + CI_BUILD_URL: 'https://github.com/${{ github.repository }}' + CI_BRANCH: ${{ github.ref }} + COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/nebula-publish.yml b/.github/workflows/nebula-publish.yml new file mode 100644 index 000000000..5e20218a1 --- /dev/null +++ b/.github/workflows/nebula-publish.yml @@ -0,0 +1,51 @@ +name: "Publish candidate/release to NetflixOSS and Maven Central" +on: + push: + tags: + - v*.*.* + - v*.*.*-rc.* + release: + types: + - published + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: Setup jdk 8 + uses: actions/setup-java@v1 + with: + java-version: 1.8 + - uses: actions/cache@v1 + id: gradle-cache + with: + path: ~/.gradle/caches + key: ${{ runner.os }}-gradle-${{ hashFiles('**/gradle/dependency-locks/*.lockfile') }} + restore-keys: | + - ${{ runner.os }}-gradle- + - uses: actions/cache@v1 + id: gradle-wrapper-cache + with: + path: ~/.gradle/wrapper + key: ${{ runner.os }}-gradlewrapper-${{ hashFiles('gradle/wrapper/*') }} + restore-keys: | + - ${{ runner.os }}-gradlewrapper- + - name: Publish candidate + if: contains(github.ref, '-rc.') + run: ./gradlew --info --stacktrace -Prelease.useLastTag=true candidate + env: + NETFLIX_OSS_SIGNING_KEY: ${{ secrets.ORG_SIGNING_KEY }} + NETFLIX_OSS_SIGNING_PASSWORD: ${{ secrets.ORG_SIGNING_PASSWORD }} + NETFLIX_OSS_REPO_USERNAME: ${{ secrets.ORG_NETFLIXOSS_USERNAME }} + NETFLIX_OSS_REPO_PASSWORD: ${{ secrets.ORG_NETFLIXOSS_PASSWORD }} + - name: Publish release + if: (!contains(github.ref, '-rc.')) + run: ./gradlew --info -Prelease.useLastTag=true final + env: + NETFLIX_OSS_SONATYPE_USERNAME: ${{ secrets.ORG_SONATYPE_USERNAME }} + NETFLIX_OSS_SONATYPE_PASSWORD: ${{ secrets.ORG_SONATYPE_PASSWORD }} + NETFLIX_OSS_SIGNING_KEY: ${{ secrets.ORG_SIGNING_KEY }} + NETFLIX_OSS_SIGNING_PASSWORD: ${{ secrets.ORG_SIGNING_PASSWORD }} + NETFLIX_OSS_REPO_USERNAME: ${{ secrets.ORG_NETFLIXOSS_USERNAME }} + NETFLIX_OSS_REPO_PASSWORD: ${{ secrets.ORG_NETFLIXOSS_PASSWORD }} diff --git a/.github/workflows/nebula-snapshot.yml b/.github/workflows/nebula-snapshot.yml new file mode 100644 index 000000000..b4ee74093 --- /dev/null +++ b/.github/workflows/nebula-snapshot.yml @@ -0,0 +1,37 @@ +name: "Publish snapshot to NetflixOSS and Maven Central" + +on: + push: + branches: + - master + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Set up JDK + uses: actions/setup-java@v1 + with: + java-version: 8 + - uses: actions/cache@v2 + id: gradle-cache + with: + path: | + ~/.gradle/caches + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} + - uses: actions/cache@v2 + id: gradle-wrapper-cache + with: + path: | + ~/.gradle/wrapper + key: ${{ runner.os }}-gradlewrapper-${{ hashFiles('gradle/wrapper/*') }} + - name: Build + run: ./gradlew build snapshot + env: + NETFLIX_OSS_SIGNING_KEY: ${{ secrets.ORG_SIGNING_KEY }} + NETFLIX_OSS_SIGNING_PASSWORD: ${{ secrets.ORG_SIGNING_PASSWORD }} + NETFLIX_OSS_REPO_USERNAME: ${{ secrets.ORG_NETFLIXOSS_USERNAME }} + NETFLIX_OSS_REPO_PASSWORD: ${{ secrets.ORG_NETFLIXOSS_PASSWORD }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 542e04c60..000000000 --- a/.travis.yml +++ /dev/null @@ -1,16 +0,0 @@ -addons: - apt: - packages: - - lynx - -language: java -sudo: false - -jdk: - - oraclejdk8 - -script: - - ./gradlew --info check - -after_failure: - - if [ -f /home/travis/build/Netflix/Hystrix/hystrix-core/build/reports/tests/test/index.html ]; then lynx -dump /home/travis/build/Netflix/Hystrix/hystrix-core/build/reports/tests/test/index.html; fi diff --git a/build.gradle b/build.gradle index 15e60a933..74b5e1953 100644 --- a/build.gradle +++ b/build.gradle @@ -1,56 +1,21 @@ -buildscript { - repositories { - jcenter() - } - dependencies { - classpath 'com.netflix.nebula:gradle-extra-configurations-plugin:3.0.3' - } -} - plugins { - id 'nebula.netflixoss' version '3.4.0' - id 'me.champeau.gradle.jmh' version '0.3.1' - id 'net.saliman.cobertura' version '2.2.8' -} - -ext { - githubProjectName = rootProject.name + id "com.netflix.nebula.netflixoss" version "11.3.1" + id "me.champeau.jmh" version "0.7.1" } allprojects { repositories { - jcenter() + mavenCentral() } - - apply plugin: 'net.saliman.cobertura' } subprojects { apply plugin: 'nebula.netflixoss' - apply plugin: 'java' - apply plugin: 'nebula.provided-base' - apply plugin: 'nebula.compile-api' - - sourceCompatibility = 1.6 - targetCompatibility = 1.6 - + apply plugin: 'java-library' + group = "com.netflix.hystrix" - group = "com.netflix.${githubProjectName}" - - eclipse { - classpath { - // include 'provided' dependencies on the classpath - plusConfigurations += [configurations.provided] - downloadSources = true - downloadJavadoc = true - } - } - - idea { - module { - // include 'provided' dependencies on the classpath - scopes.COMPILE.plus += [configurations.provided] - } + tasks.withType(Javadoc).configureEach { + failOnError = false } } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index d2cc6f3a4..298061e64 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -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-4.0-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-all.zip diff --git a/hystrix-contrib/hystrix-clj/build.gradle b/hystrix-contrib/hystrix-clj/build.gradle index 2d69c739b..d5a32018a 100644 --- a/hystrix-contrib/hystrix-clj/build.gradle +++ b/hystrix-contrib/hystrix-clj/build.gradle @@ -3,14 +3,14 @@ buildscript { jcenter() maven{ name 'clojars' - url 'http://clojars.org/repo' + url 'https://clojars.org/repo' } } dependencies { - classpath 'com.netflix.nebula:nebula-clojure-plugin:4.0.1' + classpath 'com.netflix.nebula:nebula-clojure-plugin:13.0.1' } } -apply plugin: 'nebula.clojure' // this is a wrapper around clojuresque to make it behave well with other plugins +apply plugin: 'com.netflix.nebula.clojure' // this is a wrapper around clojuresque to make it behave well with other plugins repositories { mavenCentral() @@ -18,8 +18,8 @@ repositories { } dependencies { - compileApi project(':hystrix-core') - compile 'org.clojure:clojure:1.7.0' + api project(':hystrix-core') + implementation 'org.clojure:clojure:1.7.0' } /* diff --git a/hystrix-contrib/hystrix-codahale-metrics-publisher/build.gradle b/hystrix-contrib/hystrix-codahale-metrics-publisher/build.gradle index 7dc39e9f4..909d753e4 100644 --- a/hystrix-contrib/hystrix-codahale-metrics-publisher/build.gradle +++ b/hystrix-contrib/hystrix-codahale-metrics-publisher/build.gradle @@ -1,6 +1,6 @@ dependencies { - compileApi project(':hystrix-core') - compileApi 'io.dropwizard.metrics:metrics-core:3.2.2' - testCompile 'junit:junit-dep:4.10' - testCompile 'org.mockito:mockito-all:1.9.5' + api project(':hystrix-core') + api 'io.dropwizard.metrics:metrics-core:3.2.2' + testImplementation 'junit:junit-dep:4.10' + testImplementation 'org.mockito:mockito-all:1.9.5' } diff --git a/hystrix-contrib/hystrix-javanica/README.md b/hystrix-contrib/hystrix-javanica/README.md index 3a8b73890..c6e11af91 100644 --- a/hystrix-contrib/hystrix-javanica/README.md +++ b/hystrix-contrib/hystrix-javanica/README.md @@ -52,7 +52,7 @@ It doesn't matter which approach you use to create proxies in Spring, javanica w More about Spring AOP + AspectJ read [here] (http://docs.spring.io/spring/docs/current/spring-framework-reference/html/aop.html) ## Aspect weaving -Javanica supports two weaving modes: compile and runtime. Load time weaving hasn't been tested but it should work. If you tried LTW mode and got any problems then raise javanica issue or create pull request with fix. +Javanica supports two weaving modes: implementation and runtime. Load time weaving hasn't been tested but it should work. If you tried LTW mode and got any problems then raise javanica issue or create pull request with fix. - CTW. To use CTW mode you need to use specific jar version: **hystrix-javanica-ctw-X.Y.Z** . This jar is assembled with aspects compiled with using [AJC](https://eclipse.org/aspectj/doc/next/devguide/ajc-ref.html) compiler. If you will try to use regular hystrix-javanica-X.Y.Z with CTW then you get ``` NoSuchMethodError aspectOf() ``` at runtime from building with iajc. Also, you need to start your app with using java property: ```-DWeavingMode=compile```. **NOTE**: Javanica depends on aspectj library and uses internal features of aspectj and these features aren't provided as a part of open API thus it can change from version to version. Javanica tested with latest aspectj version 1.8.7. If you updated aspectj version and noticed any issues then please don't hestitate to create new issue or contribute. - RTW works, you can use regular hystrix-javanica-X.Y.Z diff --git a/hystrix-contrib/hystrix-javanica/build.gradle b/hystrix-contrib/hystrix-javanica/build.gradle index 3febf6ddb..2e1a0d3e7 100644 --- a/hystrix-contrib/hystrix-javanica/build.gradle +++ b/hystrix-contrib/hystrix-javanica/build.gradle @@ -1,9 +1,7 @@ -apply plugin: 'osgi' - configurations { ajtools - ajcTestCompile.extendsFrom testCompile - ajcTestRuntime.extendsFrom testRuntime + ajcTestImplementation.extendsFrom testCompileClasspath + ajcTestRuntimeOnly.extendsFrom testRuntimeClasspath ajc } @@ -27,14 +25,11 @@ sourceSets { compileAjcTestJava { - sourceCompatibility = "1.6" - targetCompatibility = "1.6" - doLast { ant.taskdef(resource: "org/aspectj/tools/ant/taskdefs/aspectjTaskdefs.properties", classpath: configurations.ajtools.asPath) - ant.iajc(source: "1.6", target: "1.6", - destDir: "${sourceSets.ajcTest.output.classesDir.absolutePath}", maxmem: "512m", fork: "true", - classpath: "${sourceSets.main.output.classesDir.absolutePath};${configurations.testCompile.asPath}") + ant.iajc(source: "1.8", target: "1.8", + destDir: "${sourceSets.ajcTest.output.classesDirs.files.first().absolutePath}", maxmem: "512m", fork: "true", + classpath: "${sourceSets.main.output.classesDirs.files.first()absolutePath};${configurations.testCompileClasspath.asPath}") { sourceroots { files("src/ajcTest/java/com/netflix/hystrix/contrib/javanica/test/aspectj", "src/test/java/com/netflix/hystrix/contrib/javanica/test/common", "src/main/java/com/netflix/hystrix/contrib/javanica/aop/aspectj").each { @@ -47,14 +42,12 @@ compileAjcTestJava { } compileAjcJava { - sourceCompatibility = "1.6" - targetCompatibility = "1.6" doLast { ant.taskdef(resource: "org/aspectj/tools/ant/taskdefs/aspectjTaskdefs.properties", classpath: configurations.ajtools.asPath) ant.iajc(source: "${sourceCompatibility}", target: "${targetCompatibility}", - destDir: "${sourceSets.ajc.output.classesDir.absolutePath}", maxmem: "512m", fork: "true", "showWeaveInfo": "true", - classpath: "${configurations.compile.asPath}") + destDir: "${sourceSets.ajc.output.classesDirs.files.first().absolutePath}", maxmem: "512m", fork: "true", "showWeaveInfo": "true", + classpath: "${configurations.compileClasspath.asPath}") { sourceroots { @@ -68,7 +61,7 @@ compileAjcJava { } task ajcTest(type: Test) { - testClassesDir = sourceSets.ajcTest.output.classesDir + testClassesDirs = sourceSets.ajcTest.output.classesDirs classpath = sourceSets.ajcTest.runtimeClasspath if (System.getProperty('DEBUG', 'false') == 'true') { jvmArgs '-Xdebug', @@ -86,34 +79,34 @@ ext { task ajcJar(type: Jar) { - archiveName = "${project.name}" + "-ctw-${version}.jar" - destinationDir = file("${buildDir}/libs") + archiveFileName = "${project.name}" + "-ctw-${version}.jar" + destinationDirectory = file("${buildDir}/libs") from sourceSets.ajc.output } assemble.dependsOn(jar, ajcJar) dependencies { - compileApi project(':hystrix-core') + api project(':hystrix-core') ajtools "org.aspectj:aspectjtools:$aspectjVersion" - testRuntime "org.aspectj:aspectjrt:$aspectjVersion" - compileApi "org.aspectj:aspectjweaver:$aspectjVersion" - compile "org.aspectj:aspectjrt:$aspectjVersion" - - compileApi 'com.google.guava:guava:15.0' - compile 'org.apache.commons:commons-lang3:3.1' - 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' - testCompile project(':hystrix-junit') - testCompile "org.springframework:spring-core:$springframeworkVesion" - testCompile "org.springframework:spring-context:$springframeworkVesion" - testCompile "org.springframework:spring-aop:$springframeworkVesion" - testCompile "org.springframework:spring-test:$springframeworkVesion" - testCompile 'cglib:cglib:3.1' - testCompile 'org.mockito:mockito-all:1.9.5' - testCompile 'log4j:log4j:1.2.17' - testCompile 'org.slf4j:slf4j-log4j12:1.7.7' - testCompile 'com.tngtech.java:junit-dataprovider:1.10.2' + testRuntimeOnly "org.aspectj:aspectjrt:$aspectjVersion" + api "org.aspectj:aspectjweaver:$aspectjVersion" + implementation "org.aspectj:aspectjrt:$aspectjVersion" + + api 'com.google.guava:guava:15.0' + implementation 'org.apache.commons:commons-lang3:3.1' + api 'com.google.code.findbugs:jsr305:2.0.0' + implementation 'org.ow2.asm:asm:5.0.4' + testImplementation group: 'junit', name: 'junit', version: '4.12' + testImplementation 'pl.pragmatists:JUnitParams:1.0.5' + testImplementation project(':hystrix-junit') + testImplementation "org.springframework:spring-core:$springframeworkVesion" + testImplementation "org.springframework:spring-context:$springframeworkVesion" + testImplementation "org.springframework:spring-aop:$springframeworkVesion" + testImplementation "org.springframework:spring-test:$springframeworkVesion" + testImplementation 'cglib:cglib:3.1' + testImplementation 'org.mockito:mockito-all:1.9.5' + testImplementation 'log4j:log4j:1.2.17' + testImplementation 'org.slf4j:slf4j-log4j12:1.7.7' + testImplementation 'com.tngtech.java:junit-dataprovider:1.10.2' } diff --git a/hystrix-contrib/hystrix-junit/build.gradle b/hystrix-contrib/hystrix-junit/build.gradle index ea0d2ff76..3f89785cb 100644 --- a/hystrix-contrib/hystrix-junit/build.gradle +++ b/hystrix-contrib/hystrix-junit/build.gradle @@ -1,4 +1,4 @@ dependencies { - compileApi project(':hystrix-core') - compileApi "junit:junit:4.11" + api project(':hystrix-core') + api "junit:junit:4.11" } diff --git a/hystrix-contrib/hystrix-metrics-event-stream-jaxrs/build.gradle b/hystrix-contrib/hystrix-metrics-event-stream-jaxrs/build.gradle index 874881cbf..82100fb1c 100644 --- a/hystrix-contrib/hystrix-metrics-event-stream-jaxrs/build.gradle +++ b/hystrix-contrib/hystrix-metrics-event-stream-jaxrs/build.gradle @@ -1,9 +1,9 @@ dependencies { - compileApi project(':hystrix-core') - compile project(':hystrix-serialization') - provided 'javax.ws.rs:javax.ws.rs-api:2.0.1' - testCompile 'junit:junit-dep:4.10' - testCompile 'org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-grizzly2:2.25.1' - testCompile 'org.glassfish.jersey.media:jersey-media-sse:2.25.1' + api project(':hystrix-core') + implementation project(':hystrix-serialization') + compileOnly 'javax.ws.rs:javax.ws.rs-api:2.0.1' + testImplementation 'junit:junit-dep:4.10' + testImplementation 'org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-grizzly2:2.25.1' + testImplementation 'org.glassfish.jersey.media:jersey-media-sse:2.25.1' } diff --git a/hystrix-contrib/hystrix-metrics-event-stream/build.gradle b/hystrix-contrib/hystrix-metrics-event-stream/build.gradle index 6d7ef836a..3915c2122 100644 --- a/hystrix-contrib/hystrix-metrics-event-stream/build.gradle +++ b/hystrix-contrib/hystrix-metrics-event-stream/build.gradle @@ -1,7 +1,8 @@ dependencies { - compileApi project(':hystrix-core') - compile project(':hystrix-serialization') - provided 'javax.servlet:servlet-api:2.5' - testCompile 'junit:junit-dep:4.10' - testCompile 'org.mockito:mockito-all:1.9.5' + api project(':hystrix-core') + implementation project(':hystrix-serialization') + compileOnly 'javax.servlet:servlet-api:2.5' + testImplementation 'javax.servlet:servlet-api:2.5' + testImplementation 'junit:junit-dep:4.10' + testImplementation 'org.mockito:mockito-all:1.9.5' } diff --git a/hystrix-contrib/hystrix-network-auditor-agent/build.gradle b/hystrix-contrib/hystrix-network-auditor-agent/build.gradle index 827f48a45..65e997083 100644 --- a/hystrix-contrib/hystrix-network-auditor-agent/build.gradle +++ b/hystrix-contrib/hystrix-network-auditor-agent/build.gradle @@ -1,9 +1,9 @@ dependencies { - compileApi 'org.javassist:javassist:3.19+' + api 'org.javassist:javassist:3.19+' jar { // make a fatjar otherwise it's painful getting the boot-class-path correct when deploying - from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } } + from { configurations.compileClasspath.collect { it.isDirectory() ? it : zipTree(it) } } manifest { attributes( "Agent-Class": "com.netflix.hystrix.contrib.networkauditor.HystrixNetworkAuditorAgent", diff --git a/hystrix-contrib/hystrix-request-servlet/build.gradle b/hystrix-contrib/hystrix-request-servlet/build.gradle index db6418a8e..748be587b 100644 --- a/hystrix-contrib/hystrix-request-servlet/build.gradle +++ b/hystrix-contrib/hystrix-request-servlet/build.gradle @@ -1,4 +1,4 @@ dependencies { - compileApi project(':hystrix-core') - provided 'javax.servlet:servlet-api:2.5' + api project(':hystrix-core') + compileOnly 'javax.servlet:servlet-api:2.5' } diff --git a/hystrix-contrib/hystrix-rx-netty-metrics-stream/build.gradle b/hystrix-contrib/hystrix-rx-netty-metrics-stream/build.gradle index 890df22b2..d572a0a32 100644 --- a/hystrix-contrib/hystrix-rx-netty-metrics-stream/build.gradle +++ b/hystrix-contrib/hystrix-rx-netty-metrics-stream/build.gradle @@ -1,8 +1,11 @@ dependencies { - compileApi project(':hystrix-core') - compile project(':hystrix-serialization') - 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' + api project(':hystrix-core') + implementation project(':hystrix-serialization') + api 'io.reactivex:rxnetty:0.4.17' + implementation 'io.netty:netty-transport:4.1.3.Final' + implementation 'io.netty:netty-buffer:4.1.3.Final' + implementation 'io.netty:netty-codec-http:4.1.3.Final' + testImplementation 'junit:junit-dep:4.10' + testImplementation 'org.powermock:powermock-easymock-release-full:1.5.5' + testImplementation 'org.easymock:easymock:3.2' } diff --git a/hystrix-contrib/hystrix-servo-metrics-publisher/build.gradle b/hystrix-contrib/hystrix-servo-metrics-publisher/build.gradle index c3f61d7d1..69ddf340d 100644 --- a/hystrix-contrib/hystrix-servo-metrics-publisher/build.gradle +++ b/hystrix-contrib/hystrix-servo-metrics-publisher/build.gradle @@ -1,6 +1,6 @@ dependencies { - compileApi project(':hystrix-core') - compileApi 'com.netflix.servo:servo-core:0.10.1' - testCompile 'junit:junit-dep:4.10' - testCompile 'org.mockito:mockito-all:1.9.5' + api project(':hystrix-core') + api 'com.netflix.servo:servo-core:0.10.1' + testImplementation 'junit:junit-dep:4.10' + testImplementation 'org.mockito:mockito-all:1.9.5' } diff --git a/hystrix-contrib/hystrix-yammer-metrics-publisher/build.gradle b/hystrix-contrib/hystrix-yammer-metrics-publisher/build.gradle index 8a7d09854..e0ea86e05 100644 --- a/hystrix-contrib/hystrix-yammer-metrics-publisher/build.gradle +++ b/hystrix-contrib/hystrix-yammer-metrics-publisher/build.gradle @@ -1,4 +1,4 @@ dependencies { - compileApi project(':hystrix-core') - compileApi 'com.yammer.metrics:metrics-core:2.2.0' + api project(':hystrix-core') + api 'com.yammer.metrics:metrics-core:2.2.0' } diff --git a/hystrix-core/build.gradle b/hystrix-core/build.gradle index 8955c78e9..a15727001 100644 --- a/hystrix-core/build.gradle +++ b/hystrix-core/build.gradle @@ -1,13 +1,12 @@ -apply plugin: 'osgi' -apply plugin: 'me.champeau.gradle.jmh' +apply plugin: 'me.champeau.jmh' dependencies { - compileApi 'com.netflix.archaius:archaius-core:0.4.1' - compileApi 'io.reactivex:rxjava:1.2.0' - compile 'org.slf4j:slf4j-api:1.7.0' - compileApi 'org.hdrhistogram:HdrHistogram:2.1.9' - testCompile 'junit:junit-dep:4.10' - testCompile project(':hystrix-junit') + api 'com.netflix.archaius:archaius-core:0.4.1' + api 'io.reactivex:rxjava:1.2.0' + implementation 'org.slf4j:slf4j-api:1.7.0' + api 'org.hdrhistogram:HdrHistogram:2.1.9' + testImplementation 'junit:junit-dep:4.10' + testImplementation project(':hystrix-junit') } @@ -25,17 +24,6 @@ javadoc { options.addStringOption('top').value = '

Hystrix: Latency and Fault Tolerance for Distributed Systems

' } -jar { - manifest { - name = 'hystrix-core' - instruction 'Bundle-Vendor', 'Netflix' - instruction 'Bundle-DocURL', 'https://github.com/Netflix/Hystrix' - instruction 'Import-Package', '!org.junit,!junit.framework,!org.mockito.*,*' - instruction 'Eclipse-ExtensibleAPI', 'true' - instruction 'Embed-Dependency', '*;scope=compile' - } -} - jmh { fork = 10 iterations = 3 diff --git a/hystrix-examples-webapp/build.gradle b/hystrix-examples-webapp/build.gradle index 9957ee99b..224fddd97 100644 --- a/hystrix-examples-webapp/build.gradle +++ b/hystrix-examples-webapp/build.gradle @@ -1,11 +1,23 @@ +buildscript { + repositories { + maven { + url "https://plugins.gradle.org/m2/" + } + } + dependencies { + classpath "org.gretty:gretty:3.0.5" + } +} + +apply plugin: "org.gretty" apply plugin: 'war' -apply from: 'https://raw.github.com/akhikhl/gretty/master/pluginScripts/gretty.plugin' + dependencies { - compileApi project(':hystrix-core') - compileApi project(':hystrix-examples') - compileApi project(':hystrix-request-servlet') - compileApi project(':hystrix-metrics-event-stream') + api project(':hystrix-core') + api project(':hystrix-examples') + api project(':hystrix-request-servlet') + api project(':hystrix-metrics-event-stream') } gretty { diff --git a/hystrix-examples/build.gradle b/hystrix-examples/build.gradle index 57f92880e..8ee37c4cd 100644 --- a/hystrix-examples/build.gradle +++ b/hystrix-examples/build.gradle @@ -1,21 +1,9 @@ -apply plugin: 'osgi' - dependencies { - compileApi project(':hystrix-core') - provided 'junit:junit-dep:4.10' + api project(':hystrix-core') + compileOnly 'junit:junit-dep:4.10' } task(runDemo, dependsOn: 'classes', type: JavaExec) { main = 'com.netflix.hystrix.examples.demo.HystrixCommandDemo' classpath = sourceSets.main.runtimeClasspath } - -jar { - manifest { - name = 'hystrix-examples' - instruction 'Bundle-Vendor', 'Netflix' - instruction 'Bundle-DocURL', 'https://github.com/Netflix/Hystrix' - instruction 'Import-Package', '!org.junit,!junit.framework,!org.mockito.*,*' - instruction 'Eclipse-ExtensibleAPI', 'true' - } -} \ No newline at end of file diff --git a/hystrix-serialization/build.gradle b/hystrix-serialization/build.gradle index f20c021ba..e1e36388a 100644 --- a/hystrix-serialization/build.gradle +++ b/hystrix-serialization/build.gradle @@ -1,22 +1,19 @@ repositories { mavenCentral() - jcenter() } -sourceCompatibility = JavaVersion.VERSION_1_6 -targetCompatibility = JavaVersion.VERSION_1_6 dependencies { - compileApi project(':hystrix-core') + api project(':hystrix-core') //if we bump into the the 2.8.0 series, we are forced to use Java7 - 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' + api 'com.fasterxml.jackson.core:jackson-core:2.7.5' + api 'com.fasterxml.jackson.core:jackson-databind:2.7.5' + api 'com.fasterxml.jackson.core:jackson-annotations:2.7.5' + implementation 'com.fasterxml.jackson.module:jackson-module-afterburner:2.7.5' - testCompile 'junit:junit-dep:4.10' - testCompile 'org.mockito:mockito-all:1.9.5' - testCompile project(':hystrix-core').sourceSets.test.output - testCompile project(':hystrix-junit') + testImplementation 'junit:junit-dep:4.10' + testImplementation 'org.mockito:mockito-all:1.9.5' + testImplementation project(':hystrix-core').sourceSets.test.output + testImplementation project(':hystrix-junit') }