From 2f65f5fdc1a42cc8dc69487ee5db8879faf4ca9f Mon Sep 17 00:00:00 2001 From: Richard Wackerbarth Date: Fri, 6 Mar 2015 16:16:04 -0600 Subject: [PATCH] Provide Hooks before and after the build process Closes #2732 --- arduino-core/src/processing/app/debug/Compiler.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/arduino-core/src/processing/app/debug/Compiler.java b/arduino-core/src/processing/app/debug/Compiler.java index 8364673d1..9d8790b27 100644 --- a/arduino-core/src/processing/app/debug/Compiler.java +++ b/arduino-core/src/processing/app/debug/Compiler.java @@ -349,6 +349,11 @@ public class Compiler implements MessageConsumer { verbose = _verbose || PreferencesData.getBoolean("build.verbose"); sketchIsCompiled = false; + + // Hook runs at Start of Compilation + if (prefs.containsKey("recipe.hooks.prebuild")) + runRecipe("recipe.hooks.prebuild"); + objectFiles = new ArrayList(); // 0. include paths for core + all libraries @@ -416,6 +421,11 @@ public class Compiler implements MessageConsumer { } progressListener.progress(90); + + // Hook runs at End of Compilation + if (prefs.containsKey("recipe.hooks.postbuild")) + runRecipe("recipe.hooks.postbuild"); + return true; }