-
Notifications
You must be signed in to change notification settings - Fork 198
Description
Hi all,
I was looking on publishing one of my libraries to JCenter/Maven, so I looked around and stumbled upon the following guide:
https://inthecheesefactory.com/blog/how-to-upload-library-to-jcenter-maven-central-as-dependency/en
Everything went fine, until I wanted to upload the files. The bintray plugin refuses to use the artifact id I specified, and instead names everything as the name of the module.
The structure of my project is as follows:
"app" is an example project and "library" is the library I want to upload.
My library/bintray config is as follows:
https://github.com/AVOdev/AWSPushManager/blob/edb9c50f3e3b2b7c20967339931ed71ae83885e0/library/build.gradle
"aws-push-manager" is how I want my library to be named on Bintray, but everything gets uploaded as library-***.
I found #103, #81 and @eyalbe4's comments and updated to plugin version 1.6. Now the pom file gets generated correctly, but the sources are still generated under "library". Now it's even fragmented!
As a temporary fix, I reverted to 1.4 and renamed my library project to "aws-push-manager" and it works instantly:
However, I would like to keep the name "library" for my library project. Could you please advise on how to achieve this?
Thanks in advance! :)
Activity
eyalbe4 commentedon May 4, 2016
Hi @Flitskikker,
What names do your artifacts have before they are uploaded to Bintray (on your file-system)? I'm asking this because the Bintray Plugin simply collects the artifacts from the defined Configurations (the "archives" Configuration for example).
yujintao529 commentedon Nov 19, 2016
i happen the same problems,and i found some founds.



Firstly,
you must renamed the androidSourcesJar and androidJavadocsJar of name . and you will get correct androidJavadocsJar and androidSourcesJar.
so i try to renamed the outputFile's name.like this,
and then , i think i resolve the problems and print all files of the "archives" Configuration like this,
and gradle print message :
files length 3
files mixdpic-1.0.5-sources.jar
files mixdpic-1.0.5-javadoc.jar
files mixdpic.aar
now, i think i can upload correct arr'file.but!!!!!!!!

when i exec gradle clean bintrayUpload --info ,i found some problems!!!!!!:
just you see ,the name of aar is still module's name-aar。
this is bug?
ok,finally,i solve the problem like this!!!!



the method is simple.i just create configuration named "jcenter_upload" like this configurations.create("jcenter_upload")
and then configure install like this
and configure artifacts
finally
you can see my project
yujintao529 commentedon Nov 20, 2016
ok,i find a simple method, you just set the value of project.archivesBaseName to your POM_ARTIFACT_ID
yakivmospan commentedon Dec 22, 2016
Facing the same issue