enonic/app-features

This app does not build with Java 11

Closed this issue · 9 comments

Got this error:

~/app-features$ gradle build
Starting a Gradle Daemon (subsequent builds will be faster)

FAILURE: Build failed with an exception.

  • What went wrong:
    Could not create service of type ScriptPluginFactory using BuildScopeServices.createScriptPluginFactory().

Could not create service of type PluginResolutionStrategyInternal using BuildScopeServices.createPluginResolutionStrategy().

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 2s

Did you make sure $JAVA_HOME points to correct java installation? It builds fine here.

That seems strange, here is what happens for me:

~/app-features$ ./gradlew build
Downloading https://services.gradle.org/distributions/gradle-4.1-bin.zip
................................................................
Unzipping /Users/tsi/.gradle/wrapper/dists/gradle-4.1-bin/c3kp51zwwt108wc78u68yt7vs/gradle-4.1-bin.zip to /Users/tsi/.gradle/wrapper/dists/gradle-4.1-bin/c3kp51zwwt108wc78u68yt7vs
Set executable permissions for: /Users/tsi/.gradle/wrapper/dists/gradle-4.1-bin/c3kp51zwwt108wc78u68yt7vs/gradle-4.1/bin/gradle

FAILURE: Build failed with an exception.

  • What went wrong:
    Could not determine java version from '11.0.1'.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

  • Get more help at https://help.gradle.org

Are you sure you're on the master branch and you pulled the latest? Gradle wrapper in app-features has been upgraded to 4.10.2 a long time ago

https://github.com/enonic/app-features/blob/master/gradle/wrapper/gradle-wrapper.properties

Then, i did brew upgrade gradle, and got version 5.1.1, which also fails:
Welcome to Gradle 5.1.1!

Here are the highlights of this release:

  • Control which dependencies can be retrieved from which repositories
  • Production-ready configuration avoidance APIs

For more details see https://docs.gradle.org/5.1.1/release-notes.html

Starting a Gradle Daemon (subsequent builds will be faster)

FAILURE: Build failed with an exception.

  • Where:
    Build file '/Users/tsi/app-features/build.gradle' line: 4

  • What went wrong:
    An exception occurred applying plugin request [id: 'com.enonic.xp.app', version: '1.1.0']

Failed to apply plugin [class 'com.enonic.gradle.xp.BasePlugin']
Could not create an instance of type com.enonic.gradle.xp.XpExtension_Decorated.
> org.gradle.api.Project.property(Ljava/lang/Class;)Lorg/gradle/api/provider/PropertyState;

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 19s

So, have no idea how this works for you?

Are you sure you're on the master branch and you pulled the latest? Gradle wrapper in app-features has been upgraded to 4.10.2 a long time ago

https://github.com/enonic/app-features/blob/master/gradle/wrapper/gradle-wrapper.properties

~/app-features$ git status
On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean
~/app-features$

So, have no idea how this works for you?

Because I'm not on Gradle 5? Try building with the included wrapper.

Look at the earlier posts.

Upgraded gradle wrapper to 4.10.3