forked from isaac-udy/Enro
-
Notifications
You must be signed in to change notification settings - Fork 0
/
common.gradle
76 lines (64 loc) · 2.02 KB
/
common.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
def versionProperties = new Properties()
versionProperties.load(new FileInputStream(rootProject.file("version.properties")))
ext.androidLibrary = {
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-parcelize'
android {
compileSdkVersion 32
defaultConfig {
minSdkVersion 21
targetSdkVersion 32
versionCode versionProperties.getProperty("versionCode").toInteger()
versionName versionProperties.getProperty("versionName")
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8.toString()
}
buildFeatures {
buildConfig = false
viewBinding = true
}
}
kotlin {
explicitApi()
}
dependencies {
implementation deps.kotlin.stdLib
}
}
ext.useCompose = {
android {
buildFeatures {
compose true
}
composeOptions {
kotlinCompilerVersion "1.7.0"
kotlinCompilerExtensionVersion "1.2.0"
}
}
dependencies {
implementation deps.compose.compiler
implementation deps.compose.foundation
implementation deps.compose.foundationLayout
implementation deps.compose.ui
implementation deps.compose.uiTooling
implementation deps.compose.runtime
implementation deps.compose.viewmodel
implementation deps.compose.livedata
implementation deps.compose.activity
implementation deps.compose.material
}
}