mirror of
https://github.com/openflocon/Flocon.git
synced 2026-05-19 15:04:48 +00:00
Co-authored-by: Florent Champigny <florent@bere.al> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
157 lines
No EOL
4.6 KiB
Kotlin
157 lines
No EOL
4.6 KiB
Kotlin
plugins {
|
|
alias(libs.plugins.kotlin.multiplatform)
|
|
alias(libs.plugins.android.library)
|
|
alias(libs.plugins.kotlin.serialization)
|
|
alias(libs.plugins.vanniktech.maven.publish)
|
|
alias(libs.plugins.buildconfig)
|
|
}
|
|
|
|
kotlin {
|
|
androidTarget {
|
|
compilations.all {
|
|
kotlinOptions {
|
|
jvmTarget = "11"
|
|
}
|
|
}
|
|
}
|
|
|
|
jvm()
|
|
|
|
iosX64()
|
|
iosArm64()
|
|
iosSimulatorArm64()
|
|
|
|
sourceSets {
|
|
val commonMain by getting {
|
|
dependencies {
|
|
implementation(libs.jetbrains.kotlinx.coroutines.core.fixed)
|
|
implementation(libs.kotlinx.serialization.json)
|
|
api(project(":flocon-base"))
|
|
}
|
|
}
|
|
|
|
val androidMain by getting {
|
|
dependencies {
|
|
implementation(libs.kotlinx.coroutines.android)
|
|
implementation(libs.jakewharton.process.phoenix)
|
|
implementation("com.squareup.okhttp3:okhttp:4.12.0")
|
|
|
|
implementation(libs.androidx.sqlite)
|
|
implementation(libs.androidx.sqlite.framework)
|
|
}
|
|
}
|
|
|
|
val jvmMain by getting {
|
|
dependencies {
|
|
implementation(libs.ktor.client.core)
|
|
implementation(libs.ktor.client.cio)
|
|
|
|
implementation(libs.ktor.client.content.negotiation)
|
|
implementation(libs.ktor.client.logging)
|
|
implementation(libs.ktor.serialization.kotlinx.json)
|
|
}
|
|
}
|
|
|
|
val iosX64Main by getting
|
|
val iosArm64Main by getting
|
|
val iosSimulatorArm64Main by getting
|
|
val iosMain by creating {
|
|
dependsOn(commonMain)
|
|
iosX64Main.dependsOn(this)
|
|
iosArm64Main.dependsOn(this)
|
|
iosSimulatorArm64Main.dependsOn(this)
|
|
dependencies {
|
|
implementation(libs.ktor.client.core)
|
|
implementation(libs.ktor.client.darwin)
|
|
|
|
implementation(libs.ktor.client.content.negotiation)
|
|
implementation(libs.ktor.client.logging)
|
|
implementation(libs.ktor.serialization.kotlinx.json)
|
|
|
|
implementation(libs.androidx.sqlite.bundled)
|
|
|
|
// to store the device id
|
|
implementation("com.russhwolf:multiplatform-settings:1.3.0")
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
buildConfig {
|
|
packageName("io.github.openflocon.flocondesktop")
|
|
|
|
buildConfigField("APP_VERSION", System.getenv("PROJECT_VERSION_NAME") ?: project.property("floconVersion") as String)
|
|
}
|
|
|
|
|
|
android {
|
|
namespace = "io.github.openflocon.flocon"
|
|
compileSdk = 36
|
|
|
|
defaultConfig {
|
|
minSdk = 23
|
|
|
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
|
consumerProguardFiles("consumer-rules.pro")
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
isMinifyEnabled = false
|
|
proguardFiles(
|
|
getDefaultProguardFile("proguard-android-optimize.txt"),
|
|
"proguard-rules.pro"
|
|
)
|
|
}
|
|
}
|
|
compileOptions {
|
|
sourceCompatibility = JavaVersion.VERSION_11
|
|
targetCompatibility = JavaVersion.VERSION_11
|
|
}
|
|
|
|
sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml")
|
|
sourceSets["main"].res.srcDirs("src/androidMain/res")
|
|
}
|
|
|
|
mavenPublishing {
|
|
publishToMavenCentral(automaticRelease = true)
|
|
|
|
if (project.hasProperty("signing.required") && project.property("signing.required") == "false") {
|
|
// Skip signing
|
|
} else {
|
|
signAllPublications()
|
|
}
|
|
|
|
coordinates(
|
|
groupId = project.property("floconGroupId") as String,
|
|
artifactId = "flocon",
|
|
version = System.getenv("PROJECT_VERSION_NAME") ?: project.property("floconVersion") as String
|
|
)
|
|
|
|
pom {
|
|
name = "Flocon"
|
|
description = project.property("floconDescription") as String
|
|
inceptionYear = "2025"
|
|
url = "https://github.com/openflocon/Flocon"
|
|
licenses {
|
|
license {
|
|
name = "The Apache License, Version 2.0"
|
|
url = "https://www.apache.org/licenses/LICENSE-2.0.txt"
|
|
distribution = "https://www.apache.org/licenses/LICENSE-2.0.txt"
|
|
}
|
|
}
|
|
developers {
|
|
developer {
|
|
id = "openflocon"
|
|
name = "Open Flocon"
|
|
url = "https://github.com/openflocon"
|
|
}
|
|
}
|
|
scm {
|
|
url = "https://github.com/openflocon/Flocon"
|
|
connection = "scm:git:git://github.com/openflocon/Flocon.git"
|
|
developerConnection = "scm:git:ssh://git@github.com/openflocon/Flocon.git"
|
|
}
|
|
}
|
|
} |