I tried to publish a mpp library using the 1.4.20-...
# kotlin-native
s
I tried to publish a mpp library using the 1.4.20-RC kotlin version No metadata module was published, so consumer project doesn't have autocomplete in common module How do i bring back the metadata module ?
l
Can you try simply reverting to 1.4.10 and check it works?
(changing nothing else as much as possible)
s
Yes, using the 1.4.10, the metadata module is there but i'm facing another problem with it. (that's why i tried 1.4.20 versions) the thing is that the metadata module published with 1.4.10 version is platform dependant. I mean, if I published it from a linux host, then consumer project will be only able to build for linux targets see here: https://github.com/SBNTT/mpp-game-math/packages/503919 in the .module file:
"url": "../../mpp-game-math-linux_x64/0.1/mpp-game-math-linux_x64-0.1.module"
If i do not publish the metadata module, consumer projects can build for any target, but autocompletion in common module is not present
l
Oh, if you have a reproducing project, you can report on kotl.in/issue with the details, I think it can be helpful.
The observations on 1.4.10 will also be helpful in the report I think.
s
i'm afraid i'm doing something wrong btw
l
Are you touching the modules names, group name, metadata configuration, or using a Gradle version older than 6.4?
Also, you are using the maven-publish plugin, and testing with mavenLocal?
everything works using a local repo, as i'm using macos to publish, and build macos runnable on the CI, metadata publication are done using a linux host, then i can't build for macos target as i explained before
and, gradle 6.6
l
Ah, this is expectable. Linux cannot build for incompatible targets. You need to run that on a mac. Many CIs offer that.
s
no no no i mean, on the CI, metadata publication is done with a linux host then, on another project which depends on this library, only linux target can be built
l
Can you publishToMavenLocal instead, and use mavenLocal in the other project depending on the library?
s
it suddenly begins to work without apparent reasons wtf Yes, when i was using local repository it worked .... surely it was a cache issue when i made tests with remote repositories
sorry, i I should have thought to clear gradle cache to force re download library before each test -_-