1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-12-23 04:57:58 +01:00
Smack/smack-android/build.gradle
Paul Schaub 4ed4e8f71c
Don't compile android.jar contents into smack-android jar
gradles compile command (which is deprecated and should be replaced with implementation) includes the arguments resources into the result jar.
That means that smack-android will contain resources found at the android boot classpath.

This results in a +~11mb increase in size of the resulting apk when including Smack as a composite build. The increase comes from 11mb of Android resources, mainly drawables.

compileOnly (formerly provided) on the other hand will assert that the android.jar classes are provided by the system, which is probably what we want in this case.
2019-09-13 14:33:58 +02:00

28 lines
1.1 KiB
Groovy

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."""
// Note that the test dependencies (junit, …) are inferred from the
// sourceSet.test of the core subproject
dependencies {
implementation project(':smack-xmlparser-xpp3')
// Depend on minidns-android21 as optional dependency, even if may
// not need it. Can't hurt to have it in the programm path with
// the correct MiniDNS version as it won't hurt even if the
// Android version is smaller then 21. Note that we deliberatly do
// not add this to smack-minidns, as this dependency may also be
// used in non-Android projects.
compile "org.minidns:minidns-android21:$miniDnsVersion"
// androidProjects lists all projects that are checked to compile against android.jar
// Filter out the optional Smack dependencies from androidProjects
(androidProjects - androidOptionalProjects)
.each { project ->
compile project
}
// Add the Android jar to the Eclipse .classpath.
compileOnly files(androidBootClasspath)
}