forked from alisonthemonster/Presently
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
64 lines (54 loc) · 1.82 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.
buildscript {
ext {
kotlin_version = '1.3.72'
}
repositories {
apply from: 'versions.gradle'
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jacoco:org.jacoco.core:$jacoco_version"
classpath "org.jetbrains.kotlin:kotlin-allopen:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.3'
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$navigation_version"
classpath 'com.google.android.gms:oss-licenses-plugin:0.10.2'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.2.0'
classpath 'com.facebook.testing.screenshot:plugin:0.13.0'
}
}
allprojects {
repositories {
google()
jcenter()
maven {
url 'https://maven.google.com/'
}
}
project.ext.androidVersionName = createVersionName()
project.ext.buildNumber = getBuildNumber()
project.ext.branchName = getBranchName()
}
subprojects {
afterEvaluate { project ->
project.apply from: '../jacoco.gradle'
project.apply from: '../coveragereporting.gradle'
}
}
def createVersionName() {
return major + "." + minor + "." + patch + beta
}
String getBranchName() {
return project.hasProperty("branchName") ? ((String) project.properties['branchName']).toString() : ""
}
//get the build number from the build server
String getBuildNumber() {
return project.hasProperty("buildNumber") ? ((String) project.properties['buildNumber']).toString() : ""
}
task clean(type: Delete) {
delete rootProject.buildDir
}
// TODO add detekt