-
Notifications
You must be signed in to change notification settings - Fork 25
/
build.gradle
64 lines (53 loc) · 1.48 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
buildscript {
ext {
versions = [
compileSdk: 35,
minSdk : 23,
targetSdk : 34,
]
}
dependencies {
classpath 'com.google.android.gms:oss-licenses-plugin:0.10.6'
}
}
plugins {
alias(libs.plugins.androidGradlePlugin) apply false
alias(libs.plugins.kotlinPlugin) apply false
alias(libs.plugins.hiltPlugin) apply false
alias(libs.plugins.kspPlugin) apply false
alias(libs.plugins.baselineProfilePlugin) apply false
}
subprojects {
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile)
.configureEach {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_11.toString()
}
}
}
enum VersionSuffix {
ALPHA(0, "alpha"), BETA(1, "beta"), PRODUCT(9, "")
private final int code
private final String name
VersionSuffix(int code, String name) {
this.code = code
this.name = name
}
int getCode() {
code
}
String getName() {
name
}
}
ext {
def appMajor = 3
def appMinor = 2
def appPatch = 0
def appBuild = 0
def suffix = VersionSuffix.PRODUCT
appVersionCode = appMajor * 1000000 + appMinor * 10000 + appPatch * 1000 + suffix.code * 100 + appBuild
appVersionName = suffix == VersionSuffix.PRODUCT ?
"${appMajor}.${appMinor}.${appPatch}" :
"${appMajor}.${appMinor}.${appPatch}-${suffix.name} ${appBuild}"
}