powered by Jive Software

How to use Gradle to reference a SMACK snapshot build


Can someone help me figure out how do I include one of SMACK’s snapshots build into my Android gradle files ?

I tried several ways - none works:

  • compile group: “org.igniterealtime.smack”, name: “smack-android”, version: “4.2.3-SNAPSHOT”, changing: true

  • compile “org.igniterealtime.smack:smack-android:latest.integration”

  • compile “org.igniterealtime.smack:smack-android:4.2.3-SNAPSHOT”

I’d like to try 4.2.3 or 4.3.0 due to some open issue in file-upload support in 4.2.2.


“none works” is usually not a good problem description. Your config looks good, but did you also add Maven Central’s snapshot repository to your build?

Sorry for short description on my original post.

I’ve tried each possible combination of these three:

  • compile group: “org.igniterealtime.smack”, name: “smack-android”, version: “4.2.3-SNAPSHOT”, changing: true

  • compile “org.igniterealtime.smack:smack-android:latest.integration”

  • compile “org.igniterealtime.smack:smack-android:4.2.3-SNAPSHOT”

with either:



Can you share the correct way to build against a snapshot ?

(meanwhile I managed to get the sources, build and compile my project against SMACK 4.2.3 but making this work without needing to compile all sources locally is still something we’re missing)

Thank you,

Well the snapshots are there: https://oss.sonatype.org/content/repositories/snapshots/org/igniterealtime/smack/smack-core/4.2.3-SNAPSHOT/

And since not provide the relevant parts of your build gradle or the error message (from gradle) I’m unable to help. :confused:

Sorry, my bad. Trying to provide the details you’ve asked, I managed to compile and run 4.2.3 ok, so thanks and sorry for the time.

What worked for me, for trying the file upload support is:

Project file:

allprojects {
    repositories {


        // Smack
        maven {
            url 'https://oss.sonatype.org/content/repositories/snapshots'
            url "https://maven.google.com"


Module file:

    compile 'org.igniterealtime.smack:smack-tcp:4.2.3'
    compile 'org.igniterealtime.smack:smack-android:4.2.3'
    compile 'org.igniterealtime.smack:smack-android-extensions:4.2.3'

    compile 'org.igniterealtime.smack:smack-experimental:4.2.3'

Thanks again,

Glad that it works now for you, but you don’t pick up any -SNAPSHOT release, just the current Smack stable version (4.2.3).

I’m not sure if you can have multiple ‘url’ attributes within a single ‘maven’ enclosure.

I’ve uploaded 4.2.4-SNAPSHOT with bugfixes and new features, you could try if your get your build system to pick up that SNAPSHOT.

1 Like