Как подавить "предупреждение: игнорирование атрибута InnerClasses для анонимного внутреннего класса" с помощью Gradle?
- Это не дублирующий вопрос.
- Это не во время Proguard, и я не хочу подавлять использование Proguard
- Я хотел бы подавить выполнение обычного
./gradlew assembleDebug
(так как этоassertj-core
-./gradlew testDebug
)
Зависимость:
dependencies {
testCompile "org.assertj:assertj-core:1.7.1"
}
Внимание:
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.
Что-то вроде:
tasks.withType(JavaCompile) {
sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7
configure(options) {
compilerArgs << "-Xlint:-options" // Turn off "missing" bootclasspath warning
}
}
Что compilerArgs
можно добавить для подавления этого предупреждения?
Литература:
- У меня есть ответ здесь, но ни один из них не подавляет это предупреждение: Как подавить предупреждения при компиляции библиотеки андроида с помощью Gradle?