-
Notifications
You must be signed in to change notification settings - Fork 0
/
common-android-dynamic-feature.gradle
90 lines (71 loc) · 2.31 KB
/
common-android-dynamic-feature.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
import tradly.Config
apply plugin: 'com.android.dynamic-feature'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-android-extensions'
apply from: "$rootDir/common-defaultconfig.gradle"
apply from: "$rootDir/common-android-flavour-dynamic-feature.gradle"
android {
compileSdkVersion Config.compileSDK
with commonDefaultConfig
aaptOptions {
ignoreAssetsPattern "!app.properties"
}
buildFeatures {
viewBinding = true
dataBinding true
}
dexOptions {
javaMaxHeapSize "4g"
}
buildTypes {
release {
if (Config.BuildTypes.enableReleaseDebug){
useProguard Config.BuildTypes.Debug.USE_PROGUARD
initWith(buildTypes.debug)
}
else{
useProguard Config.BuildTypes.Release.USE_PROGUARD
}
buildConfigField("String", "BASE_URL", "\"$Config.BaseUrl.PRODUCTION\"")
//proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
proguardFiles 'proguard-rules-dynamic-features.pro'
}
debug {
useProguard Config.BuildTypes.Debug.USE_PROGUARD
buildConfigField("String", "BASE_URL", "\"$Config.BaseUrl.DEBUG\"")
//proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
proguardFiles 'proguard-rules-dynamic-features.pro'
}
sandBox {
initWith(buildTypes.debug)
}
sandBoxRelease {
initWith(buildTypes.release)
buildConfigField("String", "BASE_URL", "\"$Config.BaseUrl.SANDBOX\"")
}
}
lintOptions {
abortOnError false
disable "Instantiatable"
checkReleaseBuilds false
}
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)
}
}
}