I've been upgrading some of our projects to latest java, grails, gradle versions... and migrating from eclipse to intellij idea.
Everything is almost fine, until I tried to run some of our projects that work using OSGI eclipse RCP plugin. We've made a gradle task that make it work even from command line, but it won't work on intellij.
As it turns out, our RCP packages only work on 32-bit java... and even a 32-bit is on our JAVA_HOME, and on project-level SDK... IntelliJ insists on using their own Java for Gradle Tasks.
"1.8.0_152-release (JetBrains s.r.o 25.152-b12)"
I tried changing settings on "Preferences -> Build, Execution, Deployment -> Build Tools -> Gradle" as many people say there should be a "Use local gradle distribution" option... but the Project-level settings are completely empty.
What I've also tried is importing my project as a Gradle project using my gradle distribution, which works, but completely screws up the project definition(my projects are treated as compound projects)... and create bunch of folders with numbers on the main project folder.
What I've tried, lastly, is to manually set JAVA_HOME to JVM and environment variables directly on the run configuration. All to no avail.
Is there any way to change my current projects (created using 'gradle idea' command) to use a local gradle distribution, or, at least force intellij use the project SDK for Gradle Tasks? I found out that IntelliJ is quite configuration lacking compared to eclipse.
I know this question is boring as it is all text... but couldn't do it any other way.