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.
84 lines
1.9 KiB
84 lines
1.9 KiB
import org.jetbrains.compose.compose |
|
|
|
plugins { |
|
id("com.android.library") |
|
kotlin("multiplatform") |
|
id("org.jetbrains.compose") |
|
id("maven-publish") |
|
} |
|
|
|
group = "com.mylibrary" |
|
|
|
kotlin { |
|
android { |
|
publishLibraryVariants("release") |
|
} |
|
jvm("desktop") |
|
|
|
sourceSets { |
|
named("commonMain") { |
|
dependencies { |
|
api(compose.runtime) |
|
api(compose.foundation) |
|
api(compose.material) |
|
// Needed only for preview |
|
implementation(compose.preview) |
|
} |
|
} |
|
named("androidMain") { |
|
dependencies { |
|
api("androidx.appcompat:appcompat:1.3.1") |
|
api("androidx.core:core-ktx:1.6.0") |
|
} |
|
} |
|
} |
|
} |
|
|
|
android { |
|
compileSdk = 31 |
|
|
|
defaultConfig { |
|
minSdk = 21 |
|
targetSdk = 31 |
|
} |
|
|
|
compileOptions { |
|
sourceCompatibility = JavaVersion.VERSION_11 |
|
targetCompatibility = JavaVersion.VERSION_11 |
|
} |
|
|
|
sourceSets { |
|
named("main") { |
|
manifest.srcFile("src/androidMain/AndroidManifest.xml") |
|
res.srcDirs("src/androidMain/res") |
|
} |
|
} |
|
} |
|
|
|
configure<PublishingExtension> { |
|
publications { |
|
all { |
|
this as MavenPublication |
|
|
|
pom { |
|
this.name.set("Library for Compose Multiplatform") |
|
licenses { |
|
license { |
|
this.name.set("The Apache License, Version 2.0") |
|
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt") |
|
} |
|
} |
|
} |
|
} |
|
} |
|
|
|
repositories { |
|
maven { |
|
setUrl(findProperty("publish.url")?.toString().orEmpty()) |
|
credentials { |
|
username = findProperty("publish.username")?.toString().orEmpty() |
|
password = findProperty("publish.password")?.toString().orEmpty() |
|
} |
|
} |
|
} |
|
}
|
|
|