forked from xmartlabs/gong
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
167 lines (145 loc) · 5.46 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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
buildscript {
addRepos(repositories)
dependencies {
classpath buildscriptDeps.firebaseCrashlyticsPlugin
classpath buildscriptDeps.snapshotPublisher
classpath buildscriptDeps.navigationSafeArgPlugin
}
}
apply plugin: 'com.android.application'
apply from: rootProject.file('scripts/versioning.gradle')
apply from: rootProject.file('scripts/read_properties.gradle')
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
apply plugin: 'org.jetbrains.kotlin.android.extensions'
apply plugin: 'androidx.navigation.safeargs.kotlin'
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: Enable Crashlytics
// apply plugin: 'com.google.firebase.crashlytics'
repositories {
maven { url 'https://maven.fabric.io/public' }
}
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"'
}
buildFeatures.viewBinding = 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"
ext.buildTypeCode = 0
applicationIdSuffix '.dev'
}
prod {
buildConfigField 'String', 'API_BASE_URL', getEnvVariable('API_PROD_SERVER_URL')
dimension "env"
ext.buildTypeCode = 4
}
}
packagingOptions {
exclude 'META-INF/LICENSE' // will not include LICENSE file
}
lintOptions {
lintConfig file("lint.xml")
disable "UnsafeExperimentalUsageError", "UnsafeExperimentalUsageWarning"
fatal 'StopShip'
warningsAsErrors true
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
androidExtensions {
experimental = true
}
kotlinOptions {
jvmTarget = '1.8'
freeCompilerArgs = ["-XXLanguage:+InlineClasses", "-Xopt-in=kotlin.RequiresOptIn", "-Xallow-result-return-type"]
}
}
dependencies {
androidTestImplementation deps.androidX.test.junit
androidTestImplementation deps.androidX.test.espresso
debugImplementation deps.debugDb
debugImplementation deps.leakcanary
devImplementation deps.androidSwissKnife.navigationDebug
implementation deps.androidSwissKnife.core
implementation deps.androidSwissKnife.dataStore
implementation deps.androidSwissKnife.navigation
implementation deps.androidX.appcompat
implementation deps.androidX.cardview
implementation deps.androidX.constraintLayout
implementation deps.androidX.dataStore
implementation deps.androidX.design
implementation deps.androidX.lifecycle.livedata
implementation deps.androidX.lifecycle.runtime
implementation deps.androidX.lifecycle.saveState
implementation deps.androidX.lifecycle.viewmodel
implementation deps.androidX.navigation.fragment
implementation deps.androidX.navigation.ui
implementation deps.androidX.recyclerview
implementation deps.androidX.room.coreKtx
implementation deps.androidX.transition
implementation deps.androidX.viewPager2
implementation deps.coil
implementation deps.firebase.crashlytics
implementation deps.koin.android
implementation deps.koin.fragments
implementation deps.koin.scope
implementation deps.koin.viewModel
implementation deps.kotlin.core
implementation deps.kotlin.coroutines.core
implementation deps.kotlin.reflect
implementation deps.okhttp3.core
implementation deps.okhttp3.loggingIntercepror
implementation deps.okhttp3.ok2CurlInterceptor
implementation deps.okhttp3.stetho
implementation deps.okhttp3.urlconnection
implementation deps.okIo
implementation deps.once
implementation deps.retrofit2.core
implementation deps.retrofit2.gsonAdapter
implementation deps.stetho
implementation deps.timber
kapt deps.androidX.room.compiler
testImplementation deps.junit
}