touchlab / KMMBridge

KMMBridge is a tool that helps publish Kotlin Multiplatform (KMP) Xcode binaries for use from Swift Package Manager (SPM) and CocoaPods.
https://touchlab.co/kmmbridge/
Apache License 2.0
357 stars 20 forks source link

kmmBridgePublish task not found in Azure DevOps pipeline despite successful local execution #232

Closed Lawrance3 closed 5 months ago

Lawrance3 commented 1 year ago

When I run the following task command locally, it executes without any issues:

./gradlew kmmBridgePublish -PENABLE_PUBLISHING=true -PGITHUB_PUBLISH_TOKEN=<AZURE_ARTIFACT_TOKEN> -PGITHUB_REPO=<REPO> --no-daemon --stacktrace

However, invoking the same task via my Azure DevOps pipeline produces an error. Specifically, it states that the kmmBridgePublish task cannot be found in either the root project or any of its subprojects.

I'm puzzled by this behavior and would appreciate any insights or solutions to address this discrepancy between local and pipeline execution.

lotdrops commented 12 months ago

I have this issue but with local machines. In one computer I managed to get it to work by deleting de gradle cache. But in another computer it does not create the task even after deleting the gradle cache.

kpgalligan commented 5 months ago

The kmmBridgePublish doesn't get registered, depending on your config. If your are missing either the artifact manager or version manager config, or if they fail to properly return a version, the config stops short of trying to set up tasks related to actually publishing. There were historical reasons for this, but in summary, it is assumed your config is in flux or you're locally editing. Throwing errors, etc, would prevent you from locally getting Gradle to configure. Look for log warnings from Gradle.