Move modules versions to a single parent version to simplify versioning.

Add gradle task to copy generated jars artifacts to a common folder.
Add travis config to deploy the jars.

Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
This commit is contained in:
Max Lambrecht 2020-06-10 14:43:13 -03:00
parent 91eb49bd8e
commit af2ee3d27b
6 changed files with 38 additions and 7 deletions

View File

@ -1,3 +1,22 @@
language: java language: java
jdk: jdk:
- oraclejdk14 - 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 != ""

View File

@ -1,5 +1,6 @@
subprojects { subprojects {
group 'spiffe' group = 'spiffe'
version = '0.6.0'
apply plugin: 'java-library' apply plugin: 'java-library'
apply plugin: 'jacoco' 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"
}

View File

@ -1,4 +1,3 @@
version '0.6.0'
buildscript { buildscript {
repositories { repositories {

View File

@ -8,7 +8,7 @@ The Helper automatically gets the SVID updates and stores them in the KeyStore a
## Usage ## 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) (The jar can be found in `build/libs`, after running the gradle build)

View File

@ -3,8 +3,6 @@ plugins {
id "com.github.johnrengelman.shadow" version "5.2.0" id "com.github.johnrengelman.shadow" version "5.2.0"
} }
version '0.1.0'
jar { jar {
manifest { manifest {
attributes 'Main-Class': 'spiffe.helper.cli.Runner' attributes 'Main-Class': 'spiffe.helper.cli.Runner'

View File

@ -3,8 +3,6 @@ plugins {
id "com.github.johnrengelman.shadow" version "5.2.0" id "com.github.johnrengelman.shadow" version "5.2.0"
} }
version '0.6.0'
apply plugin: 'com.github.johnrengelman.shadow' apply plugin: 'com.github.johnrengelman.shadow'
assemble.dependsOn shadowJar assemble.dependsOn shadowJar