create convention plugins for common config
This commit is contained in:
parent
0128de4bac
commit
f3600290c8
|
@ -0,0 +1,14 @@
|
|||
plugins {
|
||||
id 'groovy-gradle-plugin'
|
||||
}
|
||||
|
||||
repositories {
|
||||
gradlePluginPortal()
|
||||
google()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
println(libs.versions.android.gp.get())
|
||||
implementation "com.android.tools.build:gradle:${libs.versions.android.gp.get()}"
|
||||
// implementation "org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.20"
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
dependencyResolutionManagement {
|
||||
versionCatalogs {
|
||||
create("libs") {
|
||||
from(files("../gradle/libs.versions.toml"))
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
plugins {
|
||||
id 'st-android-library-conventions'
|
||||
}
|
||||
|
||||
android {
|
||||
buildFeatures.compose = true
|
||||
composeOptions {
|
||||
kotlinCompilerExtensionVersion = libs.versions.compose.compiler.get()
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation libs.compose.ui
|
||||
implementation libs.compose.foundation
|
||||
implementation libs.compose.material.three
|
||||
implementation libs.compose.icons.extended
|
||||
implementation libs.compose.activity
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
plugins {
|
||||
// id "kotlin-android"
|
||||
}
|
||||
|
||||
//
|
||||
//tasks.withType(Class.forName("org.jetbrains.kotlin.gradle.tasks.KotlinCompile.KotlinCompile")).configureEach {
|
||||
// kotlinOptions {
|
||||
// jvmTarget = "1.8"
|
||||
// freeCompilerArgs = [
|
||||
// '-opt-in=kotlin.contracts.ExperimentalContracts',
|
||||
// '-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi',
|
||||
// ]
|
||||
// }
|
||||
//}
|
||||
|
||||
def androidSdkVersion = 33
|
||||
|
||||
android {
|
||||
compileSdk androidSdkVersion
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
incremental = true
|
||||
}
|
||||
defaultConfig {
|
||||
minSdkVersion 24
|
||||
targetSdkVersion androidSdkVersion
|
||||
}
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
plugins {
|
||||
id "com.android.library"
|
||||
id "st-android-conventions"
|
||||
}
|
||||
|
||||
android {
|
||||
variantFilter { variant ->
|
||||
if (variant.name == "debug") {
|
||||
variant.ignore = true
|
||||
}
|
||||
}
|
||||
|
||||
buildFeatures {
|
||||
buildConfig = false
|
||||
dataBinding = false
|
||||
aidl = false
|
||||
renderScript = false
|
||||
resValues = false
|
||||
shaders = false
|
||||
viewBinding = false
|
||||
}
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
plugins {
|
||||
id "com.android.application"
|
||||
id "st-android-conventions"
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
plugins {
|
||||
id 'st-android-compose-library-conventions'
|
||||
}
|
Loading…
Reference in New Issue