How to suppress "warning: Ignoring InnerClasses attribute for an anonymous inner class" with Gradle?
./gradlew assembleDebug
(since this is assertj-core
- ./gradlew testDebug
)Dependency:
dependencies {
testCompile "org.assertj:assertj-core:1.7.1"
}
Warning:
Dex: warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.assertj.core.internal.cglib.reflect.FastClassEmitter$3) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
Something like:
tasks.withType(JavaCompile) {
sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7
configure(options) {
compilerArgs << "-Xlint:-options" // Turn off "missing" bootclasspath warning
}
}
What compilerArgs
can I add to suppress this warning?
References:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With