-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
73 lines (63 loc) · 2.2 KB
/
build.gradle
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'biz.aQute.bnd:biz.aQute.bnd.gradle:4.2.0'
}
}
plugins {
id 'java'
id 'jacoco'
id 'com.github.kt3k.coveralls' version '2.8.2'
id 'signing'
id 'com.jfrog.bintray' version '1.8.4'
id 'maven-publish'
}
apply plugin: 'biz.aQute.bnd.builder'
def getVersionName() {
def errOut = new ByteArrayOutputStream()
try {
def stdOut = new ByteArrayOutputStream()
exec {
commandLine 'git', 'describe', '--tags'
standardOutput = stdOut
errorOutput = errOut
}
// strip of leading "v"
return stdOut.toString().trim().substring(1)
} catch (ignore) {
logger.info('Error running git describe (' + errOut.toString().trim() + '), defaulting to 0.0.0')
return '0.0.0'
}
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
project.group = 'org.pharmgkb'
project.version = getVersionName()
ext {
baseName = 'XXX'
moduleName = 'org.pharmgkb.XXX'
description = 'XXX'
url = 'https://github.com/PharmGKB/' + project.ext.baseName + '.git'
scm = 'scm:[email protected]:PharmGKB/' + project.ext.baseName + '.git'
orgName = 'PharmGKB'
orgUrl = 'https://www.pharmgkb.org'
// grab properties from environment for Travis CI
gpgPwd = project.hasProperty('signing.password') ? project.getProperty('signing.password') : System.getenv('SIGNING_PASSWORD')
sonatypeUser = project.hasProperty('ossrhUsername') ? ossrhUsername : System.getenv('OSSRH_USERNAME')
sonatypePwd = project.hasProperty('ossrhPassword') ? ossrhPassword : System.getenv('OSSRH_PASSWORD')
bintrayUser = project.hasProperty('bintrayUsername') ? bintrayUsername : System.getenv('BINTRAY_USERNAME')
bintrayKey = project.hasProperty('bintrayApiKey') ? bintrayApiKey : System.getenv('BINTRAY_API_KEY')
}
repositories {
jcenter()
}
dependencies {
compile group: 'com.google.guava', name: 'guava', version: '24.0-jre'
compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.8.1'
compile group: 'org.apache.commons', name: 'commons-text', version: '1.6'
compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.25'
testCompile group: 'junit', name: 'junit', version: '4.12'
}
apply from: 'pgkb-build.gradle'