lib updates
This commit is contained in:
+28
-51
@@ -1,10 +1,7 @@
|
||||
import com.android.build.api.dsl.ManagedVirtualDevice
|
||||
import org.jetbrains.compose.ExperimentalComposeLibrary
|
||||
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
|
||||
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
|
||||
import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
import org.jetbrains.kotlin.gradle.plugin.KotlinSourceSetTree
|
||||
import org.jetbrains.kotlin.gradle.targets.js.webpack.KotlinWebpackConfig
|
||||
import java.util.*
|
||||
|
||||
@@ -17,9 +14,28 @@ plugins {
|
||||
}
|
||||
|
||||
kotlin {
|
||||
androidTarget {
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_21)
|
||||
}
|
||||
}
|
||||
|
||||
listOf(
|
||||
iosX64(),
|
||||
iosArm64(),
|
||||
iosSimulatorArm64()
|
||||
).forEach { iosTarget ->
|
||||
iosTarget.binaries.framework {
|
||||
baseName = "ComposeApp"
|
||||
isStatic = true
|
||||
}
|
||||
}
|
||||
|
||||
jvm()
|
||||
|
||||
@OptIn(ExperimentalWasmDsl::class)
|
||||
wasmJs {
|
||||
moduleName = "composeApp"
|
||||
outputModuleName = "composeApp"
|
||||
browser {
|
||||
val rootDirPath = project.rootDir.path
|
||||
val projectDirPath = project.projectDir.path
|
||||
@@ -37,34 +53,6 @@ kotlin {
|
||||
binaries.executable()
|
||||
}
|
||||
|
||||
androidTarget {
|
||||
compilations.all {
|
||||
compileTaskProvider {
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_17)
|
||||
//https://jakewharton.com/gradle-toolchains-are-rarely-a-good-idea/#what-do-i-do
|
||||
freeCompilerArgs.add("-Xjdk-release=${JavaVersion.VERSION_17}")
|
||||
}
|
||||
}
|
||||
}
|
||||
//https://www.jetbrains.com/help/kotlin-multiplatform-dev/compose-test.html
|
||||
@OptIn(ExperimentalKotlinGradlePluginApi::class)
|
||||
instrumentedTestVariant.sourceSetTree.set(KotlinSourceSetTree.test)
|
||||
}
|
||||
|
||||
jvm()
|
||||
|
||||
listOf(
|
||||
iosX64(),
|
||||
iosArm64(),
|
||||
iosSimulatorArm64()
|
||||
).forEach {
|
||||
it.binaries.framework {
|
||||
baseName = "ComposeApp"
|
||||
isStatic = true
|
||||
}
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
commonMain.dependencies {
|
||||
implementation(compose.runtime)
|
||||
@@ -72,7 +60,6 @@ kotlin {
|
||||
implementation(compose.material3)
|
||||
implementation(compose.materialIconsExtended)
|
||||
implementation(compose.components.resources)
|
||||
implementation(compose.components.uiToolingPreview)
|
||||
implementation(libs.voyager.navigator)
|
||||
implementation(libs.voyager.transitions)
|
||||
implementation(libs.coil)
|
||||
@@ -140,20 +127,14 @@ android {
|
||||
applicationId = "dev.meloda.overseerr"
|
||||
versionCode = 1
|
||||
versionName = "1.0.0"
|
||||
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
//https://developer.android.com/studio/test/gradle-managed-devices
|
||||
@Suppress("UnstableApiUsage")
|
||||
testOptions {
|
||||
managedDevices.devices {
|
||||
maybeCreate<ManagedVirtualDevice>("pixel5").apply {
|
||||
device = "Pixel 5"
|
||||
apiLevel = 34
|
||||
systemImageSource = "aosp"
|
||||
}
|
||||
|
||||
packaging {
|
||||
resources {
|
||||
excludes += "/META-INF/{AL2.0,LGPL2.1}"
|
||||
}
|
||||
}
|
||||
|
||||
signingConfigs {
|
||||
create("release") {
|
||||
val keystoreProperties = Properties()
|
||||
@@ -188,19 +169,15 @@ android {
|
||||
}
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
sourceCompatibility = JavaVersion.VERSION_21
|
||||
targetCompatibility = JavaVersion.VERSION_21
|
||||
}
|
||||
}
|
||||
|
||||
//https://developer.android.com/develop/ui/compose/testing#setup
|
||||
dependencies {
|
||||
androidTestImplementation(libs.androidx.uitest.junit4)
|
||||
debugImplementation(libs.androidx.uitest.testManifest)
|
||||
//temporary fix: https://youtrack.jetbrains.com/issue/CMP-5864
|
||||
androidTestImplementation("androidx.test:monitor") {
|
||||
version { strictly("1.6.1") }
|
||||
}
|
||||
debugImplementation(compose.uiTooling)
|
||||
}
|
||||
|
||||
compose.desktop {
|
||||
|
||||
Reference in New Issue
Block a user