KMMBridgeUpgrading from KMMBridge 1.0

Upgrading from KMMBridge 1.0

GitHub

For general users, not much has changed from version 1.0. The only real change is to the Gradle plugin id.

GitHub-specific features of KMMBridge have been moved into their own module, which publishes a different Gradle plugin. If you are using GitHub features, and if you created your KMP repo from our quick start templates you definitely are, change the KMMBridge plugin from: co.touchlab.kmmbridge to co.touchlab.kmmbridge.github.

Custom Extensions

The code API of KMMBridge has more extensive changes. The extension interfaces were changed to support Gradle configuration cache, and to remove features that were very unlikely to be used.

If you have a custom implementation that was using removed features, please reach out. We will add features back, or figure out an alternative depending on the use case.

LocalDevManager

This interface was added to generalize local development flows, but in practice had only one implementation to support local SPM development. Local development is not easily generalized, and generally doesn’t make sense to be included inside KMMBridge in any case. Local SPM dev, however, shares a lot of code that is needed for SPM publishing, so SPM local dev support specifically was kept inside KMMBridge.

ArtifactManager

The main methods of ArtifactManager remain unchanged, but one method was removed:

fun finishArtifact(project: Project, version: String, dependencyManagers: List<DependencyManager>) {}

This method was added during the development of support for GitHub release artifacts, but the implementation was changed before release. None of our implementations use this function, and the original use case was best handled externally. It can be added back in a patch release if there is a clear need for it.

DependencyManager

The configure method’s signature has some additional parameters that were added to help support Gradle configuration cache. Your implementation can safely add and ignore them.

fun configure(
    providers: ProviderFactory,
    project: Project,
    version: String,
    uploadTask: TaskProvider<Task>,
    publishRemoteTask: TaskProvider<Task>
)

API Surface

Earlier versions of KMMBridge left many internal functions and classes publicly visible. The public API surface has been significantly reduced in 1.1. If your implementation depends on access to these portions of the API, reach out.

Module separation

KMMBridge originally kept all code within a single module. For 1.1, a few new modules were created. kmmbridge-github and kmmbridge-gitlab were created to host platform-specific features. kmmbridge-test includes implementations to support testing.

kmmbridge-test was created specifically to support testing features of the KMMBridge project. It is new, and fairly minimal. If you have features you’d like to include for your own testing, please leave feedback.