1

Here I find all resources to build my own aSmack jar, correct? https://github.com/Flowdalic/asmack

But how can I put the aSmack jar (version 4.0.6) in my Maven/Gradle application?

Flow
  • 23,572
  • 15
  • 99
  • 156
Willi Mentzel
  • 27,862
  • 20
  • 113
  • 121

2 Answers2

3

Because I haven't uploaded it to OSS Sonatype, so it won't show up on Maven Central. :-)

You can add aSmack to gradle like any other jar library. See Add external jar in gradle

Community
  • 1
  • 1
Flow
  • 23,572
  • 15
  • 99
  • 156
1

Read the README.MD:

https://github.com/Flowdalic/asmack

It says:

Smack 4.1 adds native support for Android

Starting with Version 4.1 Smack is able to run without modifications on Android. Smack 4.1 is currently in a alpha development stage. Snapshots and alpha releases are on Maven Central. Everyone is invited to test and provide feedback.

More information on how to use Smack 4.1 in your Android Project can be found in the Smack 4.1 Readme and Upgrade Guide.

Compiled JARs Make sure to read the README for every release! Or else aSmack won't work for you. 95% of the problems people experiencing with aSmack come from the fact that they didn't read the README.

The JARs can be found @ http://asmack.freakempire.de/

Leads you here:

https://github.com/igniterealtime/Smack/wiki/Smack-4.1-Readme-and-Upgrade-Guide

and then:

Projects that target Android

With Gradle

repositories {
  maven {
    url 'https://oss.sonatype.org/content/repositories/snapshots'
  }
  mavenCentral()
}

Smack configuration with smack-extensions for XMPP over TCP

dependencies {
  compile "org.igniterealtime.smack:smack-android-extensions:4.1.0-beta1"
  compile "org.igniterealtime.smack:smack-tcp:4.1.0-beta1"
}

Minimal Smack configuration for XMPP over TCP

dependencies {
  compile "org.igniterealtime.smack:smack-android:4.1.0-beta1"
  compile "org.igniterealtime.smack:smack-tcp:4.1.0-beta1"
}
Jared Burrows
  • 54,294
  • 25
  • 151
  • 185