mirror of
https://github.com/ouchadam/small-talk.git
synced 2024-12-22 07:55:36 +01:00
create convention plugins for common config
This commit is contained in:
parent
0128de4bac
commit
f3600290c8
14
buildSrc/build.gradle
Normal file
14
buildSrc/build.gradle
Normal file
@ -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"
|
||||
}
|
7
buildSrc/settings.gradle
Normal file
7
buildSrc/settings.gradle
Normal file
@ -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
|
||||
}
|
29
buildSrc/src/main/groovy/st-android-conventions.gradle
Normal file
29
buildSrc/src/main/groovy/st-android-conventions.gradle
Normal file
@ -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"
|
||||
}
|
3
buildSrc/src/main/groovy/st-feature-conventions.gradle
Normal file
3
buildSrc/src/main/groovy/st-feature-conventions.gradle
Normal file
@ -0,0 +1,3 @@
|
||||
plugins {
|
||||
id 'st-android-compose-library-conventions'
|
||||
}
|
Loading…
Reference in New Issue
Block a user