Hi everyone. I am finally getting around to updati...
# touchlab-tools
b
Hi everyone. I am finally getting around to updating my KmmBridge setup to 1.2.1 (from 0.5.5) , and I'm running into a problem. I have a custom Gradle plugin that is applying configuration for my umbrella (allShared) module. With 0.5.5, I could call the
addGithubPackagesRepository()
method from my plugin, like this:
Copy code
class UmbrellaModuleConventionPlugin: Plugin<Project> {
    override fun apply(target: Project) = with(target) {
        with(pluginManager) {
            apply(kmpLibs.plugin("touchlab.kmmbridge"))
            apply(kmpLibs.plugin("kotlin.cocoapods"))
        }
        extensions.configure<KotlinMultiplatformExtension>(::configureCocoapods)
        addGithubPackagesRepository()

        ...
    }
}
But when I update to 1.2.1, I now get an error:
Unresolved reference: addGithubPackagesRepository
The line above that applies the kmmbridge plugin
apply(kmpLibs.plugin("touchlab.kmmbridge"))
is using the "github" version of the plugin:
touchlab-kmmbridge = { id="co.touchlab.kmmbridge.github", version.ref="touchlab-kmmBridge"}
And the gradle config for my plugin module, is using the kmmbridge gradle plugin:
Copy code
dependencies {
    compileOnly(kmpLibs.android.gradlePlugin)
    compileOnly(kmpLibs.kotlin.gradlePlugin)
    compileOnly(kmpLibs.touchlab.kmmbridge.gradlePlugin)
}
touchlab-kmmbridge-gradlePlugin = { group="co.touchlab.kmmbridge", name="kmmbridge", version.ref= "touchlab-kmmBridge" }
I'm not sure where I'm going wrong???
PS: I know I can now use Github releases instead of packages, but (at least for now) I'm just trying to stick with my existing setup using packages.
k
Have you tried the github version in both? The inclusion of github-specific code is really the only reason the github version exists at all (along with the other versions)
b
Have you tried the github version in both?
I'm confused? Do you mean updating this guy to use the github version?
touchlab-kmmbridge-gradlePlugin = { group="co.touchlab.kmmbridge", name="kmmbridge", version.ref= "touchlab-kmmBridge" }
doh! I had tried
group="co.touchlab.kmmbridge.github", name="kmmbridge"
which failed miserably. I just now tried
group="co.touchlab.kmmbridge", name="kmmbridge-github"
and it works. Ok, nothing to see here ... Everyone move along ...