You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
98 lines
3.2 KiB
98 lines
3.2 KiB
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
|
|
|
plugins {
|
|
alias(libs.plugins.kotlinMultiplatform)
|
|
alias(libs.plugins.kotlinCocoapods)
|
|
alias(libs.plugins.androidLibrary)
|
|
alias(libs.plugins.compose.compiler)
|
|
alias(libs.plugins.composeMultiplatform)
|
|
id("com.google.devtools.ksp")
|
|
}
|
|
|
|
kotlin {
|
|
androidTarget {
|
|
compilations.all {
|
|
compileTaskProvider.configure {
|
|
compilerOptions {
|
|
jvmTarget.set(JvmTarget.JVM_1_8)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
iosArm64().apply {
|
|
compilations.getByName("main"){
|
|
val cin by cinterops.creating{
|
|
definitionFile.set(project.file("Ring.def"))
|
|
packageName("com.whitefish.ring.objc")
|
|
val files = project.fileTree("../iosApp/iosApp/Libs").files.filter { it.extension == "h" }
|
|
headers(files)
|
|
val links = files.map { "-I${it.parent}" }.distinct()
|
|
compilerOpts(links)
|
|
compilerOpts.add("-I../iosApp/Pods/YYKit/YYKit/Base/Foundation")
|
|
compilerOpts.add("-I../iosApp/Pods/Masonry/Masonry")
|
|
compilerOpts.add("-I../iosApp/Pods/QMUIKit/QMUIKit")
|
|
println("cinterops build complete")
|
|
}
|
|
}
|
|
}
|
|
cocoapods {
|
|
summary = "Some description for the Shared Module"
|
|
homepage = "Link to the Shared Module homepage"
|
|
version = "1.0"
|
|
ios.deploymentTarget = "16.0"
|
|
podfile = project.file("../iosApp/Podfile")
|
|
framework {
|
|
baseName = "shared"
|
|
isStatic = true
|
|
freeCompilerArgs += listOf(
|
|
"-linker-option", "-L${project.projectDir.parent}/iosApp/iosApp/Libs",
|
|
"-linker-option", "-lRingSDK_2.0.2"
|
|
)
|
|
}
|
|
}
|
|
|
|
sourceSets {
|
|
commonMain.dependencies {
|
|
implementation("io.github.aakira:napier:2.7.1")
|
|
implementation(compose.runtime)
|
|
implementation(compose.foundation)
|
|
implementation(compose.material3)
|
|
implementation(compose.ui)
|
|
implementation(compose.components.resources)
|
|
implementation(compose.components.uiToolingPreview)
|
|
implementation(libs.androidx.lifecycle.viewmodel)
|
|
implementation(libs.androidx.lifecycle.runtimeCompose)
|
|
implementation(libs.lifecycle.viewmodel.compose)
|
|
implementation(libs.vico.multiplatform)
|
|
}
|
|
commonTest.dependencies {
|
|
|
|
implementation(libs.kotlin.test)
|
|
}
|
|
}
|
|
}
|
|
|
|
android {
|
|
namespace = "com.whitefish.ring"
|
|
compileSdk = 35
|
|
defaultConfig {
|
|
minSdk = 29
|
|
}
|
|
lint{
|
|
disable.add("NullSafeMutableLiveData")
|
|
}
|
|
compileOptions {
|
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
|
targetCompatibility = JavaVersion.VERSION_1_8
|
|
}
|
|
dependencies {
|
|
implementation(libs.androidx.room.runtime)
|
|
ksp(libs.androidx.room.compiler)
|
|
implementation(libs.android.database.sqlcipher)
|
|
implementation(fileTree("libs"))
|
|
implementation ("com.google.accompanist:accompanist-permissions:0.37.3")
|
|
}
|
|
}
|
|
dependencies {
|
|
implementation(libs.androidx.activity.ktx)
|
|
}
|
|
|