evant / gradle-retrolambda

A gradle plugin for getting java lambda support in java 6, 7 and android
Apache License 2.0
5.3k stars 449 forks source link

Not compatible with Gradle 5.1 #274

Closed jcayzac closed 5 years ago

jcayzac commented 5 years ago

The plugin fails when it's invoked by Gradle 5.1:

java.lang.NoSuchMethodError: org.gradle.api.tasks.compile.CompileOptions.getBootClasspath()Ljava/lang/String;
        at me.tatarka.RetrolambdaTransform.getClasspath(RetrolambdaTransform.groovy:126)
evant commented 5 years ago

It has been renamed to getBootstrapClasspath()

naixx commented 5 years ago

Any chance that will be fixed? Or any direction to investigate? I tried to change the property at RetrolambdaTransform.groovy#L126 but no luck

evant commented 5 years ago

@naixx pull requests are welcome, changing that line you gave should be the solution. In what way is it not working? Note: you'll probably have to bump the gradle wrapper version the project is using to 5.0

jcayzac commented 5 years ago

Not sure, but this might relate to https://docs.gradle.org/current/userguide/task_configuration_avoidance.html

Specifically, now you probably need to grab the compile provider…

daniebruwer commented 5 years ago

I'm also having the same issue. Is the solution to fork? Is there a newer version than 3.7.0 that avoids this? classpath 'com.android.tools.build:gradle:3.5.0-alpha07' distributionUrl=https\://services.gradle.org/distributions/gradle-5.3-all.zip

evant commented 5 years ago

Released version 3.7.1 which should be compatible with gradle 5+

jcayzac commented 5 years ago

Thanks!