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

Document how to fix "compiled for target 1.7" error #11

Closed
manuel-mauky opened this issue Sep 29, 2016 · 1 comment
Closed

Document how to fix "compiled for target 1.7" error #11

manuel-mauky opened this issue Sep 29, 2016 · 1 comment

Comments

@manuel-mauky
Copy link

When running a small build script like this:

plugins {
    id "org.frege-lang" version "0.8"
}

apply plugin: "java"

dependencies {
    compile "org.frege-lang:frege:3.22.367-g2737683"
    compile "org.frege-lang:fregefx:0.3.1"
}

I get compile errors like this:

E <PATH>/examples/fregefx/src/main/frege/example/fregefx/HelloFrege.fr:7: cannot import fregefx.JavaFxUtils
    compiled for target  1.7 (without lambda support)
    when the current target  1.8 has lambda support
    Try to use compiler option -target 1.7
example.fregefx.HelloFrege: build failed because of compilation errors.

While the error somehow points out what's wrong, I had a hard time finding out how to solve this issue. It seems that there are other users too that have the same error, see Frege/frege#275.

To fix this I've changed my build file like this:

plugins {
    id "org.frege-lang" version "0.8"
}

apply plugin: "java"

compileFrege {
    target = 1.7
}
compileTestFrege {
    target = 1.7
}

dependencies {
    compile "org.frege-lang:frege:3.22.367-g2737683"
    compile "org.frege-lang:fregefx:0.3.1"
}

To lower the hurdle for new users it would be super if this would be documented in the README file.

@manuel-mauky manuel-mauky changed the title Document how to use latest frege version with java 8 project Document how to fix "compiled for target 1.7" error Sep 29, 2016
@manuel-mauky
Copy link
Author

Sorry, wrong repository. This issue belongs to https://github.com/Frege/frege-gradle-plugin

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

No branches or pull requests

1 participant