Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gradle plugin does not support Gradle 6.0 #1002

Closed
hjywyj opened this issue Nov 12, 2019 · 21 comments
Closed

Gradle plugin does not support Gradle 6.0 #1002

hjywyj opened this issue Nov 12, 2019 · 21 comments
Labels
Milestone

Comments

@hjywyj
Copy link

hjywyj commented Nov 12, 2019

Caused by: java.lang.NoSuchMethodError: org.gradle.api.tasks.TaskInputs.property(Ljava/lang/String;Ljava/lang/Object;)Lorg/gradle/api/tasks/TaskInputs;
        at org.greenrobot.greendao.gradle.Greendao3GradlePlugin.createGreendaoTask(Greendao3GradlePlugin.kt:60)
        at org.greenrobot.greendao.gradle.Greendao3GradlePlugin.access$createGreendaoTask(Greendao3GradlePlugin.kt:14)
        at org.greenrobot.greendao.gradle.Greendao3GradlePlugin$apply$1.execute(Greendao3GradlePlugin.kt:47)
        at org.greenrobot.greendao.gradle.Greendao3GradlePlugin$apply$1.execute(Greendao3GradlePlugin.kt:14)
        at org.gradle.configuration.internal.DefaultListenerBuildOperationDecorator$BuildOperationEmittingAction$1.lambda$run$0(DefaultListenerBuildOperationDecorator.java:152)
        at org.gradle.configuration.internal.DefaultUserCodeApplicationContext.reapply(DefaultUserCodeApplicationContext.java:60)
        at org.gradle.configuration.internal.DefaultListenerBuildOperationDecorator$BuildOperationEmittingAction$1.run(DefaultListenerBuildOperationDecorator.java:152)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:402)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:394)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$1.execute(DefaultBuildOperationExecutor.java:165)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:250)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:158)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:92)

@dandar3
Copy link

dandar3 commented Jan 5, 2020

The sources for org.greenrobot:greendao-gradle-plugin are not available (see #412) so we can't really help and the team is probably not working on this anymore.

@woying456
Copy link

i have the same problem.
@greenrobot @greenrobot-team

@Awen92
Copy link

Awen92 commented Jan 25, 2020

hit the same issue

@greenrobot-team
Copy link
Collaborator

Thanks for reporting! This is due to the Gradle plugin not supporting the new Tasks API. This was fixed internally, but there was no time for a release, yet.

TL;DR: the greenDAO Gradle plugin currently does not support Gradle 6.x.

@greenrobot-team greenrobot-team pinned this issue Jan 27, 2020
@greenrobot-team greenrobot-team changed the title gradle6.0 compile error Gradle plugin does not support Gradle 6.0 Jan 27, 2020
@greenrobot-team
Copy link
Collaborator

Update: I jumped to conclusions here before properly reading the stack trace. I can not verify this using a minimal example project. https://github.com/greenrobot-team/greenrobot-examples/tree/master/greendao

The TaskInputs.property(name, value) method that supposedly does not exist should exist in Gradle 6. https://docs.gradle.org/current/javadoc/org/gradle/api/tasks/TaskInputs.html#property-java.lang.String-java.lang.Object-

Does anyone have a minimal project that reproduces this issue?

Also on an unrelated note: the Android Gradle Plugin does not yet support Gradle 6.0.

@greenrobot-team
Copy link
Collaborator

Oh my, sorry again: I tested using the latest development version of the plugin. The released version 3.2.2 indeed has this issue.

So this is fixed in the internal version.

@dandar3
Copy link

dandar3 commented Jan 28, 2020

@greenrobot-team Any new Android project created with Android Studio 4.0 Canary should show the problem. The new version of Android Gradle plugin that the new AS requires supports Gradle 6, hence the problem. https://developer.android.com/studio/preview

Will try to publish a sample project to replicate the issue.

@greenrobot-team
Copy link
Collaborator

@dandar3 No need, I made a mistake and CAN actually reproduce this. It's fixed already internally, as stated originally.

@Alonexx
Copy link

Alonexx commented Feb 5, 2020

When will the fixed version be released? After I updated my project to gradle 6.0, everything works fine except greendao. I think more and more developers would encounter the same problem.

@Zhelyazko
Copy link

We are also blocked by the lack of support of gradle 6.x. Any idea when you'll be able to release the fixed version of GreenDao Gradle plugin?

@greenrobot-team greenrobot-team modified the milestones: 3.x, 3.3.0 Feb 18, 2020
@adamchodera
Copy link

@greenrobot-team Could you please publicly release version v3.3.0 listed on your website? https://greenrobot.org/greendao/changelog/

@chenguangtu
Copy link

@greenrobot-team
Could you please publicly release version v3.3.0 listed on your website? https://greenrobot.org/greendao/changelog/

@michal-luszczuk
Copy link

@greenrobot-team
Hello.
What could we do to get version 3.3.0 released?

@shashachu
Copy link

@greenrobot-team Chiming in here. Android Gradle Plugin 4.0 requires Gradle 6.0 so any app that uses GreenDAO will be blocked from upgrading AGP without the 3.3.0 release.

@G00fY2
Copy link

G00fY2 commented Apr 29, 2020

Looks like 3.3.0 is available now.

But it does still not work with Gradle 6.x. I get the same error message.

Edit: After deleting all the gradle cache several times it's finally working. Sorry for the false alarm. 😄

@dandar3
Copy link

dandar3 commented May 1, 2020

Shame, it took a bit too long for me, after waiting for 3 months I finally managed to spent a little time and move on to using Room instead. Thank you @greenrobot-team for everything all this time! 🏆:clap:

@greenrobot-team
Copy link
Collaborator

As @G00fY2 noticed, we had finally some time to do the 3.3.0 release.
https://greenrobot.org/greendao/changelog/

@slott
Copy link

slott commented May 29, 2020

@G00fY2 How did you get this to work ? I just updated and I'm still getting

org.gradle.api.tasks.TaskInputs.property(Ljava/lang/String;Ljava/lang/Object;)Lorg/gradle/api/tasks/TaskInputs;

even after deleting my cache directory...

@michal-luszczuk
Copy link

Remember that greendao consists of 2 things: plugin and library

You probably forgot about updating one of those two.

  1. Library - dependency in your app module gradle.build file
    image
  2. Pluign - dependency in your project level gradle.build.file
    image

@slott
Copy link

slott commented May 29, 2020

YES - indeed that was what I missed. Thank you so much for keeping this project alive - its an absolutely amazing library and I wouldn't know what to do without it :)

@WMcCabe8
Copy link

Upgrading to the new greendao 3.3.0 release worked for me in both of my gradle files!
Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests