1
0
mirror of https://github.com/arduino/Arduino.git synced 2025-01-29 18:52:13 +01:00

Provide Hooks before and after the build process

Closes #2732
This commit is contained in:
Richard Wackerbarth 2015-03-06 16:16:04 -06:00
parent 498d615fb8
commit 2f65f5fdc1

View File

@ -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<File>();
// 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;
}