Has anyone seen a better publishing script than th...
# multiplatform
p
Perhaps I’ll go with Bintray instead of Sonatype since the kotlinx publishing seems to work well with it.
k
Those are basically your 2 options. Bintray and Sonatype. “Better” is somewhat relative. I’ve used both but have moved over to Sonatype. My scripts are basically copies of sqldelight because it was working fine.
p
Didn’t you have to fix the
group
?
Is your script up somewhere?
This? ^
k
That’s one
My group is ‘co.touchlab’
p
Off the shelf that script doesn’t work for me. It tires publishing with
unamed
as the group.
p
do you set
project.group = GROUP
somewhere?
Ah, yeah in your main build.gradle
I’ll give it another shot.
k
Yeah, that
Part of the reason I went with sqldelight script was because I was tweaking sqldelight itself and I’d rather have one config pattern. Build script maintenance is not my favorite task
☝️ 1
What are you working on, btw (if public)?
p
With this script do you just run
./gradlew publish
?
k
Yes?
Yes. Sqldelight itself needs to do more because it has a gradle plugin deploy
g
@pardom I don’t know if it’s better but we have also some quite extensive build scripts: https://github.com/data2viz/data2viz
👀 1
k
Yeah, extensive sounds about right! Publishing native adds the metadata wrinkle, which is a whole different discussion.
p
Did you guys at any point run into this?
Copy code
Execution failed for task ':oolong:generateMetadataFileForIosPublication'.
> org.jetbrains.kotlin.gradle.plugin.mpp.HierarchyAttributeContainer cannot be cast to org.gradle.api.internal.attributes.AttributeContainerInternal
k
No. What version of gradle are you on, and do you have metadata enabled in settings.gradle?
When I say “no” I mean I don’t remember. Ran into lots of stuff
p
What version of gradle are you on
1.3.21
do you have metadata enabled in settings.gradle
yes
k
Gradle, not kotlin
p
Oh
5.2.1
k
We use 4.10.2. If you’re on bleeding edge you could have trouble. I recall there being trouble with taht
I think ~5.1 works
p
😞
I’ll try that.
k
It’s all metadata related
Gradle metadata, not kotlin metadata, which are different things
p
👏 that was it!
k
👍
p
k
Ran a local build to see if the native wasn’t crashing. That native state is complicated…
Heading out, but will take a look if I get some time
p
Ran a local build to see if the native wasn’t crashing. That native state is complicated…
Curious what you mean by this. Talk later 👋