-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
52 lines (45 loc) · 1.3 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
apply from: 'versions.gradle'
apply from: 'deps.gradle'
buildscript {
repositories {
jcenter()
maven { url "https://plugins.gradle.org/m2/" }
maven {
url 'https://maven.google.com/'
name 'Google'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
classpath "jp.classmethod.aws:gradle-aws-plugin:0.31"
}
}
subprojects {
repositories {
mavenLocal()
mavenCentral()
jcenter()
maven {
url 'https://maven.google.com/'
name 'Google'
}
}
project.status = isReleaseBuild() ? 'release' : 'integration'
project.group = project.property('pom.groupId')
project.version = getVersionString()
if (project.name != "copyrightcheck") {
apply from: "$rootDir/gradle-fury/gradle/maven-support.gradle"
}
}
def isReleaseBuild() {
return isTag() && !version.contains("SNAPSHOT")
}
static boolean isTag() {
def tag = System.getenv('TRAVIS_TAG')
return !(tag == null || tag.isEmpty())
}
String getVersionString() {
String buildNumber = System.getenv('TRAVIS_BUILD_NUMBER') ?: "0"
String version = project.property('pom.version').replaceAll(".(0)\$", "." + buildNumber)
return isTag() ? version : version + "-SNAPSHOT"
}