forked from savvasdalkitsis/uhuruphotos-android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
80 lines (69 loc) · 2.7 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
buildscript {
ext {
kotlin_version = '1.6.20'
compose_version = '1.2.0-alpha08'
}
dependencies {
classpath 'com.google.dagger:hilt-android-gradle-plugin:2.41'
classpath 'com.squareup.sqldelight:gradle-plugin:1.5.3'
}
project.ext.set("app_version_code", 8)
project.ext.set("app_version_name", "0.0.15")
}// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id 'com.android.application' version '7.1.3' apply false
id 'com.android.library' version '7.1.3' apply false
id 'org.jetbrains.kotlin.android' version "$kotlin_version" apply false
id 'com.squareup.sqldelight' version '1.5.3' apply false
id 'com.google.android.libraries.mapsplatform.secrets-gradle-plugin' version '2.0.1' apply false
}
task clean(type: Delete) {
delete rootProject.buildDir
}
subprojects {
if (name == "app") {
apply plugin: "com.android.application"
} else {
apply plugin: "com.android.library"
}
apply plugin: 'org.jetbrains.kotlin.android'
apply plugin: 'kotlin-kapt'
android {
compileSdk 31
defaultConfig {
minSdk 21
targetSdk 31
buildConfigField 'int', 'APP_VERSION_CODE', "${project.app_version_code}"
buildConfigField 'String', 'APP_VERSION_NAME', "\"${project.app_version_name}\""
}
buildTypes {
release {
minifyEnabled false
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
}
dependencies {
kapt "com.google.dagger:hilt-compiler:2.41"
kapt "androidx.hilt:hilt-compiler:1.0.0"
}
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
kotlinOptions {
freeCompilerArgs += "-opt-in=com.google.accompanist.permissions.ExperimentalPermissionsApi"
freeCompilerArgs += "-opt-in=androidx.compose.animation.ExperimentalAnimationApi"
freeCompilerArgs += "-opt-in=androidx.compose.foundation.ExperimentalFoundationApi"
freeCompilerArgs += "-opt-in=androidx.compose.material.ExperimentalMaterialApi"
freeCompilerArgs += "-opt-in=androidx.compose.ui.ExperimentalComposeUiApi"
freeCompilerArgs += "-opt-in=coil.annotation.ExperimentalCoilApi"
freeCompilerArgs += "-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi"
freeCompilerArgs += "-opt-in=kotlinx.coroutines.FlowPreview"
freeCompilerArgs += "-Xcontext-receivers"
}
}
}