Hello, I'm writing Multiplatform convention plugin...
# gradle
b
Hello, I'm writing Multiplatform convention plugin. Is it possible to get the module specific namespace and bring it to the plugin.
android {
namespace = "com.example.myApp.feature.auth"
}
it is possible to get baseName with this code:
private fun Project.resolveFullName(): String {
val nonRootParent = parent?.takeIf { it != rootProject } ?: return name
return "${nonRootParent.resolveFullName()}_$name"
}
listOf(
iosX64(),
iosArm64(),
iosSimulatorArm64(),
).forEach {
it.binaries.framework {
`baseName = this@configureKotlinMultiplatform.resolveFullName() //here`👀
}
}
v
You can use
Project.name
this will return the current module name, then you can use kotlin function to do any manipulation on it
👍 1
b
namespace = "com.example.myApp.feature.auth"
I could not log/print Project.name to see it. above example namespace, which part Project.name returns Thanks in advance!
@Vaibhav Jaiswal Thanks it worked. I used Project.path it give full path to it.👍👍