https://kotlinlang.org logo
#touchlab-tools
Title
# touchlab-tools
j

Jazmine Barroga

03/30/2023, 4:23 AM
Hey 👋 For KMMBridge, the podspec source URL generated by the MavenPublishArtifactManager may not be always the same as the actual maven repo url. This happens when you set a different artifactId for the framework or the project.group is different from what is in the maven artifact directory. Is this a bug or just a config issue?
r

russhwolf

03/30/2023, 12:41 PM
Can you give an example? It's probably a bug but I'm not sure I follow what you're trying to do.
j

Jazmine Barroga

03/31/2023, 8:34 AM
In the MavenPublishArtifactManager the artifactPath generated by kmmBridge may not be always the same to the directory of the maven repository For example, when uploading the xcframework we altered the artifactId to library-ios. while the kmmbridgeArtifactId becomes library-kmmbridge
r

russhwolf

03/31/2023, 4:03 PM
Can you show some of your gradle config so I understand where you're setting the name?
j

Jazmine Barroga

04/03/2023, 7:59 AM
Sure, here it is inside the publications block
Copy code
subprojects { project ->
    ....
    publishing {
        afterEvaluate {
            publications {    
                KMMBridgeFramework(MavenPublication) {
                    artifactId = "$project.name-ios"
                }
            }
        }
        ....
    }

    kmmbridge {
        mavenPublishArtifacts(project, null, null)
        manualVersions()
        cocoapods(project, <repo>, true, false)
    }
}
r

russhwolf

04/03/2023, 6:41 PM
Ok I see. I don't think that's a use-case we ever considered. Is there a reason you need to change that artifactId? It probably wouldn't be too much work to support changing it, but we've largely thought of that URL as an implementation detail and not something that people would want fine-grained control over.
j

Jazmine Barroga

04/04/2023, 9:17 AM
We are releasing public SDKS and we want to hide as much implementation details as we can and being flexible in the naming allows us to organize our libraries better and provide more clarity to our users
What do you think? @russhwolf 😅
r

russhwolf

04/07/2023, 1:32 PM
Are you making public KMP sdks or Swift sdks? A Swift consumer will see the url if they look closely but shouldn't ever need to reference it themselves. In any event, throw a ticket in GitHub and link back to this convo and we'll take a look and see what makes sense. But probably won't have any movement until after Kotlinconf at the earliest.
j

Jazmine Barroga

04/07/2023, 1:45 PM
Okay sure. Thank you 🙏
r

russhwolf

04/07/2023, 1:59 PM
Actually, even a Kotlin consumer won't interact directly with that id and url, because it'll be behind a maven coordinate which you can control the name of. What are you doing where this comes up for your consumer?
j

Jazmine Barroga

04/07/2023, 2:05 PM
it is in the podspec source url
21 Views