From e55b4adec165e7801aaec6db3ec3f4c1443957bb Mon Sep 17 00:00:00 2001 From: wilsonwatson Date: Fri, 26 Jul 2024 03:22:28 -0500 Subject: [PATCH] trying older verison --- build.gradle | 2 +- jitpack.yml | 4 ++-- src/main/java/org/frc5572/robotools/RobotProcessor.java | 5 +++++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index be78202..0aad622 100755 --- a/build.gradle +++ b/build.gradle @@ -42,7 +42,7 @@ task buildRustWindows(type: Exec) { } task buildRustLinux(type: Exec) { - environment 'PATH', System.getenv('PATH') + ":/home/jitpack/build/xpack-gcc-13.3.0-1/bin" + environment 'PATH', System.getenv('PATH') + ":/home/jitpack/build/xpack-gcc-11.2.0-1/bin" commandLine System.properties['user.home'] + '/.cargo/bin/cargo', 'build', '--target', 'x86_64-unknown-linux-gnu' } diff --git a/jitpack.yml b/jitpack.yml index e3d7579..bb81898 100644 --- a/jitpack.yml +++ b/jitpack.yml @@ -5,8 +5,8 @@ before_install: - sdk install java 17.0.1-open - sdk use java 17.0.1-open # GCC - - wget https://github.com/xpack-dev-tools/gcc-xpack/releases/download/v13.3.0-1/xpack-gcc-13.3.0-1-linux-x64.tar.gz - - tar xvf xpack-gcc-13.3.0-1-linux-x64.tar.gz + - wget https://github.com/xpack-dev-tools/gcc-xpack/releases/download/v11.2.0-1/xpack-gcc-11.2.0-1-linux-x64.tar.gz + - tar xvf xpack-gcc-11.2.0-1-linux-x64.tar.gz # MinGW - wget https://github.com/xpack-dev-tools/mingw-w64-gcc-xpack/releases/download/v13.3.0-1/xpack-mingw-w64-gcc-13.3.0-1-linux-x64.tar.gz - tar xvf xpack-mingw-w64-gcc-13.3.0-1-linux-x64.tar.gz diff --git a/src/main/java/org/frc5572/robotools/RobotProcessor.java b/src/main/java/org/frc5572/robotools/RobotProcessor.java index d3ab5a0..a7451ec 100644 --- a/src/main/java/org/frc5572/robotools/RobotProcessor.java +++ b/src/main/java/org/frc5572/robotools/RobotProcessor.java @@ -17,10 +17,13 @@ import javax.lang.model.element.ModuleElement; import javax.lang.model.element.PackageElement; import javax.lang.model.element.TypeElement; +import javax.tools.JavaFileManager; +import javax.tools.StandardLocation; import org.apache.commons.lang3.SystemUtils; import com.sun.source.util.Trees; +import com.sun.tools.javac.file.Locations; /** * Annotation processor for checks. Used by VS Code. @@ -73,6 +76,8 @@ public boolean process(Set arg0, RoundEnvironment roundEn p = p.getParent().getParent().getParent().getParent(); String generated = run(p.toString()); try { + var raw = processingEnv.getFiler().getResource(StandardLocation.ANNOTATION_PROCESSOR_PATH, "", "test.txt"); + var file = processingEnv.getFiler().createSourceFile("org.frc5572.Generated"); try(var writer = file.openWriter()) { writer.write(generated);