11plugins {
2- id ' com.android.application'
3- id ' kotlin-android'
4- id ' kotlin-android-extensions'
5- id ' kotlin-kapt'
6- id ' dagger.hilt.android.plugin'
7- id " androidx.navigation.safeargs.kotlin"
2+ id( " com.android.application" )
3+ id( " kotlin-android" )
4+ id( " kotlin-android-extensions" )
5+ id( " kotlin-kapt" )
6+ id( " dagger.hilt.android.plugin" )
7+ id( " androidx.navigation.safeargs.kotlin" )
88}
99
1010android {
11- compileSdk 31
11+ compileSdk(AppConfig . compileSdk)
12+ // buildToolsVersion(AppConfig.buildToolsVersion)
1213
1314 defaultConfig {
14- applicationId " com.milad.githoob "
15- minSdk 21
16- targetSdk 31
17- versionCode 1
18- versionName " 1.0 "
15+ applicationId = AppConfig . applicationId
16+ minSdkVersion( AppConfig . minSdk)
17+ targetSdkVersion( AppConfig . targetSdk)
18+ versionCode = AppConfig . versionCode
19+ versionName = AppConfig . versionName
1920
20- testInstrumentationRunner " androidx.test.runner.AndroidJUnitRunner "
21+ testInstrumentationRunner = AppConfig . androidTestInstrumentation
2122 }
2223
2324 buildTypes {
2425 release {
25- minifyEnabled false
26- proguardFiles getDefaultProguardFile(' proguard-android-optimize.txt' ), ' proguard-rules.pro'
26+ minifyEnabled = false
27+ proguardFiles(
28+ getDefaultProguardFile(" proguard-android-optimize.txt" ),
29+ " proguard-rules.pro"
30+ )
2731 }
2832 }
33+
34+ flavorDimensions(AppConfig . dimension)
35+ productFlavors {
36+ create(" staging" ) {
37+ applicationIdSuffix = " .staging"
38+ setDimension(AppConfig . dimension)
39+ }
40+
41+ create(" production" ) {
42+ setDimension(AppConfig . dimension)
43+ }
44+ }
45+
2946 compileOptions {
30- sourceCompatibility JavaVersion . VERSION_1_8
31- targetCompatibility JavaVersion . VERSION_1_8
47+ sourceCompatibility = JavaVersion . VERSION_1_8
48+ targetCompatibility = JavaVersion . VERSION_1_8
3249 }
3350 kotlinOptions {
34- jvmTarget = ' 1.8 '
51+ jvmTarget = AppConfig . jvmTarget
3552 }
3653 buildFeatures {
37- viewBinding true
38- dataBinding true
54+ viewBinding = true
55+ dataBinding = true
3956 }
4057}
4158
4259dependencies {
43-
44- implementation ' androidx.core:core-ktx:1.6.0'
45- implementation ' androidx.appcompat:appcompat:1.3.1'
46- implementation ' com.google.android.material:material:1.5.0-alpha04'
47- implementation ' androidx.constraintlayout:constraintlayout:2.1.1'
48-
49- implementation ' androidx.navigation:navigation-fragment-ktx:2.3.5'
50- implementation ' androidx.navigation:navigation-ui-ktx:2.3.5'
51-
52- // Coroutines
53- implementation ' org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.0'
54- implementation ' org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.0'
55- implementation ' androidx.legacy:legacy-support-v4:1.0.0'
56- implementation ' androidx.recyclerview:recyclerview:1.2.1'
57-
58- testImplementation ' junit:junit:'
59- androidTestImplementation ' androidx.test.ext:junit:1.1.3'
60- androidTestImplementation ' androidx.test.espresso:espresso-core:3.4.0'
61-
62- // Coroutine Lifecycle Scopes
63- implementation " androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1"
64- implementation " androidx.lifecycle:lifecycle-runtime-ktx:2.3.1"
65- implementation ' androidx.lifecycle:lifecycle-livedata-ktx:2.3.1'
66- implementation ' androidx.lifecycle:lifecycle-extensions:2.2.0'
67-
68- implementation " androidx.activity:activity-ktx:1.3.1"
69-
70- implementation ' android.arch.lifecycle:extensions:1.1.1'
71-
72- implementation ' com.google.code.gson:gson:2.8.7'
73- implementation ' com.squareup.retrofit2:retrofit:2.9.0'
74- implementation ' com.squareup.retrofit2:converter-gson:2.9.0'
75- implementation " com.squareup.okhttp3:logging-interceptor:4.5.0"
76-
77- implementation " com.google.dagger:hilt-android:2.39"
78- kapt " com.google.dagger:hilt-compiler:2.38.1"
79- implementation " androidx.hilt:hilt-lifecycle-viewmodel:1.0.0-alpha03"
80- kapt " androidx.hilt:hilt-compiler:1.0.0"
81-
82- // Glide dependency
83- implementation ' com.github.bumptech.glide:glide:4.12.0'
84- annotationProcessor ' com.github.bumptech.glide:compiler:4.11.0'
85- implementation ' jp.wasabeef:glide-transformations:3.0.1'
86-
87- implementation " androidx.datastore:datastore-preferences:1.0.0"
88-
89- implementation ' com.jakewharton.timber:timber:5.0.1'
90-
91- implementation " io.noties.markwon:core:4.6.2"
92- implementation " io.noties.markwon:html:4.6.2"
93- implementation " io.noties.markwon:image:4.6.2"
60+ // implementation(fileTree(mapOf("dir" to "libs", "include" to listOf("*.jar"))))
61+ implementation(AppDependencies . appLibraries)
62+ kapt(AppDependencies . kaptLibraries)
63+ annotationProcessor(AppDependencies . annotationLibraries)
64+ testImplementation(AppDependencies . testLibraries)
65+ androidTestImplementation(AppDependencies . androidTestLibraries)
9466}
0 commit comments