Store/store/build.gradle.kts
Matt Ramotar 74bb49ddb5
Migrate to version catalogs (#561)
Signed-off-by: Matt Ramotar <mramotar@dropbox.com>
2023-07-05 18:31:37 -04:00

143 lines
3.4 KiB
Text

@file:Suppress("UnstableApiUsage")
import com.vanniktech.maven.publish.SonatypeHost.S01
import org.jetbrains.dokka.gradle.DokkaTask
plugins {
kotlin("multiplatform")
kotlin("plugin.serialization")
id("com.android.library")
id("com.vanniktech.maven.publish")
id("org.jetbrains.dokka")
id("org.jetbrains.kotlinx.kover")
id("co.touchlab.faktory.kmmbridge") version("0.3.2")
`maven-publish`
kotlin("native.cocoapods")
id("kotlinx-atomicfu")
}
rootProject.plugins.withType<org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootPlugin> {
rootProject.the<org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension>().nodeVersion = "16.13.1"
}
kotlin {
android()
jvm()
iosArm64()
iosX64()
linuxX64()
iosSimulatorArm64()
js {
browser()
nodejs()
}
cocoapods {
summary = "Store5"
homepage = "https://github.com/MobileNativeFoundation/Store"
ios.deploymentTarget = "13"
version = libs.versions.store.get()
}
sourceSets {
all {
languageSettings.apply {
optIn("kotlinx.coroutines.ExperimentalCoroutinesApi")
optIn("kotlin.RequiresOptIn")
}
}
val commonMain by getting {
dependencies {
implementation(libs.kotlin.stdlib)
implementation(libs.kotlinx.coroutines.core)
implementation(libs.kotlinx.serialization.core)
implementation(libs.kotlinx.datetime)
api(libs.kotlinx.atomic.fu)
implementation(libs.touchlab.kermit)
implementation(project(":multicast"))
implementation(project(":cache"))
}
}
val commonTest by getting {
dependsOn(commonMain)
dependencies {
implementation(kotlin("test"))
implementation(libs.junit)
implementation(libs.kotlinx.coroutines.test)
}
}
val jvmMain by getting
val androidMain by getting
val nativeMain by creating {
dependsOn(commonMain)
}
}
}
android {
sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml")
compileSdk = 33
defaultConfig {
minSdk = 24
targetSdk = 33
}
lint {
disable += "ComposableModifierFactory"
disable += "ModifierFactoryExtensionFunction"
disable += "ModifierFactoryReturnType"
disable += "ModifierFactoryUnreferencedReceiver"
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
}
tasks.withType<DokkaTask>().configureEach {
dokkaSourceSets.configureEach {
reportUndocumented.set(false)
skipDeprecated.set(true)
jdkVersion.set(11)
}
}
mavenPublishing {
publishToMavenCentral(S01)
signAllPublications()
}
addGithubPackagesRepository()
kmmbridge {
githubReleaseArtifacts()
githubReleaseVersions()
versionPrefix.set("5.0.0-alpha")
spm()
}
koverMerged {
enable()
xmlReport {
onCheck.set(true)
reportFile.set(layout.projectDirectory.file("kover/coverage.xml"))
}
htmlReport {
onCheck.set(true)
reportDir.set(layout.projectDirectory.dir("kover/html"))
}
verify {
onCheck.set(true)
}
}
atomicfu {
transformJvm = false
transformJs = false
}