Hello, I’m developing a kotlin library and using it on a java project but it is not including sources in my jar when I try to access it from intellij it says
compiled code
on the method implementations, any ideias?
t
Ties
12/12/2022, 10:59 AM
If you turned it into a .jar and included it in a java projects, did you also make a jar that contains the source? (with for example
Copy code
mvn source:jar
) ?
a
André Martins
12/12/2022, 11:03 AM
yes I have a task for the sources Jar like following
Copy code
task sourcesJar(type: Jar) {
from sourceSets.main.allJava
classifier 'sources'
}
t
Ties
12/12/2022, 11:06 AM
And did you also inlcude something like:
Copy code
idea {
module {
//if you love browsing Javadoc
downloadJavadoc = true
//if you love reading sources :)
downloadSources = true
}
}
I am not sure I understood your problem exactly. I am also developing a Kotlin library. You can see how it solves this problem there: https://github.com/vsirotin/si-units