Skip to content

Commit 2f65f5f

Browse files
committed
Provide Hooks before and after the build process
Closes #2732
1 parent 498d615 commit 2f65f5f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

arduino-core/src/processing/app/debug/Compiler.java

+10
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,11 @@ public boolean compile(boolean _verbose) throws RunnerException, PreferencesMapE
349349

350350
verbose = _verbose || PreferencesData.getBoolean("build.verbose");
351351
sketchIsCompiled = false;
352+
353+
// Hook runs at Start of Compilation
354+
if (prefs.containsKey("recipe.hooks.prebuild"))
355+
runRecipe("recipe.hooks.prebuild");
356+
352357
objectFiles = new ArrayList<File>();
353358

354359
// 0. include paths for core + all libraries
@@ -416,6 +421,11 @@ public boolean compile(boolean _verbose) throws RunnerException, PreferencesMapE
416421
}
417422

418423
progressListener.progress(90);
424+
425+
// Hook runs at End of Compilation
426+
if (prefs.containsKey("recipe.hooks.postbuild"))
427+
runRecipe("recipe.hooks.postbuild");
428+
419429
return true;
420430
}
421431

0 commit comments

Comments
 (0)