Skip to content

Commit

Permalink
Upgrade to Gradle 8.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
rpalcolea committed May 20, 2023
1 parent 3ee5137 commit c3c431e
Show file tree
Hide file tree
Showing 22 changed files with 250 additions and 186 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/nebula-ci.yml
Original file line number Diff line number Diff line change
@@ -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 }}
51 changes: 51 additions & 0 deletions .github/workflows/nebula-publish.yml
Original file line number Diff line number Diff line change
@@ -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 }}
37 changes: 37 additions & 0 deletions .github/workflows/nebula-snapshot.yml
Original file line number Diff line number Diff line change
@@ -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 }}
16 changes: 0 additions & 16 deletions .travis.yml

This file was deleted.

49 changes: 7 additions & 42 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -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
}
}
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-4.0-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-all.zip
10 changes: 5 additions & 5 deletions hystrix-contrib/hystrix-clj/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,23 @@ 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()
clojarsRepo()
}

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

/*
Expand Down
Original file line number Diff line number Diff line change
@@ -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'
}
2 changes: 1 addition & 1 deletion hystrix-contrib/hystrix-javanica/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
69 changes: 31 additions & 38 deletions hystrix-contrib/hystrix-javanica/build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
apply plugin: 'osgi'

configurations {
ajtools
ajcTestCompile.extendsFrom testCompile
ajcTestRuntime.extendsFrom testRuntime
ajcTestImplementation.extendsFrom testCompileClasspath
ajcTestRuntimeOnly.extendsFrom testRuntimeClasspath
ajc
}

Expand All @@ -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 {
Expand All @@ -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 {
Expand All @@ -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',
Expand All @@ -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'
}
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 {
compileApi project(':hystrix-core')
compileApi "junit:junit:4.11"
api project(':hystrix-core')
api "junit:junit:4.11"
}
Loading

0 comments on commit c3c431e

Please sign in to comment.