Compare commits

...

3 Commits

Author SHA1 Message Date
Victor Shcherb
8701edaabc Add build kt gradle 2024-08-21 02:10:04 +03:00
Victor Shcherb
92e5d737bd Add build kt gradle 2024-08-21 02:08:54 +03:00
Victor Shcherb
b8dda98bad Add build kt gradle 2024-08-21 02:07:18 +03:00
3 changed files with 91 additions and 22 deletions

View File

@ -85,25 +85,4 @@ android {
defaultConfig {
minSdk = 24
}
}
publishing {
repositories {
ivy {
url = uri(System.getenv("OSMAND_BINARIES_IVY_ROOT") ?: "./")
}
}
publications {
create<IvyPublication>("ivyOsmAndSharedAndroid") {
organisation = "net.osmand.shared"
module = "OsmAnd-shared-android"
revision = "master-snapshot"
artifact(file(System.getenv("MAVEN_LOCAL_ROOT") + "/net/osmand/shared/OsmAnd-shared/master-snapshot/OsmAnd-shared-master-snapshot.jar")) {
type = "jar"
}
artifact(file(System.getenv("MAVEN_LOCAL_ROOT") + "/net/osmand/shared/OsmAnd-shared-android/master-snapshot/OsmAnd-shared-android-master-snapshot.aar")) {
type = "aar"
}
}
}
}

View File

@ -0,0 +1,90 @@
plugins {
id 'org.jetbrains.kotlin.multiplatform' version '2.0.0'
id 'org.jetbrains.kotlin.plugin.serialization' version '2.0.0'
id 'ivy-publish'
}
kotlin {
jvm {
// Experimental Kotlin Gradle Plugin API opt-in
compilerOptions {
jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17
}
}
def sqliteVersion = "2.3.1"
def serializationVersion = "1.6.3"
def coroutinesCoreVersion = "1.8.1"
def datetimeVersion = "0.6.0"
def okioVersion = "3.9.0"
def kxml2Version = "2.3.0"
def sqliterVersion = "1.3.1"
def sqliteJDBCVersion = "3.34.0"
def commonLoggingVersion = "1.2"
sourceSets {
commonMain {
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib"
implementation "org.jetbrains.kotlin:kotlin-stdlib-common"
implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:$serializationVersion"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesCoreVersion"
implementation "org.jetbrains.kotlinx:kotlinx-datetime:$datetimeVersion"
implementation "com.squareup.okio:okio:$okioVersion"
}
}
jvmMain {
dependencies {
implementation kotlin("stdlib-jdk8")
implementation "net.sf.kxml:kxml2:$kxml2Version"
implementation "org.xerial:sqlite-jdbc:$sqliteJDBCVersion"
implementation "commons-logging:commons-logging:$commonLoggingVersion"
}
}
}
}
configurations {
jvmPublicConfig {
extendsFrom(jvmRuntimeClasspath)
}
}
artifacts {
jvmPublicConfig jvmJar
}
version = System.getenv("OSMAND_BINARIES_IVY_REVISION") ?: "master-snapshot"
publishing {
publications {
ivyJava(IvyPublication) {
from components.java
// Define the artifact with a specific name and classifier
artifact("build/libs/OsmAnd-shared-jvm-master-snapshot.jar") {
name = 'OsmAnd-shared-jvm'
type = 'jar'
extension = 'jar'
classifier = version
}
// Configure Ivy coordinates
organisation 'net.osmand'
module 'OsmAnd-shared'
revision version
// Optionally define Ivy configurations
configurations {
jvmRuntime
}
}
}
repositories {
ivy {
url = System.getenv("OSMAND_BINARIES_IVY_ROOT") ?: "./"
}
}
}

View File

@ -40,4 +40,4 @@ kotlin {
implementation("commons-logging:commons-logging:$commonLoggingVersion")
}
}
}
}