-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
73 lines (54 loc) · 1.74 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
group 'com.novarto'
version '0.9.1-SNAPSHOT'
repositories {
mavenCentral()
jcenter()
}
buildscript {
repositories {
mavenCentral()
jcenter()
maven {
url 'https://oss.jfrog.org/artifactory/libs-snapshot/'
}
}
dependencies {
classpath group: 'com.novarto', name: 'java-conventions',
version: '0.9.1-SNAPSHOT'
}
}
subprojects {
repositories {
maven {
url 'https://oss.jfrog.org/artifactory/libs-snapshot/'
}
}
group project.rootProject.group
version project.rootProject.version
apply plugin: 'com.novarto.javaconventions'
apply plugin: 'com.novarto.osspublish'
javaconventions {
ci = System.getProperty("ci")!=null || ("true".equals(System.getenv("TRAVIS")) && "true".equals(System.getenv("CI")))
}
dependencies {
testCompile 'org.hamcrest:hamcrest-all:1.3'
testCompile 'junit:junit:4.12'
testCompile "org.functionaljava:functionaljava-quickcheck:4.7"
testCompile 'org.hsqldb:hsqldb:2.3.4'
}
task maybePublish {
def isTravis = "true".equals(System.getenv("TRAVIS"))
def isSnapshot = version.toString().endsWith("SNAPSHOT")
def isNotPr = "false".equals(System.getenv("TRAVIS_PULL_REQUEST"))
def isMaster = "master".equals(System.getenv("TRAVIS_BRANCH"))
if(isTravis && isSnapshot && isNotPr && isMaster) {
println("Travis snapshot master non-pr build detected, will publish to artifactory")
finalizedBy(artifactoryPublish)
}
else {
doLast {
println("Not a Travis snapshot master non-pr build, skipping publish to artifactory")
}
}
}
}