Jan Starczewski
04/03/2024, 10:26 AMkmmbridge {
mavenPublishArtifacts()
spm()
addGithubPackagesRepository()
}
gradle properties
LIBRARY_VERSION=0.5
GROUP=com.aiocare.bluetooth
and added a workflow like in the tmplate
name: Publish iOS BLE package
on:
workflow_dispatch:
branches:
- develop
jobs:
call-kmmbridge-publish:
permissions:
contents: write
packages: write
uses: touchlab/KMMBridgeGithubWorkflow/.github/workflows/faktorybuildautoversion.yml@v1.1
with:
jvmVersion: 17
versionBaseProperty: LIBRARY_VERSION
publishTask: kmmBridgePublish publishKotlinMultiplatformPublicationToGitHubPackagesRepository
The problem that I face is on the CI, basically
Execution failed for task ':bluetooth:publishKMMBridgeFrameworkPublicationToGitHubPackagesRepository'.
> Failed to publish publication 'KMMBridgeFramework' to repository 'GitHubPackages'
> Could not PUT '<https://maven.pkg.github.com/aiocare/aiocare-sdk/com/aiocare/bluetooth/bluetooth-kmmbridge/0.5.1/bluetooth-kmmbridge-0.5.1.zip>'. Received status code 401 from server: Unauthorized
I feel like I am missing something regarding the CI configuration, but I went through the docs and seems like things are set properly
Is there something obvious that I am missing here? More info in the threadJan Starczewski
04/03/2024, 10:28 AMPackage.swift
etc. and unfortunately I cannot use the package in xcode side 😞Jan Starczewski
04/03/2024, 10:31 AMFilip DolnÃk
04/04/2024, 10:08 AMI see some artifacts being published though (with xcframework)
do you mean that you can download the xcframework from this URL <https://maven.pkg.github.com/aiocare/aiocare-sdk/com/aiocare/bluetooth/bluetooth-kmmbridge/0.5.1/bluetooth-kmmbridge-0.5.1.zip>
after logging in?Jan Starczewski
04/04/2024, 10:09 AMJan Starczewski
04/04/2024, 10:10 AM:bluetooth:publishKMMBridgeFrameworkPublicationToGitHubPackages2Repository
(With number 2 in it) and it succeedsFilip DolnÃk
04/04/2024, 10:11 AMJan Starczewski
04/04/2024, 10:11 AMFilip DolnÃk
04/04/2024, 10:13 AMJan Starczewski
04/04/2024, 10:13 AMFilip DolnÃk
04/04/2024, 10:16 AMLIBRARY_VERSION
is used to configure the project.version
property right?Jan Starczewski
04/04/2024, 10:16 AM0.5
Jan Starczewski
04/04/2024, 10:17 AMbuild.gradle.kts
file that was 0.5.1
Jan Starczewski
04/04/2024, 10:17 AMFilip DolnÃk
04/04/2024, 10:22 AMJan Starczewski
04/04/2024, 10:23 AMJan Starczewski
04/11/2024, 1:35 PMFilip DolnÃk
04/11/2024, 1:39 PMkpgalligan
04/11/2024, 1:50 PMaiocare/aiocare-sdk
the same repo as where you have the :bluetooth
module? Also, if you're directly setting version anywhere in Gradle, as it seems you are from the discussion above about 0.5.1
, you'll run into issues eventually.Jan Starczewski
04/11/2024, 2:13 PMLIBRARY_VERSION
is used in other places and that’s probably gonna fix the issue. I thought gradle’s version wasn not the issue as one of the uploads was able to succeed and the other was not. Thank you Filip and Kevin for the answers, I will work on that more and let you know.kpgalligan
04/11/2024, 5:31 PMkpgalligan
04/11/2024, 5:31 PMval autoVersion = project.property(
if (project.hasProperty("AUTO_VERSION")) {
"AUTO_VERSION"
} else {
"LIBRARY_VERSION"
}
) as String
subprojects {
val GROUP: String by project
group = GROUP
version = autoVersion
}
kpgalligan
04/11/2024, 5:32 PMkpgalligan
04/11/2024, 5:32 PMkpgalligan
04/11/2024, 5:33 PMkpgalligan
04/11/2024, 5:34 PMkpgalligan
04/11/2024, 5:35 PMkpgalligan
04/11/2024, 5:37 PMEirik Vale Aase
04/11/2024, 7:48 PM