-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
175 lines (145 loc) · 7.01 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
168
169
170
171
172
173
174
175
buildscript {
ext {
kotlin_version = '1.3.61'
}
ext.PluginsVersions = [
"GradlePluginV" : "3.5.3",
"KotlinPluginV" : "1.3.50",
"EasyLauncherPluginV": "1.3.1",
"FirebasePluginV" : "4.3.1",
"KtlintPluginV" : "2.1.1",
"FabricPluginV" : "1.28.1",
"NavigationPluginV" : "2.2.0-rc04",
"VortexPluginV" : "1.0.0",
"RealmPluginV" : "7.0.0-beta-SNAPSHOT"
]
repositories {
google()
jcenter()
mavenCentral()
maven { url 'https://maven.fabric.io/public' }
maven { url "https://plugins.gradle.org/m2/" }
maven { url 'https://jitpack.io' }
maven { url 'https://dl.bintray.com/kotlin/kotlin-eap' }
maven { url "https://dl.bintray.com/yt98/Vortex" }
maven { url 'http://oss.jfrog.org/artifactory/oss-snapshot-local' }
}
dependencies {
classpath "com.android.tools.build:gradle:${rootProject.ext.PluginsVersions.GradlePluginV}"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${rootProject.ext.PluginsVersions.KotlinPluginV}"
classpath "com.akaita.android:easylauncher:${rootProject.ext.PluginsVersions.EasyLauncherPluginV}"
classpath "com.google.gms:google-services:${rootProject.ext.PluginsVersions.FirebasePluginV}"
classpath "org.jmailen.gradle:kotlinter-gradle:${rootProject.ext.PluginsVersions.KtlintPluginV}"
classpath "io.fabric.tools:gradle:${rootProject.ext.PluginsVersions.FabricPluginV}"
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:${rootProject.ext.PluginsVersions.NavigationPluginV}"
classpath "gradle.plugin.io.vortex.gradle.plugin.dependencies:vortex-dependencies-plugin:${rootProject.ext.PluginsVersions.VortexPluginV}"
classpath "io.realm:realm-gradle-plugin:${rootProject.ext.PluginsVersions.RealmPluginV}"
}
}
apply from: "Libraries.gradle"
apply from: "AppDetails.gradle"
allprojects {
repositories {
google()
jcenter()
maven { url 'https://maven.fabric.io/public' }
maven { url "https://plugins.gradle.org/m2/" }
maven { url 'https://dl.bintray.com/kotlin/kotlin-eap' }
maven { url 'https://jitpack.io' }
maven { url "https://dl.bintray.com/yt98/Vortex" }
maven { url 'http://oss.jfrog.org/artifactory/oss-snapshot-local' }
}
}
subprojects {
if (!project.name.contains("app")) {
apply plugin: "${rootProject.ext.AndroidLibraryPlugin}"
apply plugin: "${rootProject.ext.KotlinAndroidPlugin}"
apply plugin: "${rootProject.ext.KotlinAndroidExPlugin}"
apply plugin: "${rootProject.ext.KotlinKaptPlugin}"
apply plugin: "${rootProject.ext.RealmPlugin}"
apply plugin: "${rootProject.ext.VortexPlugin}"
android {
compileSdkVersion rootProject.ext.compileSdkV
buildToolsVersion "${rootProject.ext.BuildToolsVersion}"
defaultConfig {
minSdkVersion rootProject.ext.minSdkV
targetSdkVersion rootProject.ext.compileSdkV
renderscriptTargetApi rootProject.ext.renderscriptTargetApi
renderscriptSupportModeEnabled rootProject.ext.renderscriptSupportModeEnabled
multiDexEnabled rootProject.ext.MultiDexMergeEnabled
versionCode rootProject.ext.VersionCode
versionName "${rootProject.ext.ApplicationVersion}"
buildConfigField "String", "BASE_URL", "\"${ApiUrl}\""
buildConfigField "String", "TRENDING_BASE_URL", "\"${TrendingApiUrl}\""
testInstrumentationRunner "${rootProject.ext.AndroidTest}"
resConfigs "en", "ar"
}
buildTypes {
debug {
minifyEnabled false
debuggable true
manifestPlaceholders = [enableCrashReporting: "false"]
ext.enableCrashlytics = false
ext.alwaysUpdateBuildId = false
proguardFiles getDefaultProguardFile("${rootProject.ext.ProguardFile}"), "${rootProject.ext.Proguard}"
}
release {
minifyEnabled true
debuggable false
ext.enableCrashlytics = true
manifestPlaceholders = [enableCrashReporting: "true"]
proguardFiles getDefaultProguardFile("${rootProject.ext.ProguardFile}"), "${rootProject.ext.Proguard}"
}
}
}
dependencies { config ->
defaultTestingConfiguration(config)
def RxConfiguration = rootProject.ext.RxConfiguration
def KotlinCoroutinesConfiguration = rootProject.ext.KotlinCoroutinesConfiguration
implementation RxConfiguration.RxJava
implementation RxConfiguration.RxAndroid
implementation KotlinCoroutinesConfiguration.Coroutines
implementation KotlinCoroutinesConfiguration.AndroidCoroutines
daggerConfig(config)
if (project.name.equals("domain")) {
lifeCycleConfiguration(config)
}
}
}
}
gradle.projectsEvaluated {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xmaxerrs" << "500"
}
}
void daggerConfig(configuration) {
def DependenciesInjection = rootProject.ext.DependenciesInjection
configuration.kapt DependenciesInjection.MotifCompiler
configuration.implementation DependenciesInjection.Motif
configuration.implementation DependenciesInjection.Dagger
configuration.kapt DependenciesInjection.DaggerCompiler
configuration.implementation DependenciesInjection.DaggerAndroid
configuration.implementation DependenciesInjection.DaggerAndroidSupport
configuration.kapt DependenciesInjection.DaggerAndroidProcessor
}
void defaultTestingConfiguration(configuration) {
def TestingConfiguration = rootProject.ext.TestingConfiguration
configuration.testImplementation TestingConfiguration.Junit
configuration.androidTestImplementation TestingConfiguration.Esspresso
configuration.androidTestImplementation TestingConfiguration.Runner
}
void lifeCycleConfiguration(configuration) {
def LifeCycleConfiguration = rootProject.ext.LifeCycleConfiguration
configuration.implementation LifeCycleConfiguration.LifecycleViewModel
configuration.implementation LifeCycleConfiguration.LifecycleExtensions
configuration.implementation LifeCycleConfiguration.LifecycleRuntime
configuration.implementation LifeCycleConfiguration.LifecycleLiveData
configuration.implementation LifeCycleConfiguration.LifecycleCommon
}
void databaseConfiguration(configuration) {
def RoomConfiguration = rootProject.ext.RoomConfiguration
configuration.implementation RoomConfiguration.RoomRuntime
configuration.kapt RoomConfiguration.RoomCompiler
configuration.implementation RoomConfiguration.RoomKotlin
configuration.implementation RoomConfiguration.RoomRxJava
}