-
Notifications
You must be signed in to change notification settings - Fork 26
/
build.gradle.kts
110 lines (87 loc) · 2.92 KB
/
build.gradle.kts
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
import java.io.FileInputStream
import java.util.Properties
plugins {
alias(libs.plugins.onelist.android.application)
alias(libs.plugins.onelist.android.application.compose)
alias(libs.plugins.onelist.android.koin)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.firebase.crashlytics)
}
if (gradle.startParameter.taskNames.toString().contains("Release")) {
plugins.apply("com.google.gms.google-services")
}
android {
namespace = "com.lolo.io.onelist"
val versionPropsFile = file("../version.properties")
var versionCodeCI: Int? = null
if (versionPropsFile.canRead()) {
val versionProps = Properties()
versionProps.load(FileInputStream(versionPropsFile))
versionCodeCI = (versionProps["VERSION_CODE"] as String).toInt()
}
defaultConfig {
multiDexEnabled = true
applicationId = "com.lolo.io.onelist"
// version code elvis right operand should be incremented too when publishing a new release, for fDroid build.
versionCode = versionCodeCI ?: 20
versionName = "1.5.0"
vectorDrawables.useSupportLibrary = true
testBuildType = "instrumented"
testInstrumentationRunner =
"com.lolo.io.onelist.core.testing.OneListTestRunner"
}
androidResources {
generateLocaleConfig = true
}
testOptions {
unitTests {
// For Robolectric
isIncludeAndroidResources = true
}
}
buildFeatures {
buildConfig = true
compose = true
}
signingConfigs {
create("release") {
storeFile = file("keystore.jks")
storePassword = System.getenv("ONELIST_KEYSTORE_PASSWORD")
keyAlias = System.getenv("ONELIST_KEYSTORE_ALIAS")
keyPassword = System.getenv("ONELIST_KEYSTORE_ALIAS_PASSWORD")
}
}
buildTypes {
debug {
applicationIdSuffix = ".debug"
versionNameSuffix = "-DEBUG"
}
release {
isMinifyEnabled = true
isShrinkResources = true
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
resValue("string", "app_name", "1List")
signingConfig = signingConfigs.getByName("release")
}
create("instrumented") {
initWith(getByName("debug"))
applicationIdSuffix = ".tst"
versionNameSuffix = "-TEST"
matchingFallbacks.add("debug")
}
}
}
dependencies {
implementation(libs.androidx.core.splashscreen)
releaseImplementation(libs.firebase.crashlytics)
implementation(libs.storage)
// projects
implementation(projects.core.designsystem)
implementation(projects.core.domain)
implementation(projects.feature.lists)
implementation(projects.feature.settings)
implementation(projects.feature.whatsnew)
}