forked from jdahmubed/javaOIDCMsg
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbintray.gradle
More file actions
55 lines (50 loc) · 1.61 KB
/
bintray.gradle
File metadata and controls
55 lines (50 loc) · 1.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
def credentials = new Bintray(project);
if (credentials.valid()) {
apply plugin: 'com.jfrog.bintray'
bintray {
user = credentials.user
key = credentials.key
publications = ['mavenJava']
dryRun = project.version.endsWith("-SNAPSHOT")
publish = false
pkg {
repo = 'java'
name = 'java-jwt'
desc = 'Java implementation of JSON Web Token (JWT) '
websiteUrl = 'https://github.com/auth0/java-jwt'
vcsUrl = 'scm:git@github.com:auth0/java-jwt.git'
licenses = ["MIT"]
userOrg = 'auth0'
publish = false
version {
gpg {
sign = true
passphrase = credentials.passphrasse
}
vcsTag = project.version
name = project.version
released = new Date()
}
}
}
}
class Bintray {
String user
String key
String passphrasse
Bintray(project) {
this.user = Bintray.value(project, 'BINTRAY_USER', 'bintray.user')
this.key = Bintray.value(project, 'BINTRAY_KEY', 'bintray.key')
this.passphrasse = Bintray.value(project, 'BINTRAY_PASSPHRASE', 'bintray.gpg.password')
}
def valid() {
return this.user != null && this.key != null && this.passphrasse != null;
}
private static def value(Project project, String env, String property) {
def value = System.getenv(env)
if (project.hasProperty(property)) {
value = project.getProperty(property);
}
return value
}
}