Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change groupid if project is already uploaded to bintray and synced with jcenter?

I've recently uploaded my github project to bintray and successfully synced it with JCenter repository. I used this tutorial:

http://inthecheesefactory.com/blog/how-to-upload-library-to-jcenter-maven-central-as-dependency/en

So my gradle dependency was :

dependencies {
     compile 'com.github.danylo2006:hashtag-helper:1.1.0'
}

In order to upload it I've modified my build.gradle and added relevant peace of script. Everything like in the tutorial.

... some code here
ext {
    bintrayRepo = 'maven'
    bintrayName = 'hashtag-helper'

    publishedGroupId = 'com.github.danylo2006'
    libraryName = 'HashTagHelper'
    artifact = 'hashtag-helper'

    libraryDescription = 'This is a library designed for highlighting hashtags ("#example") and catching click on them.'

    siteUrl = 'https://github.com/danylo2006/HashTagHelper'
    gitUrl = 'https://github.com/danylo2006/HashTagHelper.git'

    libraryVersion = '1.1.0'

    developerId = 'danylovolokh'
    developerName = 'Danylo Volokh'
    developerEmail = '[email protected]'

    licenseName = 'The Apache Software License, Version 2.0'
    licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
    allLicenses = ["Apache-2.0"]
}

Here is the tricky part:

I've changed my github nickname danylo2006 to danylovolokh and now I want to change gradle dependency:

dependencies {
     compile 'com.github.danylo2006:hashtag-helper:1.1.0'
}

Change to:

dependencies {
     compile 'com.github.danylovolokh:hashtag-helper:1.1.0'
}
  1. I got groupId that I need from Sonatype
  2. So I've modified my gradle script.

The only relevant change is :

publishedGroupId = 'com.github.danylo2006'

Has been changed to

publishedGroupId = 'com.github.danylovolokh'

I run the relative commands: gradlew install gradlew bintrayUpload

And I got BUILD_SUCCESSFULL

But if I add new dependency to any other gradle project I get an error that "Error:(36, 13) Failed to resolve: com.github.danylovolokh:hashtag-helper:1.1.0"

like image 868
Danylo Volokh Avatar asked Feb 09 '23 01:02

Danylo Volokh


1 Answers

Inclusion to JCenter is done by the path of your groupId. JFrog needs to include the new path from your package to JCenter as well. Please contact JFrog support at [email protected]

like image 132
JBaruch Avatar answered Feb 11 '23 00:02

JBaruch