1- apply plugin : ' com.android.application'
1+ plugins {
2+ id " com.android.application"
3+ id " kotlin-android"
4+ id " kotlin-kapt"
5+ id " com.google.gms.google-services"
6+ id " com.google.firebase.crashlytics"
27
3- apply plugin : ' kotlin-android'
4-
5- apply plugin : ' kotlin-kapt'
6-
7- apply plugin : ' dagger.hilt.android.plugin'
8-
9- apply plugin : ' com.google.gms.google-services'
10-
11- apply plugin : ' com.google.firebase.crashlytics'
8+ }
129
1310android {
1411 compileSdkVersion 31
@@ -18,7 +15,7 @@ android {
1815 targetSdkVersion 31
1916 versionCode 42
2017 versionName " 1.0"
21- testInstrumentationRunner ' com.rootstrap.android.CustomTestRunner'
18+ testInstrumentationRunner " com.rootstrap.android.CustomTestRunner"
2219 }
2320
2421 compileOptions {
@@ -32,7 +29,7 @@ android {
3229 }
3330
3431 kotlinOptions {
35- jvmTarget = ' 1.8'
32+ jvmTarget = " 1.8"
3633 }
3734
3835 signingConfigs {
@@ -45,50 +42,37 @@ android {
4542 }
4643
4744 buildTypes {
48- debug {
49- minifyEnabled false
50- }
51-
52- release {
53- signingConfig signingConfigs. releaseConfig
45+ getByName(" debug" ) {
46+ applicationIdSuffix = " .debug"
47+ versionNameSuffix " -debug"
5448 minifyEnabled false
55- proguardFiles getDefaultProguardFile(' proguard-android.txt' ), ' proguard-rules.pro'
56- }
57- }
58-
59- kapt {
60- correctErrorTypes true
61- }
62-
63- flavorDimensions " server"
64-
65- productFlavors {
66- dev {
67- dimension " server"
68- applicationIdSuffix " .dev"
69- versionNameSuffix " -dev"
7049 buildConfigField(" String" , " API_URL" , " \" https://rails5-api-base.herokuapp.com/api/v1/\" " )
7150 buildConfigField(" String" , " SECURE_KEY_ALIAS" , " \" $projectKeyAlias \" " )
7251 buildConfigField(" String" , " SECURE_FILE_NAME" , " \" appPreferencesDev\" " )
7352 }
7453
75- staging {
76- dimension " server "
77- applicationIdSuffix " .staging"
78- versionNameSuffix " -staging "
54+ create( " staging" ) {
55+ initWith(getByName( " debug " ))
56+ applicationIdSuffix = " .staging"
57+ initWith(getByName( " debug " ))
7958 buildConfigField(" String" , " API_URL" , " \" https://proj-staging.herokuapp.com/api/\" " )
80- buildConfigField(" String" , " SECURE_KEY_ALIAS" , " \" $projectKeyAlias \" " )
8159 buildConfigField(" String" , " SECURE_FILE_NAME" , " \" appPreferencesStaging\" " )
8260 }
8361
84- prod {
85- dimension " server"
62+ getByName(" release" ) {
63+ signingConfig signingConfigs. releaseConfig
64+ minifyEnabled false
65+ proguardFiles getDefaultProguardFile(' proguard-android.txt' ), ' proguard-rules.pro'
8666 buildConfigField(" String" , " API_URL" , " \" https://proj-production.herokuapp.com/api/\" " )
8767 buildConfigField(" String" , " SECURE_KEY_ALIAS" , " \" $projectKeyAlias \" " )
8868 buildConfigField(" String" , " SECURE_FILE_NAME" , " \" appPreferences\" " )
8969 }
9070 }
9171
72+ kapt {
73+ correctErrorTypes true
74+ }
75+
9276 applicationVariants. all { variant ->
9377 variant. outputs. all { output ->
9478 def apk = output. outputFile
@@ -139,80 +123,20 @@ android {
139123}
140124
141125dependencies {
142- def room_version = " 2.3.0"
143- def lifecycle_version = " 2.4.0"
144- def mockkVersion = ' 1.12.0'
126+
127+ implementation project(" :data" )
128+ implementation project(" :domain" )
129+ implementation project(" :usecases" )
145130
146131 implementation fileTree(include : [' *.jar' ], dir : ' libs' )
147- implementation ' org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.1'
148- implementation ' androidx.appcompat:appcompat:1.3.1'
149- implementation ' androidx.core:core-ktx:1.7.0'
150- implementation ' androidx.constraintlayout:constraintlayout:2.1.1'
151- implementation ' androidx.legacy:legacy-support-v4:1.0.0'
152- implementation " androidx.preference:preference-ktx:1.1.1"
153- implementation ' com.google.android.material:material:1.4.0'
154- testImplementation ' junit:junit:4.13.1'
155- testImplementation ' org.mockito:mockito-core:2.28.2'
156- testImplementation " org.jetbrains.kotlinx:kotlinx-coroutines-test:1.5.1"
157- testImplementation ' android.arch.core:core-testing:1.1.1'
158- testImplementation " io.mockk:mockk:$mockkVersion "
159-
160- androidTestImplementation ' androidx.test:runner:1.4.0'
161- androidTestImplementation ' androidx.test.espresso:espresso-core:3.4.0'
162- androidTestImplementation ' androidx.test.espresso:espresso-intents:3.4.0'
163- androidTestImplementation ' androidx.test.ext:junit:1.1.3'
164- androidTestImplementation ' androidx.test.uiautomator:uiautomator:2.2.0'
165- androidTestImplementation ' androidx.test:rules:1.4.0'
166- androidTestImplementation ' com.squareup.okhttp3:mockwebserver:4.3.1'
167-
168- // ---- ROOM ----
169- implementation " androidx.room:room-runtime:$room_version "
170- kapt " androidx.room:room-compiler:$room_version "
171- // Kotlin Extensions and Coroutines support for Room
172- implementation " androidx.room:room-ktx:$room_version "
173-
174- // ---- LIFECYCLE ----]
175- implementation " androidx.lifecycle:lifecycle-runtime-ktx:$lifecycle_version "
176- implementation " androidx.lifecycle:lifecycle-livedata-ktx:$lifecycle_version "
177- implementation " androidx.lifecycle:lifecycle-extensions:2.2.0"
178- implementation " androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version "
179- implementation " androidx.lifecycle:lifecycle-common-java8:$lifecycle_version "
180-
181- // ---- GOOGLE JSON SERIALIZER/DESERIALIZER ----
182- implementation ' com.google.code.gson:gson:2.8.6'
183-
184- // ---- MixPanel ----
185- implementation ' com.mixpanel.android:mixpanel-android:5.6.1'
186-
187- // ---- Firebase ----
188- implementation platform(' com.google.firebase:firebase-bom:28.4.2' )
189- implementation ' com.google.firebase:firebase-core:20.0.0'
190- implementation ' com.google.firebase:firebase-analytics-ktx'
191- implementation ' com.google.firebase:firebase-crashlytics-ktx'
192- implementation ' org.jetbrains.kotlin:kotlin-reflect:1.5.31'
193-
194- // ---- Image ----
195- implementation group : ' com.github.bumptech.glide' , name : ' glide' , version : ' 4.10.0'
196-
197- // ---- Network ----
198- implementation ' com.squareup.retrofit2:retrofit:2.6.2'
199- implementation ' com.squareup.moshi:moshi-kotlin:1.12.0'
200- implementation ' com.squareup.retrofit2:converter-moshi:2.5.0'
201- implementation ' com.squareup.okhttp3:logging-interceptor:4.3.1'
202-
203- // ---- Events ----
204- implementation ' com.squareup:otto:1.3.8'
205-
206- // ---- Linters ----
207- ktlint " com.pinterest:ktlint:0.35.0"
208-
209- // ---- Hilt ----
210- implementation " com.google.dagger:hilt-android:$hilt_version "
211- kapt " com.google.dagger:hilt-android-compiler:$hilt_version "
212- kapt ' androidx.hilt:hilt-compiler:1.0.0'
213- androidTestImplementation " com.google.dagger:hilt-android-testing:$hilt_version "
214- kaptAndroidTest " com.google.dagger:hilt-android-compiler:$hilt_version "
215-
216- // security crypto
217- implementation " androidx.security:security-crypto:1.1.0-alpha03"
132+
133+ implementation androidLibs. values()
134+ implementation androidDataLibs. values()
135+ implementation kotlinLibs. values()
136+ implementation platform(Libs . firebaseBom)
137+ implementation libs. values()
138+ kapt androidKaptLibs. values()
139+ ktlint ktlintLibs. values()
140+ testImplementation testLibs. values()
141+ androidTestImplementation androidTestLibs. values()
218142}
0 commit comments