Closed OleksandrKucherenko closed 7 years ago
The problem here is that although the plugin does use properties provided by assembleDebug.output
, the value is used only once when spoon tasks are created. And it happens before your code that changes file names is executed.
IMHO, it's a general problem with Gradle scripts and plugins, and, if memory serves, it should be resolved in upcoming Gradle releases.
You might try moving apply plugin:'spoon'
instruction and place it below your own code. In such case spoon plugin should be using values that have already been changed. And probably you will be able to remove the workaround with that copy task.
The issue and workaround in one place:
Explained: 1) first part of the gradle script force custom names of the APK file 2) second part declare a custom task that executed after "assembleDebug" and recover the "expected by Sppon plugin" apk file name.
What's wrong: