我想将源代码附加到 kotlin 库项目,看起来我成功了,因为我现在在这里有源 jar :
https://jitpack.io/com/github/walleth/kethereum/bip44/0.21/ https://jitpack.io/com/github/walleth/kethereum/bip44/0.21/
之前的版本我没有导出源代码 - 所以我认为它是成功的。
https://jitpack.io/com/github/walleth/kethereum/bip44/0.20/ https://jitpack.io/com/github/walleth/kethereum/bip44/0.20/
不幸的是 AS 没有显示来源。我像这样生成它们:
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
}
}
源 jar 还包含 kotlin 文件。
一切都在这个项目中:https://github.com/walleth/kethereum https://github.com/walleth/kethereum
这就是我们的 Maven Publication。
task androidSourcesJar(type: Jar) {
archiveClassifier.set('sources')
from android.sourceSets.main.java.srcDirs
}
然后你可以使用artifact androidSourcesJar
.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)