I want to attach the sources to an kotlin library project and it looks I succeeded as I have the source-jars now in here:
https://jitpack.io/com/github/walleth/kethereum/bip44/0.21/
the version before I did not export the sources - so I thought it is successful.
https://jitpack.io/com/github/walleth/kethereum/bip44/0.20/
Unfortunately AS does not show the sources. I am generating them like this:
allprojects {
repositories {
jcenter()
maven { url 'https://jitpack.io' }
}
apply plugin: "kotlin"
apply plugin: "jacoco"
apply plugin: "maven"
apply plugin: "com.github.ben-manes.versions"
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
testCompile 'org.assertj:assertj-core:3.8.0'
testCompile 'junit:junit:4.12'
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives sourcesJar
archives javadocJar
}
}
Also the source-jars contain the kotlin files. It is all in this project: https://github.com/walleth/kethereum
来源:https://stackoverflow.com/questions/46565591/attach-sources-to-kotlin-library-project-dont-show-up-in-as