11import org.jetbrains.kotlin.config.KotlinCompilerVersion
22import java.util.Properties
33
4- val devCycle = false
5-
64plugins {
75 id(" com.android.application" )
86 kotlin(" android" )
@@ -11,15 +9,25 @@ plugins {
119}
1210
1311android {
14- namespace = " com.androidvip.sysctlgui"
15- compileSdk = 32
16- compileOptions {
17- sourceCompatibility = JavaVersion .VERSION_1_8
18- targetCompatibility = JavaVersion .VERSION_1_8
19- }
12+ namespace = AppConfig .appId
13+ compileSdk = AppConfig .compileSdkVersion
2014
21- kotlinOptions {
22- jvmTarget = " 1.8"
15+ defaultConfig {
16+ applicationId = AppConfig .appId
17+ minSdk = AppConfig .minSdkVersion
18+ targetSdk = AppConfig .targetSdlVersion
19+ versionCode = 11
20+ versionName = " 2.0.0"
21+ vectorDrawables.useSupportLibrary = true
22+ resourceConfigurations.addAll(listOf (" en" , " de" , " pt-rBR" ))
23+ javaCompileOptions {
24+ annotationProcessorOptions {
25+ arguments + = mapOf (
26+ " room.incremental" to " true" ,
27+ " room.schemaLocation" to " $projectDir /schemas"
28+ )
29+ }
30+ }
2331 }
2432
2533 signingConfigs {
@@ -36,29 +44,11 @@ android {
3644 }
3745 }
3846
39- defaultConfig {
40- applicationId = " com.androidvip.sysctlgui"
41- minSdk = 21
42- targetSdk = 32
43- versionCode = 11
44- versionName = " 2.0.0"
45- vectorDrawables.useSupportLibrary = true
46- resourceConfigurations.addAll(listOf (" en" , " de" , " pt-rBR" ))
47- javaCompileOptions {
48- annotationProcessorOptions {
49- arguments + = mapOf (
50- " room.incremental" to " true" ,
51- " room.schemaLocation" to " $projectDir /schemas"
52- )
53- }
54- }
55- }
56-
5747 buildTypes {
5848 getByName(" release" ) {
59- isMinifyEnabled = ! devCycle
60- isShrinkResources = ! devCycle
61- isDebuggable = devCycle
49+ isMinifyEnabled = ! AppConfig . devCycle
50+ isShrinkResources = ! AppConfig . devCycle
51+ isDebuggable = AppConfig . devCycle
6252 signingConfig = signingConfigs.getByName(" release" )
6353 proguardFiles(
6454 getDefaultProguardFile(" proguard-android-optimize.txt" ),
@@ -69,8 +59,8 @@ android {
6959 }
7060
7161 buildFeatures {
72- viewBinding = true
73- dataBinding = true
62+ android.buildFeatures. viewBinding = true
63+ android.buildFeatures. dataBinding = true
7464 }
7565
7666 sourceSets {
@@ -92,16 +82,14 @@ android {
9282 )
9383 )
9484 }
95- }
9685
97- android.applicationVariants.forEach { variant ->
98- val defaultConfig = android.defaultConfig
99- variant.outputs.all {
100- var fileName = " sysctlgui"
101- fileName + = " -v${defaultConfig.versionName} (${defaultConfig.versionCode} )"
102- fileName + = if (variant.buildType.name == " release" ) " .apk" else " -SNAPSHOT.apk"
86+ compileOptions {
87+ sourceCompatibility = JavaVersion .VERSION_1_8
88+ targetCompatibility = JavaVersion .VERSION_1_8
89+ }
10390
104- outputFile.renameTo(File (outputFile.path, fileName))
91+ kotlinOptions {
92+ jvmTarget = " 1.8"
10593 }
10694}
10795
@@ -110,35 +98,27 @@ kapt {
11098}
11199
112100dependencies {
113- implementation(project(" :domain" ))
114- implementation(project(" :data" ))
115- implementation(project(" :common:utils" ))
116- implementation(project(" :common:design" ))
117-
118101 implementation(fileTree(mapOf (" dir" to " libs" , " include" to listOf (" *.jar" ))))
119102 implementation(kotlin(" stdlib-jdk8" , KotlinCompilerVersion .VERSION ))
120- implementation(" org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.2" )
121-
122- implementation(" io.insert-koin:koin-android:3.1.3" )
123-
124- implementation(" androidx.appcompat:appcompat:1.6.0-alpha05" )
125- implementation(" androidx.constraintlayout:constraintlayout:2.1.4" )
126- implementation(" androidx.core:core-ktx:1.8.0" )
127- implementation(" androidx.core:core-splashscreen:1.0.0" )
128- implementation(" androidx.lifecycle:lifecycle-livedata-ktx:2.4.0" )
129- implementation(" androidx.navigation:navigation-fragment-ktx:2.4.0" )
130- implementation(" androidx.navigation:navigation-ui-ktx:2.4.0" )
131- implementation(" androidx.preference:preference-ktx:1.2.0" )
132- implementation(" androidx.swiperefreshlayout:swiperefreshlayout:1.1.0" )
133- implementation(" androidx.room:room-ktx:2.4.0" )
134- implementation(" androidx.room:room-runtime:2.4.0" )
135-
136- implementation(" com.google.android.material:material:1.7.0-alpha03" )
137- implementation(" com.google.code.gson:gson:2.8.6" )
138-
139- implementation(" com.getkeepsafe.taptargetview:taptargetview:1.13.3" )
140- implementation(" com.github.topjohnwu.libsu:core:2.5.1" )
141- implementation(" com.github.hadilq:live-event:1.3.0" )
142-
143- kapt(" androidx.room:room-compiler:2.4.0" )
103+
104+ implementation(project(Modules .domain))
105+ implementation(project(Modules .data))
106+ implementation(project(Modules .utils))
107+ implementation(project(Modules .design))
108+
109+ implementation(AndroidX .splashScreen)
110+ implementation(AndroidX .lifecycleLiveData)
111+ implementation(AndroidX .navigationFragment)
112+ implementation(AndroidX .navigationUi)
113+ implementation(AndroidX .preference)
114+ implementation(AndroidX .room)
115+ implementation(AndroidX .roomRuntime)
116+ kapt(AndroidX .roomCompiler)
117+
118+ implementation(Google .gson)
119+
120+ implementation(Dependencies .koinAndroid)
121+ implementation(Dependencies .libSuCore)
122+ implementation(Dependencies .liveEvent)
123+ implementation(Dependencies .tapTargetView)
144124}
0 commit comments