Hi all,
got an issue with the beta 1 release if the 1.4 gradle plugin.
Consider following build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.0"
packagingOptions {
exclude 'lib/x86_64/darwin/libscrypt.dylib'
exclude 'lib/x86_64/freebsd/libscrypt.so'
exclude 'lib/x86_64/linux/libscrypt.so'
}
defaultConfig {
applicationId "de.langerhans.gradle_test"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
all {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.0.0'
compile 'com.lambdaworks:scrypt:1.4.0'
}
The important bits are the last dependency and the packagingOptions. This
library comes with native libs that I obviously don't want to include in my
APK. In the 1.3 gradle plugin, the packagingOptions prevented that just
fine. In 1.4 this broke.
Interestingly it behaves differently if minifyEnabled is true or false.
If it is true, I get the freebsd and linux .so files into my APK, if it is
false, I get the .dylib.
I'm not directly opening a bug, since the changelog says
Prevent a consumer of a library removing a resource from that library,
> which would lead to a runtime NoSuchFieldError.
And therefore I was not sure if you'd actually consider this a bug or if
there is a simple workaround. Any help would be appreciated :)
--
You received this message because you are subscribed to the Google Groups
"adt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.