https://kotlinlang.org logo
Title
f

Friedger

04/27/2020, 1:01 PM
I don't want to publish on maven
m

Marc Reichelt

04/27/2020, 1:01 PM
I guess then you can build it and then push it to the local maven repo?
f

Friedger

04/27/2020, 1:02 PM
the app does not pick up the library
I have added mavenLocal as repo
m

Marc Reichelt

04/27/2020, 1:03 PM
Hmm, I don’t know then - maybe @russhwolf knows 🙂
Just for the record: Which Gradle version do you use?
f

Friedger

04/27/2020, 1:05 PM
@Marc Reichelt 5.6.4
then I run
./gradlew shared:pubTML app:build
and get
Could not resolve co.touchlab.kampstarter:shared:1.1
I also tried the other publish to maven local tasks
m

Marc Reichelt

04/27/2020, 1:20 PM
Hmm, I would have to dive into the issue myself (but don’t have the time right now). Others might know more - maybe when @kpgalligan’s timezone comes up he can have a look 🙂
f

Friedger

04/27/2020, 1:21 PM
Thank you anyway!
👍 1
r

russhwolf

04/27/2020, 1:24 PM
Try moving group and version to top-level instead of having them inside the kotlin block
f

Friedger

04/27/2020, 1:25 PM
Same result 😕
Do I need to call all the publish tasks?
r

russhwolf

04/27/2020, 1:27 PM
Just publishToMavenLocal should be enough
Issue might be that you're trying to do everything at once. Does
publishToMavenLocal
work if you don't try to build
app
at the same time?
f

Friedger

04/27/2020, 1:36 PM
Yes, I just shared it in one line for brevity
r

russhwolf

04/27/2020, 1:36 PM
If not, try splitting app into a separate gradle project with its own
settings.gradle
and see if that helps
f

Friedger

04/27/2020, 1:37 PM
I can publish something, but there is no aar in .m2
r

russhwolf

04/27/2020, 1:38 PM
oh wait I know what it is
add
publishAllLibraryVariants()
to the android target
👍 1
f

Friedger

04/27/2020, 1:42 PM
Build success! Thank you very much!
r

russhwolf

04/27/2020, 1:43 PM
Nice!
m

Marc Reichelt

04/27/2020, 3:13 PM
🎉