jiakuan / gwt-gradle-plugin

Gradle plugin to support GWT related tasks.
https://gwt-gradle.docstr.org
Other
63 stars 34 forks source link

Use Java system properties like java.io.tmpdir #34

Closed MarkMcCallTR closed 3 years ago

MarkMcCallTR commented 4 years ago

I have not figured out a way to get the plugin to use System properties that I manually set like java.io.tmpdir. I have tried the following:

Option 1 System.setProperty('java.io.tmpdir', "c:/mytempdir") // called at top of build.gradle

Option 2 tasks.withType(org.wisepersist.gradle.plugins.gwt.GwtCompile) { System.setProperty('java.io.tmpdir', "c:/mytempdir") }

It continues to use the default system level tmp directory C:\Users\myuser\AppData\Local\Temp. I don't want to set this value system wide, and only want to set it when executing this gradle script.

Is there another way or does the plugin not support that?

jiakuan commented 4 years ago

Just enabled configuration for extra JVM arguments. Could you please try the following?

plugins {
  id "org.wisepersist.gwt" version "1.1.7-rc"
}

// ...

gwt {
    extraJvmArgs = ["-Djava.io.tmpdir=c:/mytempdir"]
}
MarkMcCallTR commented 4 years ago

that version of the plugin does not work. I get the error "Error: Could not find or load main class []". 1.1.6 and prior run without issue.

Plugin declaration:

plugins { id "org.wisepersist.gwt" version "1.1.7-rc" }

jiakuan commented 3 years ago

Fixed. Also tested the extraJvmArgs property in examples/compile-only/build.gradle.

gwt {
  extraJvmArgs = ["-Djava.io.tmpdir=${userHome}/Desktop/temp"]
}

Please try with:

plugins { id "org.wisepersist.gwt" version "1.1.8" }