typelead / gradle-eta

Gradle plugin for the Eta programming language
BSD 3-Clause "New" or "Revised" License
30 stars 7 forks source link

Cannot apply plugin #13

Closed NickSeagull closed 6 years ago

NickSeagull commented 6 years ago

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

Additional information

You can clone the project repo here

carymrobbins commented 6 years ago

@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?

rahulmutt commented 6 years ago

@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.

NickSeagull commented 6 years ago

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 :smile:

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

rahulmutt commented 6 years ago

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.

NickSeagull commented 6 years ago

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.