typelead/gradle-eta

Cannot apply plugin

NickSeagull opened this issue · 5 comments

Description

I've just created a new Gradle Java project using IntelliJ IDEA and added what is requested in the README to the build.gradle file.

I also installed gradle-eta following the steps in the README.

Error

λ ~/Development/Personal/eta-ws/ master* ./gradlew
FAILURE: Build failed with an exception.
* Where:
Build file '/home/nick/Development/Personal/eta-ws/build.gradle' line: 15
* What went wrong:
A problem occurred evaluating root project 'eta-ws'.
> Failed to apply plugin [class 'com.typelead.gradle.eta.plugins.EtaBasePlugin']
   > Could not generate a proxy class for class com.typelead.gradle.eta.api.EtaExtension.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED in 0s

System

  • OS: Archlinux
  • Etlas version: 1.3.0.0
  • Eta version: 0.7.1b1

Additional information

You can clone the project repo here

@NickSeagull It looks like you are depending on a locally installed gradle-eta; if so, follow the steps in the readme to do so, e.g. ./gradlew publishToMavenLocal

@rahulmutt Has this plugin been deployed to the Gradle Plugins Repo?

@NickSeagull Can you provide the stacktrace in a Gist? (./gradlew --stacktrace)

@carymrobbins Not yet. Resolving the last few bugs before doing a release. As you said, publishToMavenLocal needs to be done. I've updated README in gradle-eta to provide all those instructions.

Looks like the problem in my case is with ./gradlew. Running a gradle build (with the Gradle that is installed globally) works.

Here you have the stacktrace 😄

This is quite an issue, as IntelliJ defaults to ./gradlew instead of gradle.

Here's the problem:

Caused by: java.lang.NoClassDefFoundError: org/gradle/api/provider/Property

That's a Gradle 4.3+ api. Update your wrapper with ./gradlew wrapper --gradle-version 4.3.

If this becomes a serious problem, I can see if I can make a backwards compatible version of the Property class.

I've just updated the Gradle Wrapper to this configuration distributionUrl=https\://services.gradle.org/distributions/gradle-4.5-all.zip and it works properly, maybe we can add that Gradle 4.3+ is required to the README?

I think that backwards compatibility is not an issue here.