I’ve modified the build.gradle
file inside smack-android
folder like following
description = “”"\
Smack for Android.
All the required dependencies to run Smack on Android.
Usually you want to add additional dependencies like smack-tcp,
smack-extensions and smack-experimental."""
repositories {
maven {
url '[https://oss.sonatype.org/content/repositories/snapshots](https://oss.sonatype.org/content/repositories/snapshots)'
}
mavenCentral()
}
// Note that the test dependencies (junit, …) are inferred from the
// sourceSet.test of the core subproject
dependencies {
// androidProjects lists all projects that are checked to compile against android.jar
// Filter out the optional Smack dependencies from androidProjects
androidProjects.findAll {
![’:smack-tcp’, ‘:smack-extensions’, ‘:smack-experimental’, ‘:smack-bosh’].contains(it.getPath())
}.each { project ->
compile project
}
compile “org.igniterealtime.smack:smack-android:4.1.0”
compile “org.igniterealtime.smack:smack-tcp:4.1.0”
}
configure (androidProjects) {
task compileAndroid(type: JavaCompile) {
source = compileJava.source
classpath = compileJava.classpath
destinationDir = new File(buildDir, ‘android’)
options.bootClasspath = androidBootClasspath
}
}
test { dependsOn androidProjects*.compileAndroid }
Now gradle assemble
halts with
:smack-android:jar FAILED
:smack-android:jar (Thread[main,5,main]) completed. Took 0.255 secs.
FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ‘:smack-android:jar’.
Could not add MANIFEST.MF to ZIP ‘/home/aftnix/chat/Smack/smack-android/build/libs/smack-android-4.2.0-alpha2-SN APSHOT.jar’.