-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbuild.gradle
147 lines (125 loc) · 4.33 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
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
plugins {
id 'com.android.application'
id "kotlin-android"
id "kotlin-parcelize"
id "kotlin-kapt"
id "org.jetbrains.kotlin.plugin.serialization"
id 'com.google.devtools.ksp'
alias(libs.plugins.easyLauncher)
}
apply from: rootProject.file('scripts/versioning.gradle')
apply from: rootProject.file('scripts/read_properties.gradle')
if (getEnvVariable('KEYSTORE_FILE') != null) {
// Avoid Signing not ready issues in Gradle Play Publisher plugin
apply from: rootProject.file('scripts/snapshot_publish.gradle')
}
// TODO: Enable when the services json is added
// apply plugin: 'com.google.gms.google-services'
// TODO: Setup Crashlytics
def CRASHLYTICS_ENABLED = false
android {
compileSdkVersion androidVersions.compileSdk
buildToolsVersion androidVersions.buildTools
defaultConfig {
applicationId "com.xmartlabs.gong"
minSdkVersion androidVersions.minSdk
targetSdkVersion androidVersions.targetSdk
versionCode 1
versionName ""
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled true
// Used to define some constants like the share preferences's file name.
buildConfigField 'String', 'APP_NAME', '"Gong"'
buildConfigField 'boolean', 'CRASHLYTICS_ENABLED', "$CRASHLYTICS_ENABLED"
}
buildFeatures {
compose true
buildConfig = true
}
signingConfigs {
release {
storeFile getEnvVariable('KEYSTORE_FILE') == null ? null : file(getEnvVariable('KEYSTORE_FILE'))
storePassword getEnvVariable('KEYSTORE_PASSWORD')
keyAlias getEnvVariable('KEYSTORE_KEY_ALIAS')
keyPassword getEnvVariable('KEYSTORE_KEY_PASSWORD')
}
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
if (getEnvVariable('KEYSTORE_FILE') != null) {
signingConfig signingConfigs.release
}
}
debug {
minifyEnabled getEnvVariable('MINIFY_CODE', false) as Boolean
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
flavorDimensions = ["env"]
productFlavors {
dev {
buildConfigField 'String', 'API_BASE_URL', getEnvVariable('API_DEV_SERVER_URL')
dimension "env"
applicationIdSuffix '.dev'
}
prod {
buildConfigField 'String', 'API_BASE_URL', getEnvVariable('API_PROD_SERVER_URL')
dimension "env"
}
}
packagingOptions {
resources {
excludes += ['META-INF/LICENSE']
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
kotlinOptions {
languageVersion = "1.9"
jvmTarget = '17'
freeCompilerArgs += [
"-Xallow-result-return-type",
"-opt-in=kotlin.RequiresOptIn",
"-opt-in=kotlin.contracts.ExperimentalContracts",
]
}
composeOptions {
kotlinCompilerExtensionVersion = "1.5.13"
}
namespace 'com.xmartlabs.gong'
lint {
disable 'ObsoleteLintCustomCheck'
disable 'AndroidGradlePluginVersion'
fatal 'StopShip'
lintConfig file('lint.xml')
warningsAsErrors true
}
}
dependencies {
androidTestImplementation libs.bundles.androidXTest
debugImplementation libs.leakcanary
debugImplementation libs.bundles.networking.debug
debugImplementation libs.bundles.flipper
implementation libs.androidX.core.splashscreen
implementation libs.androidX.room.core
implementation libs.androidX.dataStore
implementation libs.coil
implementation libs.once
implementation platform(libs.firebase.bom)
implementation libs.firebase.analytics
implementation libs.firebase.crashlytics
implementation libs.koin.compose
implementation libs.timber
implementation libs.store
implementation libs.bundles.accompanist
implementation libs.bundles.androidSwissKnife
implementation libs.bundles.compose
implementation libs.bundles.kotlin
implementation libs.bundles.networking.core
ksp libs.androidX.room.compiler
testImplementation libs.junit
}