How Could I produce sources.jar for JVM target in ...
# multiplatform
r
How Could I produce sources.jar for JVM target in multiplatform project? sourceSet for kotlin is different from normal Java
Copy code
task sourcesJar(type: Jar) {
    from kotlin.sourceSets.jvmMain.allJava
    archiveClassifier = 'sources'
}
I tried this following original java projects. but this didn't work
@russhwolf coud you help ?
r
The multiplatform gradle plugin should be doing that automatically
r
No sources.jar is not produced
or may be I wasn't able to find under
build
folder
r
It won't show up in build. It will get included when you run a publish task
r
./gradlew publish ?
r
Try running
publishToMavenLocal
and you should see it show up in your local repository which usually lives somewhere like
~/.m2/repository
r
I also need to upload these
souces.jar
Oh it did create
soucres.jar
thank you 🙂
👍 1
@russhwolf How do I publish generated
aar
file using bintray? For android
aar
file is generated under
build/outputs/aar
.
publish.gradle
uploads
jar
and dont know how but
klib
file too.
r
(NB I'm not the only person who knows these answers :))
👍 1
For Android you need to manually enable publishing
r
Thank you I will take care of this. It created jar file for my android