Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migration from JCenter #69

Open
jakoss opened this issue Feb 8, 2021 · 11 comments
Open

Migration from JCenter #69

jakoss opened this issue Feb 8, 2021 · 11 comments
Labels
question Further information is requested

Comments

@jakoss
Copy link

jakoss commented Feb 8, 2021

In may this library won't be available from JCenter: https://jfrog.com/blog/into-the-sunset-bintray-jcenter-gocenter-and-chartcenter/

Please migrate this library to some other repository

@jakoss jakoss added the question Further information is requested label Feb 8, 2021
@petitJAM
Copy link

For anyone that wants to get rid of jcenter() without having to migrate away from this library, you can compile this project yourself to an AAR file and include that in your dependencies.

  1. Clone this repo
  2. Build the AAR: ./gradlew :imageviewer:assembleRelease
  3. The AAR file can be found at imageviewer/build/outputs/aar/imageviewer-release.aar. Copy this into app/libs/ in your project.
  4. Add this to your dependencies:
    implementation files("libs/imageviewer-release.aar")
    implementation "com.github.chrisbanes:PhotoView:2.2.0" 
    The AAR file does not include transitive dependencies, so you will need to include PhotoView yourself
  5. Subscribe to notifications on this issue so that you can get notified if this project ever moves to another repository and you can remove all of the above :)

@marcosalis
Copy link

Any updates? Will we get a Maven Central (or other repository) update for the library?
Thank you for looking into this!

@omkar-tenkale
Copy link

omkar-tenkale commented Jun 7, 2021

implementation 'com.github.omkar-tenkale:StfalconImageViewer:d11578fe3fd30c33a58b49978e3a9fd425291673'

EDIT:
This works too

implementation 'com.github.stfalcon-studio:StfalconImageViewer:master-SNAPSHOT'

Use with maven { url 'https://jitpack.io' } in project build gradle inallprojects { repositories { ... block

Happy Coding 😁

@omkar-tenkale
Copy link

omkar-tenkale commented Jun 7, 2021

implementation 'com.github.omkar-tenkale:StfalconImageViewer:d11578fe3fd30c33a58b49978e3a9fd425291673'

I just forked this repo and added to my project via Jitpack (https://jitpack.io/)

You can use the line above
Else if you want to host this library yourslelf follow these steps

1.Fork this repo
2.Go to your forked repo
eg https://github.com/omkar-tenkale/StfalconImageViewer
3. Create your own implementation string like above in format
implementation com.github,my_user_name:StfalconImageViewer:d11578fe3fd30c33a58b49978e3a9fd425291673

The last part is commit hash,You can use a different commit hash for a diferent version.

4 Just paste this newly created string in your build gradle sync a few times took me 2-3 syncs

Done :)

You also need to add this line to build gradle

  	maven { url 'https://jitpack.io' }

My root build gradle file


buildscript {
    repositories {
        google()
        jcenter()
        mavenCentral()
    }
    dependencies {
        classpath "com.android.tools.build:gradle:4.2.1"

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        jcenter()
        maven { setUrl("https://jitpack.io") }
        maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

@dncks1525
Copy link

For gradle plugin version 7.0.3, I need to edit settings.gradle to use the library from the jitpack repository.

dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google()
        mavenCentral()
        jcenter() // Warning: this repository is going to shut down soon
        maven { url "https://jitpack.io" }
    }
}

@jakoss
Copy link
Author

jakoss commented Oct 14, 2021

@dncks1525 Remember that order matters. With such setup - library will still be downloaded from jCenter. I'd recommend to move it to the end

@brian-pinwheel
Copy link

@omkar-tenkale I believe the jitpack.io repo is protected by authentication. If we try to download it from jitpack we get an authentication error. I am wondering if you have jitpack authentication already configured so it is working for you.

@omkar-tenkale
Copy link

@brian-pinwheel No its public

@brian-pinwheel
Copy link

brian-pinwheel commented Jan 18, 2022

@omkar-tenkale This is the URL that was computed when I included the library and when I tried to access it, I was met with an authentication prompt. Is the URL not computed correctly from the build or is the maven artifact repository private?

Screen Shot 2022-01-18 at 10 57 20 AM

@omkar-tenkale
Copy link

You tried using the new

implementation 'com.github.stfalcon-studio:StfalconImageViewer:v1.0.1'

@brian-pinwheel
Copy link

@omkar-tenkale I was going off the readme of the repo. Should I be looking elsewhere for which version to use?

Also, do you make the current version public and password protect older versions? I would think if you were trying to use an authentication model you would want to password protect the latest version. I am a bit concerned about depending on a library that might make the version I'm using password-protected in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

6 participants