Skip to content

Commit f4048c8

Browse files
committed
Generate External Patches before build starts
1 parent 17a107e commit f4048c8

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

build.gradle

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,11 @@ task genJavadoc(type: Jar, dependsOn: javadoc) {
9090
from javadoc.destinationDir
9191
}
9292

93+
task generateExternalPatches(type: GradleBuild) {
94+
dir = 'patches'
95+
tasks = ['genPatches']
96+
}
97+
9398
task genPatches << {
9499
try {
95100
ant.copy(todir: "build/resources/main/assets/toast/patches/") {
@@ -114,6 +119,7 @@ task updateLatest << {
114119
ant.copy(file: "${jar.archivePath}", todir: "build/latest")
115120
}
116121

122+
deletePatches.dependsOn generateExternalPatches
117123
genPatches.dependsOn deletePatches
118124
compileJava.dependsOn genPatches
119125
build.finalizedBy updateLatest

src/main/java/jaci/openrio/toast/core/ToastBootstrap.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import jaci.openrio.toast.lib.log.SysLogProxy;
1212

1313
import java.io.File;
14+
import java.util.Arrays;
1415

1516
/**
1617
* The Bootstrap class for launching Toast before WPILib. This makes simulation, class patching, crash handling
@@ -88,6 +89,8 @@ public static void main(String[] args) {
8889
new GlobalBlackboard();
8990
SysLogProxy.init();
9091

92+
if (args != null && args.length > 0)
93+
toastLogger.info("Toast Started with Run Arguments: " + Arrays.toString(args));
9194
toastLogger.info("Slicing Loaf...");
9295

9396
ClassPatcher classLoader = new ClassPatcher();

0 commit comments

Comments
 (0)