-
Notifications
You must be signed in to change notification settings - Fork 0
/
common-android-library.gradle
84 lines (68 loc) · 2.27 KB
/
common-android-library.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
import tradly.Config
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-android-extensions'
apply from: "$rootDir/common-flavours.gradle"
apply from: "$rootDir/common-defaultconfig.gradle"
android {
compileSdkVersion Config.compileSDK
with commonDefaultConfig
aaptOptions {
ignoreAssetsPattern "!app.properties"
}
buildFeatures {
dataBinding true
viewBinding = true
}
buildTypes {
release {
if (Config.BuildTypes.enableReleaseDebug){
minifyEnabled Config.BuildTypes.Debug.MINIFY_ENABLED
useProguard Config.BuildTypes.Debug.USE_PROGUARD
crunchPngs Config.BuildTypes.Debug.CRUNCH_PNGS
initWith(buildTypes.debug)
}
else{
minifyEnabled Config.BuildTypes.Release.MINIFY_ENABLED
useProguard Config.BuildTypes.Release.USE_PROGUARD
crunchPngs Config.BuildTypes.Release.CRUNCH_PNGS
}
buildConfigField("String", "BASE_URL", "\"$Config.BaseUrl.PRODUCTION\"")
}
debug {
minifyEnabled Config.BuildTypes.Debug.MINIFY_ENABLED
useProguard Config.BuildTypes.Debug.USE_PROGUARD
crunchPngs Config.BuildTypes.Debug.CRUNCH_PNGS
buildConfigField("String", "BASE_URL", "\"$Config.BaseUrl.DEBUG\"")
}
sandBox {
initWith(buildTypes.debug)
buildConfigField("String", "BASE_URL", "\"$Config.BaseUrl.SANDBOX\"")
}
sandBoxRelease {
initWith(buildTypes.release)
buildConfigField("String", "BASE_URL", "\"$Config.BaseUrl.SANDBOX\"")
}
}
with flavours
packagingOptions {
exclude 'META-INF/rxjava.properties'
exclude 'META-INF/metadata.kotlin_module'
}
compileOptions {
sourceCompatibility Config.sourceCompatibility
targetCompatibility Config.targetCompatibility
}
kotlinOptions {
jvmTarget = Config.jvmTarget
}
variantFilter { variant -> // these variants are not needed
if(
variant.name == "tradlySocialSandBoxRelease"
)
{
setIgnore(true)
}
}
}