[Feature request] kmp support
This seems to be supported already. Could you please share your thoughts or tell what the problem is here?
Please share the sample code snippet @0xera . As I am getting the error of `A problem occurred configuring project ':moduleA'.
Failed to notify project evaluation listener. Cannot query the value of property 'component' because it has no value available. Cannot query the value of property 'component' because it has no value available. `
Just added in pluggin -> id("io.deepmedia.tools.grease") version ("0.3.4") Using -> com.vanniktech.maven.publish
Kotlin 2.1.10 gradle -> 8.11 JVM 17
plugins {
alias(libs.plugins.kotlinMultiplatform)
alias(libs.plugins.androidLibrary)
alias(libs.plugins.kotlinxSerialization)
alias(libs.plugins.dokka)
alias(internal.plugins.maven.publish)
alias(internal.plugins.binary.validator)
id("io.deepmedia.tools.grease") version ("0.3.4")
}
version = "0.0.1"
kotlin {
// https://kotlinlang.org/docs/multiplatform-expect-actual.html#expected-and-actual-classes
// To suppress this warning about usage of expected and actual classes
@OptIn(ExperimentalKotlinGradlePluginApi::class)
compilerOptions {
freeCompilerArgs.add("-Xexpect-actual-classes")
}
androidTarget {
publishLibraryVariants("release")
}
sourceSets {
commonMain {
dependencies {
api(someLib)
}
}
androidMain {
dependencies {
implementation(someLib)
}
}
}
}
android {
compileSdk = (findProperty("android.compileSdk") as String).toInt()
namespace = "com.moduleA"
sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml")
defaultConfig {
minSdk = (findProperty("android.minSdk") as String).toInt()
}
buildFeatures {
viewBinding = true
buildConfig = true
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
}
mavenPublishing {
// Define coordinates for the published artifact
configure(
KotlinMultiplatform(
javadocJar = JavadocJar.Dokka("dokkaGenerateModuleHtml"),
sourcesJar = true,
)
)
coordinates(
artifactId = "moduleA",
)
}
@natario1