Skip to content

Commit c154c46

Browse files
authored
Add Ship CLI and orb to v3 (#618)
* Add Ship CLI and orb to v3 * update oss plugin version
1 parent 1f0d65f commit c154c46

4 files changed

Lines changed: 44 additions & 5 deletions

File tree

.circleci/config.yml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
version: 2.1
2+
orbs:
3+
ship: auth0/ship@0.7.2
4+
codecov: codecov/codecov@3
25

36
commands:
47
checkout-and-build:
@@ -19,10 +22,7 @@ commands:
1922
run-tests:
2023
steps:
2124
- run: ./gradlew check jacocoTestReport --continue --console=plain
22-
- run:
23-
name: Upload Coverage
24-
when: on_success
25-
command: bash <(curl -s https://codecov.io/bash) -Z -C $CIRCLE_SHA1
25+
- codecov/upload
2626
run-api-diff:
2727
steps:
2828
# run apiDiff task
@@ -58,6 +58,17 @@ workflows:
5858
build-and-test:
5959
jobs:
6060
- build
61+
- ship/java-publish:
62+
prefix-tag: false
63+
context:
64+
- publish-gh
65+
- publish-sonatype
66+
filters:
67+
branches:
68+
only:
69+
- v3
70+
requires:
71+
- build
6172
api-diff:
6273
jobs:
6374
- api-diff

.shiprc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"files": {
3+
"README.md": [],
4+
"lib/build.gradle": ["version[[:blank:]]*=[[:blank:]]*{MAJOR}.{MINOR}.{PATCH}"]
5+
},
6+
"prefixVersion": false
7+
}

lib/build.gradle

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,21 @@
1+
2+
buildscript {
3+
version = "3.19.2"
4+
}
5+
16
plugins {
27
id 'java'
38
id 'jacoco'
49
id 'com.auth0.gradle.oss-library.java'
510
}
611

12+
def signingKey = findProperty('signingKey')
13+
def signingKeyPwd = findProperty('signingPassword')
14+
15+
signing {
16+
useInMemoryPgpKeys(signingKey, signingKeyPwd)
17+
}
18+
719
logger.lifecycle("Using version ${version} for ${group}.${name}")
820

921
oss {
@@ -12,6 +24,7 @@ oss {
1224
organization "auth0"
1325
description "Java implementation of JSON Web Token (JWT)"
1426
baselineCompareVersion "3.18.2"
27+
skipAssertSigningConfiguration true
1528

1629
developers {
1730
auth0 {
@@ -93,3 +106,11 @@ jar {
93106

94107
compileModuleInfoJava.dependsOn compileJava
95108
classes.dependsOn compileModuleInfoJava
109+
110+
// Creates a version.txt file containing the current version of the SDK.
111+
// This file is picked up and parsed by our Ship Orb to determine the version.
112+
task exportVersion() {
113+
doLast {
114+
new File(rootDir, "version.txt").text = "$version"
115+
}
116+
}

settings.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ pluginManagement {
33
gradlePluginPortal()
44
}
55
plugins {
6-
id 'com.auth0.gradle.oss-library.java' version '0.16.0'
6+
id 'com.auth0.gradle.oss-library.java' version '0.17.2'
77
}
88
}
99

0 commit comments

Comments
 (0)