Skip to content

Commit

Permalink
disable cache via jvm arg
Browse files Browse the repository at this point in the history
  • Loading branch information
brachy84 committed Dec 8, 2024
1 parent ffb59ba commit c9eb5d9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions addon.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ minecraft {
if (project.debug_log_missing_lang_keys.toBoolean()) {
extraRunJvmArguments.add('-Dgroovyscript.log_missing_lang_keys=true')
}
if (project.debug_disable_cache.toBoolean()) {
extraRunJvmArguments.add('-Dgroovyscript.disable_cache=true')
}

//extraTweakClasses << "${modGroup}.LaunchTweaker"
}
Expand Down
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ debug_log_missing_lang_keys = true
debug_generate_examples = false
debug_generate_wiki = false
debug_generate_and_crash = false
debug_disable_cache = false

# END SECTION: development environment settings

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public class GroovyScriptSandbox extends GroovySandbox {
* Setting this to true will cause the cache to be deleted before each script run.
* Useful for debugging.
*/
public static final boolean DELETE_CACHE_ON_RUN = false;
public static final boolean DELETE_CACHE_ON_RUN = Boolean.parseBoolean(System.getProperty("groovyscript.disable_cache"));;

private final File cacheRoot;
private final File scriptRoot;
Expand Down

0 comments on commit c9eb5d9

Please sign in to comment.