-
Notifications
You must be signed in to change notification settings - Fork 43
1.1.0 not publishing kotlin-api artifact for platform type common #244
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Looks like 1.6.20 changed the default with this. I'm adding it back in, but I'm a little concerned as we've had issues with sourceset compatibility before. Also, the fact that this isn't on by default makes me think there will be some kind of compatibility issue that isn't clear right now, but we'll have to see. It's not "other than Android platforms" also. I think it's just when you don't have hierarchical enabled. We use 1.1.0 in various non-Android contexts, but admittedly nothing that isn't hierarchical. |
I honestly have no idea. 1.1.0 and 1.1.1 work in KaMP Kit and anything else I've tried it in. What version of Kotlin are you using, and how are you including the dependency? |
Kotlin 1.6.10 because 1.6.20 isn't compatible with Compose 1.1.1 (or vice versa).
Touchlab.kermit resolves to |
Well, I don't know. We're not doing anything odd with the publishing, as far as I know. If you have a repro config that's failing, it would help. I'm running 1.6.10 for the same reason locally (Compose) and it seems to grab everything OK. |
I appreciate the help. I compiled KAmPKit with Kermit 1.1.1 and it worked perfectly. I also compared my setup with KAmPKit and modified it to get closer to what KAmPKit does but to no avail. My code is here:
this should compile but when I change |
Looks like source set config for iOS. Looking at recent history, it looks like you changed This resolves dependencies, but I haven't tried to build it: https://github.com/kpgalligan/Kotlin-Bloc/tree/kpg/source_config |
Thank you. Will check it out later, on my way to the airport. |
Unfortunately not working. I'm working off the feature/ios_support not the main/master branch and the ios target setup seems to look good as far as I can see. Anyway, will look into it later. Thanks |
Ah, right. Different branch
On Wed, Apr 20, 2022 at 2:48 PM Emanuel Moecklin ***@***.***> wrote:
Unfortunately not working. I'm working off the feature/ios_support not the
main/master branch and the ios target setup seems to look good as far as I
can see. Anyway, will look into it later. Thanks
—
Reply to this email directly, view it on GitHub
<#244 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAQWIFHMGTZH4E26ZBRYODVGBGRFANCNFSM5TZOJNPA>
.
You are receiving this because you modified the open/close state.Message
ID: ***@***.***>
--
Kevin Galligan
https://twitter.com/kpgalligan
|
I'm not sure if there's something special about your project layout or if my Android Studio install is having issues, but loading the project is like 20+ minutes. Maybe it just feels extra long or something. I didn't exactly time it. Time for a new laptop, maybe :) Waiting no dependency indexing... |
OK, it finished while I was tying that out. |
At this point I'd say I'm very confused. I've stripped back a bunch of things confounding the error messaging. I get to this point:
The Android plugin is attempting to do something with
We don't deploy there. We deploy to
It finds it. So, the obvious assumption is that Now, the listing for:
is there, but trying to grab the aar... OK, while I was typing this all out, that file, the 1.1.1 aar, started downloading. But not from that link. It's really quite confusing. I don't know what's happening with that. There's some kind of maven cache going on and some of the links work, some don't. I'm honestly pretty confused by the errors. I've never quite run into this. |
In any case, the project fails loading because it can't find that file, at least for me, but that's some crazy Android plugin stuff. Not sure why it only looks in that repo, and why that repo, which is apparently a mirror, isn't returning the file as expected. Need to put this on the shelf for now, but curious to see how this plays out. I was also getting errors for |
That was super helpful, the fix was easy, I simply switched the order of the two repos (gradlePluginPortal() and mavenCentral()). My assumption is that it finds some artifact on the plugin portal, maybe you guys deployed your plugin there initially? Anyway with mavenCentral() being the first repo, it seems to find the correct artifacts now and live is good again. |
We definitely didn't. That repo does have references from 1.1.1 as well, so it really seems like it's doing some kind of auto-mirror, but it also didn't get that version mirrored correctly. That's really weird, and honestly kind of frustrating. Anyway, glad you got it sorted out! |
Hmm. Now I have to think about this some. We do publish a grade plugin, but if it goes to the "official" plugin repo somehow, it must be doing it automatically. We never explicitly publish there. Seems plausible, although again frustrating that if so, it would attempt to pull in the entire package set. Something we should look into I guess. |
https://plugins.gradle.org/m2/co/ seems to be the "regular" plugin repository. When I open https://plugins.gradle.org/m2/co/touchlab it redirects to JFrog/Jcenter. The Gradle Plugin Portal is/was relying on JCenter before it was decommissioned (see e.g. https://blog.gradle.org/plugins-jcenter). My assumption is that JCenter is still mirroring Maven Central but only the JVM/Android artifacts and that's how it finds some of the required artifacts in the gradlePluginPortal() repo.
|
Wow. That's actually good info to get out there somewhere. Don't put |
@kpgalligan btw I released the first version of my UI framework for Kotlin Multiplatform: https://1gravity.github.io/Kotlin-Bloc. I'm still working on the testing framework and the sample apps need some documentation but it's a first draft and it's ready to be battle tested. It's simpler and requires less boilerplate code than anything I've seen so far (Decompose, Orbit, Maverick, MVIKotlin, Ballast etc.). Maybe it's interesting for you and Touchlab. |
Unfortunately 1.1.0 doesn't publish a kotlin-api artifact for platform type common which leads to the following error if the consuming project doesn't have a hierarchical project structure:
This is what's missing:
The current artifact only contains:
--> kotlin-metadata instead of kotlin-api, hence the error when using it as dependency with other than Android platforms.
All you need to do is to set this gradle flag:
kotlin.mpp.enableCompatibilityMetadataVariant=true
See also: https://kotlinlang.org/docs/multiplatform-hierarchy.html#for-library-authors
The text was updated successfully, but these errors were encountered: