Repo created
This commit is contained in:
parent
ef295a34d2
commit
bbab4c6180
352 changed files with 14422 additions and 1 deletions
94
common/build.gradle.kts
Normal file
94
common/build.gradle.kts
Normal file
|
|
@ -0,0 +1,94 @@
|
|||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.sqldelight)
|
||||
}
|
||||
|
||||
group = "com.linuxcommandlibrary"
|
||||
|
||||
kotlin {
|
||||
androidTarget()
|
||||
jvm()
|
||||
|
||||
androidTarget {
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_17)
|
||||
}
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
commonMain {
|
||||
dependencies {
|
||||
implementation(libs.runtime)
|
||||
}
|
||||
kotlin.srcDir(layout.buildDirectory.dir("generated/src/commonMain/kotlin"))
|
||||
}
|
||||
commonTest {
|
||||
dependencies {
|
||||
implementation(kotlin("test"))
|
||||
}
|
||||
}
|
||||
androidMain {
|
||||
dependencies {
|
||||
implementation(libs.sqldelight.android.driver)
|
||||
}
|
||||
}
|
||||
jvmMain {
|
||||
dependencies {
|
||||
implementation(libs.sqldelight.sqlite.driver)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdk = 35
|
||||
sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml")
|
||||
defaultConfig {
|
||||
minSdk = 24
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
}
|
||||
|
||||
lint {
|
||||
abortOnError = false
|
||||
}
|
||||
namespace = "com.linuxcommandlibrary.shared"
|
||||
}
|
||||
|
||||
sqldelight {
|
||||
databases {
|
||||
create("CommandDatabase") {
|
||||
packageName.set("com.linuxcommandlibrary")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class VersionGeneratorPlugin : Plugin<Project> {
|
||||
override fun apply(project: Project) {
|
||||
project.afterEvaluate {
|
||||
val versionFile =
|
||||
layout.buildDirectory
|
||||
.file("generated/src/commonMain/kotlin/com/linuxcommandlibrary/shared/Version.kt")
|
||||
.get()
|
||||
.asFile
|
||||
versionFile.parentFile?.mkdirs()
|
||||
versionFile.writeText(
|
||||
"""
|
||||
package com.linuxcommandlibrary.shared
|
||||
|
||||
object Version {
|
||||
const val appVersion = "${libs.versions.appVersion.get()}"
|
||||
}
|
||||
""".trimIndent(),
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
apply<VersionGeneratorPlugin>()
|
||||
Loading…
Add table
Add a link
Reference in a new issue