redex-plugin
redex-plugin copied to clipboard
Doesn’t work with the latest Android Gradle plugin (3.0.0-beta6)
The plugin queries an output location folder that is not available anymore:
Caused by: java.lang.NoSuchMethodError: com.android.build.gradle.api.ApplicationVariant.getOutputs()Ljava/util/List;
at au.com.timmutton.redexplugin.RedexTask.initialise(RedexTask.kt:44)
at au.com.timmutton.redexplugin.RedexPlugin$apply$1.execute(RedexPlugin.kt:25)
at au.com.timmutton.redexplugin.RedexPlugin$apply$1.execute(RedexPlugin.kt:9)
I've started doing some work on supporting 3.x in feature/build-tools-3, however I'll need to set up a demo project using the new tools to verify. it doesnt look like the new build tools are backwards compatible, which means I'd likely wait until it is properly released before updating the redex plugin
Looks like the dexcount plugin supports this by getting the build tools version number and using a different provider, as shown at https://github.com/KeepSafe/dexcount-gradle-plugin/blob/master/src/main/kotlin/com/getkeepsafe/dexcount/Plugin.kt
We could do something similar to achieve the same results
Any news about this? I am hit by this, too.
I'm facing the exact same issue here... I'm on final version 3.1.2 already. Is there any news @timmutton on when we can expect an update?
@dirkvranckaert I got halfway through re-writing the plugin to support both, but then life got in the way and I lost the code. I also ended up re-evaluating the need for redex, as it didnt provide much of a tangible benefit for projects that were already proguarded, and when youre average ios app is 100mb nobody particularly cares about shaving a couple hundred kb off a 7mb android app. Id recommend trying to build the version I mentioned above, and if it works fork the project and make that the main version, as the old version of android gradle is pretty old now