Attach sources to kotlin library project don't show up in AS

瘦欲@ 提交于 2019-12-21 07:18:08

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!