Status Update
Comments
am...@google.com <am...@google.com>
hm...@google.com <hm...@google.com> #2
ey...@gmail.com <ey...@gmail.com> #3
Could you please attach a sample project that shows this issue? Or please explain where and how the resource is defined and referenced.
hm...@google.com <hm...@google.com> #4
Sample project is linked in #1, along with a repro step. Is anything still missing?
ey...@gmail.com <ey...@gmail.com> #5
ey...@gmail.com <ey...@gmail.com> #7
I understand that this is an old issue and I am just starting to investigate this. Is this still a problem?
ni...@hinge.co <ni...@hinge.co> #8
ni...@hinge.co <ni...@hinge.co> #10
Thanks! Until then I have a workaround. You can put this in your root build script:
val loggerFactory: ILoggerFactory = LoggerFactory.getILoggerFactory()
val addNoOpLogger: Method = loggerFactory.javaClass.getDeclaredMethod("addNoOpLogger", String::class.java)
addNoOpLogger.isAccessible = true
addNoOpLogger.invoke(loggerFactory, "com.android.build.api.component.impl.MutableListBackedUpWithListProperty")
addNoOpLogger.invoke(loggerFactory, "com.android.build.api.component.impl.MutableMapBackedUpWithMapProperty")
pa...@gmail.com <pa...@gmail.com> #11
Amazing #10, thank you for denoising my build :)
Quite sad it didn't make AGP 7.4.
Tip for anyone using the above workaround, you can remind yourself to remove it at the right time:
if (com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.startsWith("7.")) {
// ... workaround
} else {
error("AGP major version changed, review hack.")
}
ma...@gmail.com <ma...@gmail.com> #12
pa...@gmail.com <pa...@gmail.com> #13
Groovy doesn't care much about visibility and stuff, so you can just call the method (all hail dynamic languages! 😅):
if (com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.startsWith("7.")) {
org.slf4j.LoggerFactory.getILoggerFactory().addNoOpLogger("com.android.build.api.component.impl.MutableListBackedUpWithListProperty")
org.slf4j.LoggerFactory.getILoggerFactory().addNoOpLogger("com.android.build.api.component.impl.MutableMapBackedUpWithMapProperty")
} else {
throw new Exception("AGP major version changed, review hack.")
}
xa...@google.com <xa...@google.com> #14
Hakan, how risky is the fix that removes the excessive logging (I'm guessing not a lot)? It seems like it could be a good candidate for 7.4.2.
Jerome, what do you think?
je...@google.com <je...@google.com> #15
yes, it's fine to remove it.
hm...@google.com <hm...@google.com> #16
This is should be a fairly easy and risk-free change to cherry pick in 7.4.2. I will get on it.
Description
After updating from 7.4 Alpha 10 to Beta 1, the following starts getting printed when running Gradle:
I don't use
AnnotationProcessorOptions.arguments
anywhere in my build code.