Open jbaruch opened 10 years ago
100%
I've chosen to go with another library simply because you distribute it in an awkward way. Good effort anyways though :)
What do you mean by "distribute it in an awkward way"?
meaning I cannot simply place compile 'com.faradaj:blur-behind:[LATEST_RELEASE_VERSION]'
in my gradle and run
Not sure what this code is. Using the dependency? Deploying it?
Using the dependency, the developer hosts it on mavenCentral for example and you just place that line in your build.gradle and the library is ready to use when you Sync Gradle again, as you know.
Here it requires downloading the project and running gradle install
on it and then mentioning it as under mavenLocal()
hm, I am not sure I follow. Using any dependency from Jcenter takes the following code in gradle:
repositorties {
jcenter()
}
dependencies {
compile 'com.faradaj:blur-behind:[LATEST_RELEASE_VERSION]'
}
When you use Android Studio the first three lines are already generated for you, so all you need to do is paste the compile
line.
ahhh so he DID do what you suggested in this issue! I thought that you suggested it and it was forgotten so my above comments are in support to your suggestion. Sorry for the confusion!
who did what? :) Now I am confused :)
The author of this lib, he did what you suggested by distributing it through JCenter. I thought that he just ignored that. So I was saying 100% that you are right he should do that. Seems he did it but didnt update the "Usage" part in the lib's main page. And the issue isnt closed :)
OK, now I got it :) I was sure you're one of the authors and referring to JCenter when you mentioned "another library" :)
I have no idea whether he did it or not, but yes, the issue is still open.
So what I did was get gradle-1.10 (required for building this) and I ran it on the blur-behind folder (the folder was in my Downloads/ folder) and then went to my build.gradle and placed those lines for mavenLocal()
under repositories and compile 'com.faradaj:blur-behind:1.0.3'
under dependencies but I still get error failed to resolve: com.faradaj:blur-behind:1.0.3
Do you think maybe that the version is no longer 1.0.3? cause the last commit mentioned 1.0.3 and your Stackoverflow answer also mentioned 1.0.3 as the latest version. Any ideas? I appreciate that you are helping me here when you don't really have to!
I just copied Blur.java and BlurBehind.java to my project and now it works fine
Uploaded library's last release to JCenter, waiting for distribution.
:+1:
@ faradaj: You could create your own free repository on Bintray. That way you don't have to wait for JCenter release. The only difference is that developers have to specify your repository in their gradle file, like this:
repositories {
mavenCentral()
maven {
url "https://dl.bintray.com/elastique/poetry"
}
}
Not sure what you mean by "waiting for release". Once your package is included in JCenter, whatever you publish in your repository becomes immediately available in JCenter.
I was referring to Faradaj's comment: "waiting for distribution" There is an approval process for JCenter:
The request message is sent to the Bintray team, who assign your package a path in the relevant part of the tree structure of the JCenter repository.
If the request is approved, an indication that the package is included in JCenter is displayed in the Package page, in the Included in work area in the bottom right corner of the page."
Source: https://bintray.com/docs/usermanual/uploads/uploads_includingyourpackagesinjcenter.html
By publishing it in your own (bintray) repository, you don't need to wait for approval.
This is done only once, per package. Once the package is approved, when you publish the files in your repository they appear in jcenter as well right away.
Error:A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugCompile'.
> Could not find com.faradaj:blur-behind:1.1.
Searched in the following locations:
https://jcenter.bintray.com/com/faradaj/blur-behind/1.1/blur-behind-1.1.pom
https://jcenter.bintray.com/com/faradaj/blur-behind/1.1/blur-behind-1.1.jar
https://repo1.maven.org/maven2/com/faradaj/blur-behind/1.1/blur-behind-1.1.pom
https://repo1.maven.org/maven2/com/faradaj/blur-behind/1.1/blur-behind-1.1.jar
file:/home/robin/.m2/repository/com/faradaj/blur-behind/1.1/blur-behind-1.1.pom
file:/home/robin/.m2/repository/com/faradaj/blur-behind/1.1/blur-behind-1.1.jar
https://repo.commonsware.com.s3.amazonaws.com/com/faradaj/blur-behind/1.1/blur-behind-1.1.pom
https://repo.commonsware.com.s3.amazonaws.com/com/faradaj/blur-behind/1.1/blur-behind-1.1.jar
https://jitpack.io/com/faradaj/blur-behind/1.1/blur-behind-1.1.pom
https://jitpack.io/com/faradaj/blur-behind/1.1/blur-behind-1.1.jar
file:/opt/android-sdk/extras/android/m2repository/com/faradaj/blur-behind/1.1/blur-behind-1.1.pom
file:/opt/android-sdk/extras/android/m2repository/com/faradaj/blur-behind/1.1/blur-behind-1.1.jar
file:/opt/android-sdk/extras/google/m2repository/com/faradaj/blur-behind/1.1/blur-behind-1.1.pom
file:/opt/android-sdk/extras/google/m2repository/com/faradaj/blur-behind/1.1/blur-behind-1.1.jar
So which repository do I actually need to add?
It's any chance for appearance of this tool on any repository?
Gradle features great dependency management that is intended to work with remote repositories. Distributing your library via JCenter will make the consumption of your library much easier and will increase the adoption.
Currently developers don't know how to consume your library (see example).
Publishing to JCenter is very simple and can be fully automated using the Gradle Bintray plugin.