Bradleycorn
05/14/2025, 8:57 PMENABLE_PUBLISHING=true
property when running the kmmBridgePublish task. Hoping someone can point me in the right direction ....
More details in the 🧵Bradleycorn
05/14/2025, 8:59 PM./gradlew kmmBridgePublish \
-PKMP_BUILD_MODE=library \
-PENABLE_PUBLISHING=true \
-PAUTO_VERSION=0.0.25 \
-PGITHUB_PUBLISH_TOKEN=*** \
-PGITHUB_REPO=myorg/myrepo \
-PNATIVE_BUILD_TYPE=RELEASE \
-PGITHUB_ARTIFACT_RELEASE_ID=218670995 \
--no-daemon --info --stacktrace
My setup is fairly standard, except that I have a custom gradle plugin that I apply to my KMP modules and the kmmbridge configurations are in there. But the configs themselves are basic/standard. I have also confirmed (printing to the console) that my plugin is being properly applied.
specifically, my kmmbridge config that gets applied to my umbrella (allShared) module is:
fun Project.configureKmmBridge(extension: KmmBridgeExtension) = extension.apply {
println("Configuring KmmBridge")
gitHubReleaseArtifacts()
spm()
cocoapods("git@github.com:myorg/MyPodSPecs.git")
}
the above function gets called from my custom plugin like so:
import co.touchlab.kmmbridge.KmmBridgeExtension
import com.myorg.myrepo.buildLogic.configureKmmBridge
class UmbrellaModuleConventionPlugin: Plugin<Project> {
override fun apply(target: Project) = with(target) {
with(pluginManager) {
apply(kmpLibs.plugin("touchlab.kmmbridge.github"))
apply(kmpLibs.plugin("kotlin.cocoapods"))
}
extensions.configure<KotlinMultiplatformExtension>(::configureCocoapods)
extensions.configure<KmmBridgeExtension>(::configureKmmBridge)
}
}
Bradleycorn
05/14/2025, 9:05 PMkpgalligan
05/15/2025, 12:26 AMnot found in root project
would be thing to check #1. Probably not related, but if the root project is including kmmbridge but not apply false
? Otherwise, there's some other reason the publishing section isn't being run because config drops out before it gets there, but isn't reporting that anywhere. If not that, then the Gradle params from the command aren't making their way to whatever needs them.Bradleycorn
05/15/2025, 12:54 AMkpgalligan
05/15/2025, 1:03 AMBradleycorn
05/15/2025, 1:26 AM\
on one of the lines or something.kpgalligan
05/15/2025, 2:55 AMkpgalligan
05/15/2025, 2:57 AMBradleycorn
05/15/2025, 2:49 PMENABLE_PUBLISHING=true
flag, so I spent most of my time trying to figure out where my gradle configuration was wrong. But it turns out, the gradle config was fine.
Another idea ... include a "dry run" or "validation" task that just verifies that the configuration is setup correctly. Devs could run that task locally to be sure everything is setup correctly before having CI run it.