Publish jar library to bintray using gradle

2019-01-26 23:18发布

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?

2条回答
可以哭但决不认输i
2楼-- · 2019-01-26 23:46

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

查看更多
放荡不羁爱自由
3楼-- · 2019-01-26 23:51

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.

查看更多
登录 后发表回答