-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
161 lines (138 loc) · 5.4 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
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
id 'kotlin-kapt'
id 'dagger.hilt.android.plugin'
id 'org.jetbrains.kotlin.plugin.serialization'
}
kapt {
correctErrorTypes = true
}
def name = "Y2Y"
android {
namespace 'abandonedspace.android.y2y'
compileSdk 33
defaultConfig {
applicationId "abandonedspace.android.y2y"
minSdk 26
targetSdk 33
versionCode 1
versionName "1.0"
manifestPlaceholders = [
APP_NAME: "$name",
APP_NAME_SUFFIX: "",
]
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
useSupportLibrary true
}
def localPropertiesFile = rootProject.file("local.properties")
def localProperties = new Properties()
if (localPropertiesFile.exists()) {
localProperties.load(new FileInputStream(localPropertiesFile))
}
javaCompileOptions {
annotationProcessorOptions {
arguments += ["room.schemaLocation": "$projectDir/schemas".toString()]
}
}
buildConfigField("String", "ROOM_DB_NAME", '"Y2Y_DATABASE"')
}
signingConfigs {
release {
def keystorePropertiesFile = rootProject.file("releasekeystore.properties")
if (!keystorePropertiesFile.exists()) {
return
}
def keystoreProperties = new Properties()
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
storeFile file(keystoreProperties['storeFile'])
storePassword keystoreProperties['storePassword']
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
}
}
buildTypes {
release {
minifyEnabled true
shrinkResources true
debuggable false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
}
debug {
minifyEnabled false
shrinkResources false
debuggable true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
manifestPlaceholders.APP_NAME_SUFFIX = " Debug"
applicationIdSuffix '.debug'
testCoverageEnabled true
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
buildFeatures {
compose true
}
composeOptions {
kotlinCompilerExtensionVersion '1.3.2'
}
packagingOptions {
resources {
excludes += '/META-INF/{AL2.0,LGPL2.1}'
}
}
}
dependencies {
implementation 'androidx.core:core-ktx:1.9.0'
// Compose
implementation 'androidx.activity:activity-compose:1.6.1'
implementation "androidx.navigation:navigation-compose:2.5.3"
implementation "androidx.compose.runtime:runtime:$compose_version"
implementation "androidx.compose.material:material:$compose_version"
implementation "androidx.compose.ui:ui-tooling:$compose_version"
implementation "androidx.compose.ui:ui-tooling-preview:$compose_version"
implementation 'androidx.compose.material3:material3:1.1.0-alpha02'
implementation "com.google.android.material:compose-theme-adapter:1.2.1"
// Kotlin
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutines_version"
// Lifecycle
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version"
implementation "androidx.lifecycle:lifecycle-viewmodel-compose:$lifecycle_version"
implementation "androidx.lifecycle:lifecycle-runtime-ktx:$lifecycle_version"
// Dagger Hilt
implementation "com.google.dagger:hilt-android:$hilt_version"
implementation "androidx.hilt:hilt-navigation-compose:1.0.0"
kapt "com.google.dagger:hilt-android-compiler:$hilt_version"
kapt 'androidx.hilt:hilt-compiler:1.0.0'
// Room
implementation "androidx.room:room-runtime:$room_version"
implementation "androidx.room:room-ktx:$room_version"
annotationProcessor "androidx.room:room-compiler:$room_version"
kapt "androidx.room:room-compiler:$room_version"
// Number picker
implementation "com.chargemap.compose:numberpicker:1.0.3"
// Local Unit Tests
implementation "androidx.test:core:1.5.0"
testImplementation "junit:junit:4.13.2"
testImplementation "com.google.truth:truth:1.1.3"
testImplementation "org.mockito:mockito-core:4.11.0"
testImplementation "org.mockito.kotlin:mockito-kotlin:4.1.0"
testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.6.4'
testImplementation 'app.cash.turbine:turbine:0.12.1'
// Instrumented Unit Tests
androidTestImplementation "junit:junit:4.13.2"
androidTestImplementation 'androidx.test.ext:junit:1.1.4'
androidTestImplementation "com.google.truth:truth:1.1.3"
androidTestImplementation 'io.mockk:mockk-android:1.12.4'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.0'
// LeakCanary
debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.9.1'
}