-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
68 lines (59 loc) · 1.68 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
buildscript {
ext.kotlin_version = '2.0.21'
repositories {
google()
mavenCentral()
maven { url "https://plugins.gradle.org/m2/" } // ktlint
}
dependencies {
classpath 'com.android.tools.build:gradle:8.7.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jlleitschuh.gradle:ktlint-gradle:12.1.1"
classpath 'com.google.gms:google-services:4.4.2'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.9'
}
}
subprojects {
apply plugin: "org.jlleitschuh.gradle.ktlint" // Version should be inherited from parent
// Optionally configure plugin
ktlint {
debug = false
}
}
allprojects {
repositories {
google()
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
ext {
propCompileSdkVersion = 34
coreVersion = "1.4.0"
runnerVersion = "1.5.0"
extJUnitVersion = "1.1.3"
espresso_core = "3.4.0"
}
@SuppressWarnings('unused')
static def getTag() {
def process = "git describe --tags --abbrev=0".execute()
return process.text.toString().trim()
}
@SuppressWarnings('unused')
static def useFirebase() {
def process = "grep DUMMYKEY sample/google-services.json -R | wc -c".execute()
def grepResult = process.text.toString().split(":")[1].toInteger()
if (grepResult == 1) {
println("Firebase=false $grepResult")
return "false"
}
else {
println("Firebase=true $grepResult")
return "true"
}
}
@SuppressWarnings('unused')
static def getGitCommitCount() {
def process = "git describe --tags --abbrev=0".execute()
return process.text.toString().trim()
}