forked from rjrjr/compose-backstack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDefaultAndroidConfigPlugin.kt
More file actions
48 lines (39 loc) · 1.25 KB
/
DefaultAndroidConfigPlugin.kt
File metadata and controls
48 lines (39 loc) · 1.25 KB
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
import com.android.build.gradle.BaseExtension
import org.gradle.api.JavaVersion
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.kotlin.dsl.apply
import org.gradle.kotlin.dsl.configure
/** Configures default values for the android plugins (both apps and libraries). */
@Suppress("UnstableApiUsage")
class DefaultAndroidConfigPlugin : Plugin<Project> {
override fun apply(target: Project) {
target.apply(plugin = "com.android.base")
target.apply(plugin = "kotlin-android")
target.configure<BaseExtension> {
compileSdkVersion(Versions.compileSdk)
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
defaultConfig {
minSdk = Versions.minSdk
targetSdk = Versions.targetSdk
versionCode = 1
versionName = "1.0"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
buildFeatures.apply {
buildConfig = false
compose = true
}
composeOptions {
kotlinCompilerExtensionVersion = Versions.composeCompiler
}
packagingOptions {
excludes += "META-INF/AL2.0"
excludes += "META-INF/LGPL2.1"
}
}
}
}