From 982483f178de845f6aa02f0fccefd2f0290f288c Mon Sep 17 00:00:00 2001 From: Anuken Date: Sun, 20 Oct 2019 17:05:23 -0400 Subject: [PATCH] Merged #812 --- .../java/io/anuke/annotations/AssetsAnnotationProcessor.java | 5 +---- build.gradle | 4 +++- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/annotations/src/main/java/io/anuke/annotations/AssetsAnnotationProcessor.java b/annotations/src/main/java/io/anuke/annotations/AssetsAnnotationProcessor.java index 0eb1ce32d4..58b15c0b84 100644 --- a/annotations/src/main/java/io/anuke/annotations/AssetsAnnotationProcessor.java +++ b/annotations/src/main/java/io/anuke/annotations/AssetsAnnotationProcessor.java @@ -34,10 +34,7 @@ public class AssetsAnnotationProcessor extends AbstractProcessor{ if(round++ != 0) return false; //only process 1 round try{ - path = Paths.get(Utils.filer.createResource(StandardLocation.CLASS_OUTPUT, "no", "no") - .toUri().toURL().toString().substring(System.getProperty("os.name").contains("Windows") ? 6 : "file:".length())) - .getParent().getParent().getParent().getParent().getParent().getParent().toString(); - path = path.replace("%20", " "); + path = System.getProperty("corePath"); processSounds("Sounds", path + "/assets/sounds", "io.anuke.arc.audio.Sound"); processSounds("Musics", path + "/assets/music", "io.anuke.arc.audio.Music"); diff --git a/build.gradle b/build.gradle index 1aaf194da3..507c075927 100644 --- a/build.gradle +++ b/build.gradle @@ -194,12 +194,14 @@ project(":core"){ apply plugin: "java" task preGen{ - outputs.upToDateWhen{ false } + outputs.upToDateWhen{ false } generateLocales() writeVersion() } dependencies{ + System.properties["corePath"] = file(".").toString() + if(System.properties["user.name"] == "anuke"){ task cleanGen{ doFirst{