This repository has been archived by the owner on Nov 17, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
/
build.gradle
64 lines (52 loc) · 1.4 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
// Top-level build file where you can add configuration options common to all sub-projects/modules.
apply from: 'dependencies.gradle'
buildscript {
apply from: 'dependencies.gradle'
repositories {
jcenter()
}
dependencies {
classpath gradlePlugins.androidToolsPlugin
classpath gradlePlugins.jacoco
}
}
allprojects {
repositories {
jcenter()
}
}
subprojects {
// Log instrumentation tests results.
tasks.withType(com.android.build.gradle.internal.tasks.AndroidTestTask) { task ->
doFirst {
logging.setLevel(LogLevel.INFO)
}
doLast {
logging.setLevel(LogLevel.LIFECYCLE)
}
}
}
task wrapper(type: Wrapper) {
gradleVersion = '2.14.1'
}
task clean(type: Delete) {
delete rootProject.buildDir
}
def isCi() {
project.hasProperty('CI') && CI.equals('true')
}
def isReleaseBuild() {
return VERSION_NAME.contains("SNAPSHOT") == false
}
def getReleaseRepositoryUrl() {
return hasProperty('RELEASE_REPOSITORY_URL') ? RELEASE_REPOSITORY_URL : "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
}
def getSnapshotRepositoryUrl() {
return hasProperty('SNAPSHOT_REPOSITORY_URL') ? SNAPSHOT_REPOSITORY_URL : "https://oss.sonatype.org/content/repositories/snapshots/"
}
def getRepositoryUsername() {
return hasProperty('NEXUS_USERNAME') ? NEXUS_USERNAME : ""
}
def getRepositoryPassword() {
return hasProperty('NEXUS_PASSWORD') ? NEXUS_PASSWORD : ""
}