I have a project with several kmp modules and I wo...
# touchlab-tools
s
I have a project with several kmp modules and I would like to use kmmbridge to publish these individual modules as libraries for spm, but not sure how to do that if possible. I have kmmbridge applied in these modules but when i run spmDevBuild, the Package.swift file only has one package, which seems to change every time i run it. I've tried to set the
frameworkName
value in all of kmmbridge block in each of the modules but that didn't seem to help. what is the best way to have multiple packages for the modules, or do i need to make an 'allShared' type of module?
i found this: https://github.com/touchlab/KMMBridge/issues/114 and I see multiple Package.swift files, which may be what I need
I'm getting an error on github when the workflow runs:
Copy code
Run touchlab/autoversion-finishrelease@main
Error: fatal: pathspec './Package.swift' did not match any files
i
It’s works for me by using
Copy code
spm(project.projectDir.path)
s
yeah i see the individual swift files but when I try to run the workflow to publish artifacts on github i get the error above. are you able to publish all of these packages on git @itshan?
i
@Sterling Albury same issue trying to figure out what’s going on.
maybe it’s not working this way even if generated Package.swift under submodules • https://github.com/apple/swift-package-manager/blob/main/Documentation/Usage.md#creating-a-package Simply put: a package is a git repository with semantically versioned tags, that contains Swift sources and a
Package.swift
manifest file at its root.
s
hmm...that would be unfortunate if a swift package is defined strictly as a git repository with a single
Package.swift
at its root. this would be highly restrictive. this would force devs to create multiple repositories for what logically belongs in a single project, which complicates project management and massively increases overhead.
i