masteramyx
04/13/2023, 4:11 PMJeff Lockhart
04/13/2023, 5:14 PMmasteramyx
04/13/2023, 11:39 PMsettings.gradle
include ':app'
include ':template'
template/build.gradle.kts
plugins {
//id("com.android.library")
kotlin("multiplatform")
}
kotlin {
jvm()
android()
js {
browser()
nodejs()
}
}
android {
compileSdk = 33
}
java {
sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7
}
template/src/main/.../Template.kt
interface Template {
fun hello() : String = "Hello"
}
app/build.gradle
implementation project(':template')
I'm unable to resolve the Template interface in my app module.
I would think I still need to include plugin com.android.library
for my application module to actually import this new module. But this results in some errors around gradle tasks like generateDebugBuildConfig
The cause of these errors are all
> Failed to calculate the value of task ':template:packageDebugResources' property 'namespace'.
> Failed to calculate the value of property 'namespace'.
Jeff Lockhart
04/13/2023, 11:44 PMTemplate.kt
should be in template/src/_commonMain_.
Do you intend to use with a non-Android JVM client?Jeff Lockhart
04/13/2023, 11:46 PMKy
04/14/2023, 12:54 AMKy
04/14/2023, 12:55 AMJeff Lockhart
04/14/2023, 1:58 AM