Hi! I have a multi-module KMP project and we publish every feature module as a separate artefact. I try to extract all configurations we have for each module to a convention plugin, but can’t wrap my head around how to put
addGithubPackagesRepository
there.
Copy code
class FeatureModuleConventionPlugin : Plugin<Project> {
override fun apply(target: Project) {
with(target) {
with(pluginManager) {
apply("maven-publish")
apply("com.android.library")
apply("org.jetbrains.kotlin.multiplatform")
...
}
extensions.configure<LibraryExtension> {
configureKotlinAndroid(this)
}
extensions.configure<KotlinMultiplatformExtension> {
configureKotlinMultiplatformTargets(this)
}
...
// I'd like having addGithubPackagesRepository() here as well
}
}
}