File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11language : java
2+ install : true # tells Travis that we run gradlew manually
23jdk :
34- openjdk8
45- openjdk11
6+ before_cache :
7+ - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
8+ - rm -fr $HOME/.gradle/caches/*/plugin-resolution/
9+ cache :
10+ directories :
11+ - $HOME/.gradle/caches/
12+ - $HOME/.gradle/wrapper/
13+
14+ stages :
15+ - name : build
16+ - name : snapshot
17+ if : branch = master
18+ - name : release
19+ if : branch = release
20+
21+ jobs :
22+ include :
23+ - stage : build
24+ script : ./gradlew build
25+ - stage : snapshot
26+ script : ./gradlew publish -x test -Dsnapshot=true -Dnexus.user=$NEXUS_USER -Dnexus.key=$NEXUS_KEY -Dbuild.number=$TRAVIS_BUILD_NUMBER
27+ - stage : release
28+ script : ./gradlew publish -x test -Dnexus.user=$NEXUS_USER -Dnexus.key=$NEXUS_KEY -Dbuild.number=$TRAVIS_BUILD_NUMBER
29+
530deploy :
631 provider : releases
732 api_key :
Original file line number Diff line number Diff line change @@ -2,10 +2,11 @@ plugins {
22 // Apply the java-library plugin to add support for Java Library
33 id ' java-library'
44 id ' maven'
5+ id ' maven-publish'
56}
67
78group = ' de.upb.crypto'
8- version = ' 1.0.0-SNAPSHOT'
9+ version = ' 1.0.0' + ( Boolean . valueOf( System . getProperty( " snapshot " )) ? " -SNAPSHOT" : " " )
910
1011description = """ """
1112
@@ -82,3 +83,25 @@ artifacts {
8283 archives packageTests
8384}
8485
86+ publishing {
87+ publications {
88+ mavenJava(MavenPublication ) {
89+ from components. java
90+ artifact packageTests
91+ }
92+
93+ }
94+
95+ repositories {
96+ maven {
97+ credentials {
98+ username = System . getProperty(' nexus.user' )
99+ password = System . getProperty(' nexus.key' )
100+ }
101+ def releasesRepoUrl = " https://nexus.cs.upb.de/repository/sfb901-snapshots/"
102+ def snapshotsRepoUrl = " https://nexus.cs.upb.de/repository/sfb901-snapshots/"
103+ url = version. endsWith(' SNAPSHOT' ) ? snapshotsRepoUrl : releasesRepoUrl
104+ }
105+ }
106+ }
107+
Original file line number Diff line number Diff line change 1+ # Mon Oct 29 13:19:40 CET 2018
12distributionBase =GRADLE_USER_HOME
23distributionPath =wrapper/dists
3- distributionUrl =https\://services.gradle.org/distributions/gradle-4.9-bin.zip
44zipStoreBase =GRADLE_USER_HOME
55zipStorePath =wrapper/dists
6+ distributionUrl =https\://services.gradle.org/distributions/gradle-4.9-all.zip
You can’t perform that action at this time.
0 commit comments