redex-plugin icon indicating copy to clipboard operation
redex-plugin copied to clipboard

Doesn’t work with the latest Android Gradle plugin (3.0.0-beta6)

Open justjanne opened this issue 8 years ago • 5 comments

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)

justjanne avatar Sep 29 '17 15:09 justjanne

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

timmutton avatar Oct 04 '17 00:10 timmutton

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

timmutton avatar Oct 10 '17 23:10 timmutton

Any news about this? I am hit by this, too.

timri avatar Jan 18 '18 15:01 timri

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 avatar Sep 20 '18 10:09 dirkvranckaert

@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

timmutton avatar Sep 23 '18 11:09 timmutton