Closed autonomousapps closed 5 years ago
I would be willing to take a look at creating a PR for this, but I don't even know where to start with respect to finding the root cause. Any pointers?
@autonomousapps I guess I would search the code for debug log messages and see ones that are logging files. I'm pretty sure there are a few in the GroovyAndroidPlugin
. The easiest way to test would be to create something in the GroovyAndroidPluginSpec
that replicates the issue, that way you can attach the debugger.
Ok, I'm thinking it's basically
log.debug('groovy sources for {}: {}', variantName, groovyTask.source.files)
// or
log.debug('Groovy classpath: {}', groovyTask.classpath.files)
Cool, definitely
log.debug('Groovy classpath: {}', groovyTask.classpath.files)
I have a test case that proves my change passes. Will probably submit PR tomorrow.
What kind of issue is this?
I have a reproducible sample project, with instructions, here. To summarize it,
./gradlew :app:assembleDebug
succeeds, but./gradlew clean && ./gradlew :app:assembleDebug --debug
fails with a weird error. Even though I'm only requesting thedebug
variant, the plugin is trying to resolve thedebugUnitTest
variant, which it should not be doing.When I asked someone at Gradle about it (thinking it a Gradle bug due to the
--debug
connection), they said:Any ideas on where this is coming from?