Publish jar library to bintray using gradle

为君一笑 提交于 2019-11-28 05:38:24

问题


I'm trying to publish a jar library to bintray using Gradle. I have a package on my project which is "com.github.instagram". What I am trying to achieve is to build the jar file of this package and upload it to bintray.
here are my configurations

uploadArchives  {
    repositories {
      bintrayMavenDeployer {
        username          'xxx'
        apiKey            'xxx'
        repoOwner         'xxx'
        repoName          'xxx'
        packageName       'xxx'
        description       'This is an example to simplifying bintray publishing'
        descUrl           'https://github.com/ysb33r/Gradle/blob/master/bintray/README.md'
        tags              'gradle','bintray'
   }
  }
}

but when i execute gradlew uploadArchives, it uploads the apk file instead of jar library file. how to instruct my gradle to compile only the package that I want and produce a jar file?


回答1:


Please use the dedicated gradle-bintray-plugin. The documentation include very detailed examples.




回答2:


After you've created a Bintray account, I suggest you try using the following two scripts to make working with the gradle-bintray-plugin easier.

https://raw.githubusercontent.com/attwellBrian/JCenter/master/installv1.gradle https://raw.githubusercontent.com/attwellBrian/JCenter/master/bintrayv1.gradle

Please read the tutorial on how to use these scripts.

The gradle-bintray-plugin is great. But its usage instructions at its GitHub page aren't straight forwards.



来源:https://stackoverflow.com/questions/27153034/publish-jar-library-to-bintray-using-gradle

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