replace buildSrc with conventions submodule

This commit is contained in:
Adam Brown 2022-12-12 19:20:22 +00:00
parent 64b7677e12
commit 83f0c1a243
11 changed files with 9 additions and 147 deletions

3
.gitmodules vendored
View File

@ -4,3 +4,6 @@
[submodule "chat-engine"]
path = chat-engine
url = git@github.com:ouchadam/chat-engine.git
[submodule "tools/conventions"]
path = tools/conventions
url = git@github.com:ouchadam/conventions.git

View File

@ -1,3 +1,7 @@
plugins {
id "st-base-conventions" apply false
}
def launchTask = getGradle()
.getStartParameter()
.getTaskRequests()

View File

@ -1,13 +0,0 @@
plugins {
id 'groovy-gradle-plugin'
}
repositories {
gradlePluginPortal()
google()
}
dependencies {
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:${libs.versions.kotlin.get()}")
implementation "com.android.tools.build:gradle:${libs.versions.android.gp.get()}"
}

View File

@ -1,7 +0,0 @@
dependencyResolutionManagement {
versionCatalogs {
create("libs") {
from(files("../gradle/libs.versions.toml"))
}
}
}

View File

@ -1,20 +0,0 @@
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
}

View File

@ -1,18 +0,0 @@
plugins {
id "kotlin-android"
}
def androidSdkVersion = 33
android {
compileSdk androidSdkVersion
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
incremental = true
}
defaultConfig {
minSdkVersion 24
targetSdkVersion androidSdkVersion
}
}

View File

@ -1,22 +0,0 @@
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
}
}

View File

@ -1,64 +0,0 @@
plugins {
id "com.android.application"
id "st-android-conventions"
}
android {
ndkVersion "25.0.8141415"
defaultConfig {
applicationId "app.dapk.st"
def versionJson = new groovy.json.JsonSlurper().parseText(rootProject.file('version.json').text)
versionCode versionJson.code
versionName versionJson.name
if (isDebugBuild) {
resConfigs "en", "xxhdpi"
} else {
resConfigs "en"
}
if (isFoss()) {
archivesBaseName = "$archivesBaseName-foss"
}
}
bundle {
abi.enableSplit true
density.enableSplit true
language.enableSplit true
}
buildTypes {
debug {
versionNameSuffix = " [debug]"
matchingFallbacks = ['release']
signingConfig.storeFile rootProject.file("tools/debug.keystore")
}
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt')
if (project.hasProperty("unsigned")) {
// releases are signed externally
} else {
signingConfig = buildTypes.debug.signingConfig
}
}
}
compileOptions {
coreLibraryDesugaringEnabled true
}
packagingOptions {
resources.excludes += "DebugProbesKt.bin"
}
}
if (isDebugBuild) {
androidComponents {
def release = selector().withBuildType("release")
beforeVariants(release) { it.enabled = false }
}
}

View File

@ -1,3 +0,0 @@
plugins {
id 'st-android-compose-library-conventions'
}

View File

@ -14,6 +14,7 @@ rootProject.name = "SmallTalk"
includeBuild 'screen-state'
includeBuild 'chat-engine'
includeBuild 'tools/conventions'
include ':app'

1
tools/conventions Submodule

@ -0,0 +1 @@
Subproject commit b6d51ca9d12b26bf7a73b12807e8ad316a5bd403