https://kotlinlang.org logo
p

pardom

03/05/2019, 9:25 PM
Perhaps I’ll go with Bintray instead of Sonatype since the kotlinx publishing seems to work well with it.
k

kpgalligan

03/05/2019, 9:29 PM
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

pardom

03/05/2019, 9:32 PM
Didn’t you have to fix the
group
?
Is your script up somewhere?
This? ^
k

kpgalligan

03/05/2019, 9:33 PM
That’s one
My group is ‘co.touchlab’
p

pardom

03/05/2019, 9:34 PM
Off the shelf that script doesn’t work for me. It tires publishing with
unamed
as the group.
p

pardom

03/05/2019, 9:35 PM
do you set
project.group = GROUP
somewhere?
Ah, yeah in your main build.gradle
I’ll give it another shot.
k

kpgalligan

03/05/2019, 9:35 PM
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

pardom

03/05/2019, 9:41 PM
With this script do you just run
./gradlew publish
?
k

kpgalligan

03/05/2019, 9:46 PM
Yes?
Yes. Sqldelight itself needs to do more because it has a gradle plugin deploy
g

gaetan

03/05/2019, 9:51 PM
@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

kpgalligan

03/05/2019, 9:53 PM
Yeah, extensive sounds about right! Publishing native adds the metadata wrinkle, which is a whole different discussion.
p

pardom

03/05/2019, 10:24 PM
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

kpgalligan

03/05/2019, 10:25 PM
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

pardom

03/05/2019, 10:25 PM
What version of gradle are you on
1.3.21
do you have metadata enabled in settings.gradle
yes
k

kpgalligan

03/05/2019, 10:26 PM
Gradle, not kotlin
p

pardom

03/05/2019, 10:26 PM
Oh
5.2.1
k

kpgalligan

03/05/2019, 10:26 PM
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

pardom

03/05/2019, 10:27 PM
😞
I’ll try that.
k

kpgalligan

03/05/2019, 10:27 PM
It’s all metadata related
Gradle metadata, not kotlin metadata, which are different things
p

pardom

03/05/2019, 10:30 PM
👏 that was it!
k

kpgalligan

03/05/2019, 10:31 PM
👍
p

pardom

03/05/2019, 10:31 PM
k

kpgalligan

03/05/2019, 10:35 PM
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

pardom

03/05/2019, 10:36 PM
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 👋
2 Views