diff --git a/.travis.yml b/.travis.yml index 42fe87f..ef1e1d6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,22 @@ language: java jdk: - oraclejdk14 + +before_cache: + - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock + - rm -fr $HOME/.gradle/caches/*/plugin-resolution/ + +cache: + directories: + - "$HOME/.gradle/caches/" + - "$HOME/.gradle/wrapper/" + +deploy: + - provider: releases + api_key: $GITHUB_TOKEN + file_glob: true + file: "build/libs/*" + skip_cleanup: true + on: + tags: true + condition: $GITHUB_TOKEN != "" diff --git a/build.gradle b/build.gradle index a2429a8..83b1baa 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,6 @@ subprojects { - group 'spiffe' + group = 'spiffe' + version = '0.6.0' apply plugin: 'java-library' apply plugin: 'jacoco' @@ -64,5 +65,21 @@ subprojects { } } +// copy submodules jars to a common folder for deploy +task copyJars(type: Copy) { + duplicatesStrategy = DuplicatesStrategy.INCLUDE + from subprojects.collect { it.tasks.withType(Jar) } + into "$buildDir/libs" +} +task build { + dependsOn subprojects.build +} + +build.finalizedBy copyJars + +task clean { + dependsOn subprojects.clean + delete "$buildDir" +} diff --git a/java-spiffe-core/build.gradle b/java-spiffe-core/build.gradle index 7b6a545..a7a0c70 100644 --- a/java-spiffe-core/build.gradle +++ b/java-spiffe-core/build.gradle @@ -1,4 +1,3 @@ -version '0.6.0' buildscript { repositories { diff --git a/java-spiffe-helper/README.md b/java-spiffe-helper/README.md index df737e5..d204a52 100644 --- a/java-spiffe-helper/README.md +++ b/java-spiffe-helper/README.md @@ -8,7 +8,7 @@ The Helper automatically gets the SVID updates and stores them in the KeyStore a ## Usage -`java -jar java-spiffe-helper-0.1.0.jar -c helper.conf` +`java -jar java-spiffe-helper-0.6.0.jar -c helper.conf` (The jar can be found in `build/libs`, after running the gradle build) diff --git a/java-spiffe-helper/build.gradle b/java-spiffe-helper/build.gradle index 2a59aa2..6b990b1 100644 --- a/java-spiffe-helper/build.gradle +++ b/java-spiffe-helper/build.gradle @@ -3,8 +3,6 @@ plugins { id "com.github.johnrengelman.shadow" version "5.2.0" } -version '0.1.0' - jar { manifest { attributes 'Main-Class': 'spiffe.helper.cli.Runner' diff --git a/java-spiffe-provider/build.gradle b/java-spiffe-provider/build.gradle index 7d347da..94c8e3f 100644 --- a/java-spiffe-provider/build.gradle +++ b/java-spiffe-provider/build.gradle @@ -3,8 +3,6 @@ plugins { id "com.github.johnrengelman.shadow" version "5.2.0" } -version '0.6.0' - apply plugin: 'com.github.johnrengelman.shadow' assemble.dependsOn shadowJar