What are you trying to accomplish with the GString notation (the $
in strings like "\"$adsenseTagFree\""
)? That's what's confusing it -- in my test project, if I remove the $
, it acts normally. It would take some research to figure out exactly what's going on, but I know it's happening at the Gradle level, not the Android Studio level, because running gradlew tasks
from the command line reveals the same bogus task names. I suspect it has something to do with exactly when that GString gets expanded in the buildfile evaluation/execution process.
If you don't need the $
notation, then just remove it; if you do, then provide more details on what you're trying to accomplish with it.