Comments (9)
You could try changing your JAVA_HOME for just that terminal that is building that project. Won't impact your entire system. Still a bit of a pain, but it works.
Add scripts in your home directory to change JAVA_HOME so you can easily switch. That's what I ended up with.
from gradle-grammar-kit-plugin.
Looks like you need to run gradle with Java 11.
FYI: Idea migrated to Java 11, so there is a little sense to stay on 8
from gradle-grammar-kit-plugin.
Yeah, that was it, thanks. Forced my Java version to 11 and it builds now. Thanks!
from gradle-grammar-kit-plugin.
I am running into the same issue. I have several other projects that rely on java 8 so I'd rather not force my java version to java 11 everywhere. As specified in the gradle docs, is there a way to override the java home for the grammarkit tasks? https://docs.gradle.org/6.7/userguide/toolchains.html#integration_with_tasks_relying_on_a_java_executable_or_java_home Or is there a possibility of releasing an updated plugin here that sets the java version to java 11?
from gradle-grammar-kit-plugin.
@megantracy93 you may use previous versions of plugin and/or grammar-kit with java 8 support.
from gradle-grammar-kit-plugin.
@hurricup I am trying to upgrade my plugin to work against IntelliJ 2020.3 which requires java 11 to work: https://jetbrains.org/intellij/sdk/docs/reference_guide/api_notable/api_notable_list_2020.html#notable-changes-in-intellij-platform-20203
from gradle-grammar-kit-plugin.
Sorry, I'm not quite sure I understand what is your problem.
As I understand, you don't want to change JAVA_HOME
on your machine to use jdk11.
But you still can choose any sdk for your project and/or gradle in IDEA.
from gradle-grammar-kit-plugin.
Correct, I don't want to change my JAVA_HOME. I also would rather not have to configure it in IDEA as I prefer to run gradle commands from the terminal and I need to be able to build my plugin from a CI environment which uses a terminal as well. So, I need a way to configure the java version in the gradle configuration itself. I see the grammarkit plugin is currently configured to request java 8 - would it just be as simple as updating that to java 11 and releasing a new version with that?
from gradle-grammar-kit-plugin.
No, this only means that plugin may be used with java 8 or older.
Your problem it's more about how to configure gradle to use different java's to run, not about this plugin.
Probably this may help you: https://stackoverflow.com/questions/18487406/how-do-i-tell-gradle-to-use-specific-jdk-version
Or google :)
from gradle-grammar-kit-plugin.
Related Issues (20)
- Support Centralized Repository Declaration
- Move conventions of the task inputs to the tasks
- Unable to migrate to 2022.3 HOT 3
- Update default JFlex to 1.9.0 HOT 1
- Update default jflex to 1.9.1
- Can I specify an encoding as an argument to generate lexer?
- Republishing needed GrammarKit and IntelliJ dependencies as shadow Jar on MavenCentral
- Problem with unavailable dependencies HOT 3
- Update default JFlex to 1.9.2
- Rely on `product-info.json` when building a calsspath for tasks HOT 4
- Make `pathToParser` and `pathToPsiRoot` optional
- Plugin does not work as documented with Kotlin DSL HOT 2
- Update JFlex to latest version HOT 1
- "Could not find or load main class org.intellij.grammar.Main" after update from 2021.1.3 to 2021.2 HOT 1
- Failed to create directory property 'targetDir' HOT 2
- Could not find dev.thiagosouto:plugin:1.3.4 with `org.jetbrains.grammarkit` 2021.2.1 HOT 1
- Can I customize repositories? HOT 3
- Unable to initialize main class org.intellij.grammar.Main HOT 7
- Would it make sense to make `GenerateParserTask` and `GenerateLexerTask` outputs cacheable? HOT 5
- Gradle tasks spuriously failing when building against 2022.3 EAP due to Java 11/17 discrepancy HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gradle-grammar-kit-plugin.