Skip to content

Commit

Permalink
Upgrade to modern gradle
Browse files Browse the repository at this point in the history
  • Loading branch information
rpalcolea committed Jan 19, 2024
1 parent 97f53d6 commit 23014d3
Show file tree
Hide file tree
Showing 19 changed files with 204 additions and 104 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/nebula-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
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 git user
run: |
git config --global user.name "NetflixOss Maintainers"
git config --global user.email "[email protected]"
- 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 }}
55 changes: 55 additions & 0 deletions .github/workflows/nebula-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
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 git user
run: |
git config --global user.name "NetflixOss Maintainers"
git config --global user.email "[email protected]"
- 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 }}
41 changes: 41 additions & 0 deletions .github/workflows/nebula-snapshot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
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: Setup git user
run: |
git config --global user.name "NetflixOss Maintainers"
git config --global user.email "[email protected]"
- 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 }}
17 changes: 0 additions & 17 deletions .travis.yml

This file was deleted.

22 changes: 11 additions & 11 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,23 +1,17 @@
plugins {
id 'nebula.netflixoss' version '5.1.1'
id 'nebula.netflixoss' version '11.5.0'
}

subprojects {
group = 'com.netflix.msl'

repositories {
jcenter()
mavenCentral()
}

apply plugin: 'nebula.netflixoss'
apply plugin: 'nebula.javadoc-jar'
apply plugin: 'nebula.source-jar'

apply plugin: 'findbugs'
findbugs {
excludeFilter = rootProject.file("findbugs-exclude.xml")
ignoreFailures = true
}
apply plugin: 'com.netflix.nebula.netflixoss'
apply plugin: 'com.netflix.nebula.javadoc-jar'
apply plugin: 'com.netflix.nebula.source-jar'

if (JavaVersion.current().isJava8Compatible()) {
tasks.withType(Javadoc) {
Expand All @@ -28,4 +22,10 @@ subprojects {
tasks.withType(Test) {
maxHeapSize = '1024m'
}

java {
toolchain {
languageVersion = JavaLanguageVersion.of(8)
}
}
}
23 changes: 0 additions & 23 deletions buildViaTravis.sh

This file was deleted.

9 changes: 3 additions & 6 deletions core/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
apply plugin: 'java'
apply plugin: 'java-library'
apply plugin: 'eclipse-wtp'

targetCompatibility = '1.7' // Android maximum supported language level
sourceCompatibility = '1.7' // Android maximum supported language level

dependencies {
compile 'org.bouncycastle:bcprov-jdk15on:1.46'
compile 'org.json:json:20140107'
api 'org.bouncycastle:bcprov-jdk15on:1.46'
api 'org.json:json:20140107'
}

task my_javadoc(type: Javadoc) {
Expand Down
2 changes: 1 addition & 1 deletion examples/burp-extender/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
apply plugin: 'java'

jar.baseName 'burp-extender'
jar.archiveBaseName.set 'burp-extender'
10 changes: 5 additions & 5 deletions examples/burp/build.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
apply plugin: 'java'

dependencies {
compile 'javax.servlet:servlet-api:2.5'
compile project(':msl-core')
compile project(':msl-tests')
compile project(':burp-extender')
implementation 'javax.servlet:servlet-api:2.5'
implementation project(':msl-core')
implementation project(':msl-tests')
implementation project(':burp-extender')
}

jar.baseName 'msl-burp-extender'
jar.archiveBaseName.set 'msl-burp-extender'
2 changes: 1 addition & 1 deletion examples/kancolle/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apply plugin: 'java'

dependencies {
compile project(':msl-core')
implementation project(':msl-core')
}
12 changes: 6 additions & 6 deletions examples/mslcli/client/build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
apply plugin: 'java'
apply plugin: 'java-library'
apply plugin: 'application'

dependencies {
compile 'javax.servlet:servlet-api:2.5'
compile project(':msl-core')
compile 'org.bouncycastle:bcprov-jdk15on:1.46'
compile 'org.json:json:20140107'
api 'javax.servlet:servlet-api:2.5'
api project(':msl-core')
api 'org.bouncycastle:bcprov-jdk15on:1.46'
api 'org.json:json:20140107'
}

mainClassName = "mslcli.client.ClientApp"

jar.baseName "mslcli-core"
jar.archiveBaseName.set "mslcli-core"
12 changes: 6 additions & 6 deletions examples/mslcli/server/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ apply plugin: 'application'
apply plugin: 'war'

dependencies {
compile 'javax.servlet:servlet-api:2.5'
compile project(':msl-core')
compile project(':msl-cli')
compile 'org.bouncycastle:bcprov-jdk15on:1.46'
compile 'org.json:json:20140107'
implementation 'javax.servlet:servlet-api:2.5'
implementation project(':msl-core')
implementation project(':msl-cli')
implementation 'org.bouncycastle:bcprov-jdk15on:1.46'
implementation 'org.json:json:20140107'
}

mainClassName = "mslcli.server.SimpleHttpServer"
war.baseName = "mslcli-server"
war.archiveBaseName.set "mslcli-server"
jar.enabled = true
2 changes: 1 addition & 1 deletion examples/oneshot/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apply plugin: 'java'
apply plugin: 'application'

dependencies {
compile project(':msl-core')
implementation project(':msl-core')
}

mainClassName = "oneshot.Oneshot"
4 changes: 2 additions & 2 deletions examples/proxy/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apply plugin: 'java'

dependencies {
compile project(':msl-core')
compile 'io.reactivex:rxjava:latest.release'
implementation project(':msl-core')
implementation 'io.reactivex:rxjava:latest.release'
}
12 changes: 6 additions & 6 deletions examples/simple/build.gradle
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
buildscript {
repositories { jcenter() }
dependencies { classpath 'org.akhikhl.gretty:gretty:latest.release' }
repositories { mavenCentral() }
dependencies { classpath 'org.gretty:gretty:3.1.0' }
}

apply plugin: 'war'
apply plugin: 'eclipse-wtp'

apply plugin: 'org.akhikhl.gretty'
apply plugin: 'org.gretty'
gretty {
contextPath = "/msl-example-server"
}

dependencies {
compile 'javax.servlet:servlet-api:2.5'
compile project(':msl-core')
implementation 'javax.servlet:servlet-api:2.5'
implementation project(':msl-core')
}

war.baseName "msl-example-server"
war.archiveBaseName.set "msl-example-server"
12 changes: 6 additions & 6 deletions examples/websocket/build.gradle
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
buildscript {
repositories { jcenter() }
dependencies { classpath 'org.akhikhl.gretty:gretty:latest.release' }
dependencies { classpath 'org.gretty:gretty:3.1.0' }
}

apply plugin: 'war'
apply plugin: 'eclipse-wtp'

apply plugin: 'org.akhikhl.gretty'
apply plugin: 'org.gretty'
gretty {
contextPath = "/msl-websocket-server"
}

dependencies {
compile project(':msl-core')
compile "io.netty:netty-handler:latest.release"
compile "io.netty:netty-codec-http:latest.release"
implementation project(':msl-core')
implementation "io.netty:netty-handler:latest.release"
implementation "io.netty:netty-codec-http:latest.release"
}

war.baseName "msl-websocket-server"
war.archiveBaseName.set "msl-websocket-server"
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.5.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 23014d3

Please sign in to comment.