Skip to content

Instantly share code, notes, and snippets.

@alibahaaa
Created June 15, 2024 08:21
Show Gist options
  • Save alibahaaa/78c190cb62a81ba31ec835fa98ef0e37 to your computer and use it in GitHub Desktop.
Save alibahaaa/78c190cb62a81ba31ec835fa98ef0e37 to your computer and use it in GitHub Desktop.
plugins {
alias(libs.plugins.kotlinMultiplatform)
alias(libs.plugins.androidLibrary)
id("maven-publish")
}
group = "ir.baha"
version = "1.0.2"
kotlin {
androidTarget {
publishLibraryVariants("release", "debug")
compilations.all {
kotlinOptions {
jvmTarget = "1.8"
}
}
}
listOf(
iosX64(),
iosArm64(),
iosSimulatorArm64()
).forEach {
it.binaries.framework {
baseName = "shared"
isStatic = true
}
}
sourceSets {
commonMain.dependencies {
//put your multiplatform dependencies here
}
commonTest.dependencies {
implementation(libs.kotlin.test)
}
val iosMain by creating {
dependencies {
// Add iOS-specific dependencies here
}
}
val iosTest by creating {
dependencies {
// Add iOS-specific test dependencies here
}
}
}
}
android {
namespace = "ir.baha.km"
compileSdk = 34
defaultConfig {
minSdk = 24
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
}
publishing {
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/alibahaaa/km")
credentials {
username = "github_user_name"
password = "github_token"
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment