-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Snapshots
For information on Glide v4, see the documentation. This wiki covers Glide v3 only.
For users who don't want to wait for the next version of Glide and are willing to live on the bleeding edge, we deploy snapshot versions of the library to Sonatype's snapshot repo.
After each push to the master branch on GitHub, Glide is built by travis-ci. If the build succeeds, we automatically deploy the latest version of the library to Sonatype.
Each integration library will have its own snapshot, as will the main Glide library. If you use a snapshot version of the Glide library you must also use the snapshot versions of any integration libraries you use as well, and vice versa.
Sonatype's snapshot repo functions as any other maven repo would, so snapshots are accessible as a jar, in maven, or in gradle.
Jars can be downloaded directly from Sonatype. Double check the date to make sure you're getting the latest version.
Add the snapshot repo to your list of repositories:
repositories {
jcenter()
maven {
name 'glide-snapshot'
url 'https://oss.sonatype.org/content/repositories/snapshots'
}
}
And then change your dependencies to the v3 snapshot version:
dependencies {
compile 'com.github.bumptech.glide:glide:3.9.0-SNAPSHOT'
compile 'com.github.bumptech.glide:okhttp-integration:1.6.0-SNAPSHOT'
}
or the unreleased v4 snapshot version:
dependencies {
compile 'com.github.bumptech.glide:glide:4.0.0-SNAPSHOT'
compile 'com.github.bumptech.glide:okhttp-integration:2.0.0-SNAPSHOT'
}
This is untested and taken from a Stack Overflow question. Suggestions on improving this section are particularly welcome!
Add the following to your ~/.m2/settings.xml
:
<profiles>
<profile>
<id>allow-snapshots</id>
<activation><activeByDefault>true</activeByDefault></activation>
<repositories>
<repository>
<id>snapshots-repo</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<releases><enabled>false</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
</repositories>
</profile>
</profiles>
Then change your dependencies to the snapshot version:
<dependency>
<groupId>com.github.bumptech.glide</groupId>
<artifactId>glide</artifactId>
<version>3.9.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.github.bumptech.glide</groupId>
<artifactId>okhttp-integration</artifactId>
<version>1.6.0-SNAPSHOT</version>
</dependency>
If you want to get the same files that would be released execute this command:
gradlew clean buildArchives uploadArchives --stacktrace --info -PSNAPSHOT_REPOSITORY_URL=file://p:\path\to\repo -PRELEASE_REPOSITORY_URL=file://p:\path\to\repo
This will create a m2 repository folder that you can consume with Gradle in a project to test your change:
repositories {
// make sure this is declared before glide-snapshot so it's queried first
maven { name 'glide-local'; url 'p:\\path\\to\\repo' }
}
dependencies {
// enable this to make sure changes are picked up immediately
//configurations.compile.resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
compile 'com.github.bumptech.glide:glide:x.y.z-SNAPSHOT'
}
For information on Glide v4, see the documentation. This wiki covers Glide v3 only.