Skip to content

Commit c9eb5d9

Browse files
committed
disable cache via jvm arg
1 parent ffb59ba commit c9eb5d9

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

addon.gradle

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ minecraft {
2121
if (project.debug_log_missing_lang_keys.toBoolean()) {
2222
extraRunJvmArguments.add('-Dgroovyscript.log_missing_lang_keys=true')
2323
}
24+
if (project.debug_disable_cache.toBoolean()) {
25+
extraRunJvmArguments.add('-Dgroovyscript.disable_cache=true')
26+
}
2427

2528
//extraTweakClasses << "${modGroup}.LaunchTweaker"
2629
}

gradle.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ debug_log_missing_lang_keys = true
77
debug_generate_examples = false
88
debug_generate_wiki = false
99
debug_generate_and_crash = false
10+
debug_disable_cache = false
1011

1112
# END SECTION: development environment settings
1213

src/main/java/com/cleanroommc/groovyscript/sandbox/GroovyScriptSandbox.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public class GroovyScriptSandbox extends GroovySandbox {
5454
* Setting this to true will cause the cache to be deleted before each script run.
5555
* Useful for debugging.
5656
*/
57-
public static final boolean DELETE_CACHE_ON_RUN = false;
57+
public static final boolean DELETE_CACHE_ON_RUN = Boolean.parseBoolean(System.getProperty("groovyscript.disable_cache"));;
5858

5959
private final File cacheRoot;
6060
private final File scriptRoot;

0 commit comments

Comments
 (0)