Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Custom Build Chain (Technical)
APDE uses a custom build chain for running sketches. It differs from the desktop Android mode's ANT build primarily in that it uses Eclipse's compiler (ECJ) instead of the Java compiler (JAVAC). When you press the run button, this is what happens behind the scenes:
- ANTLR Preprocessor (Android mode Processing) - basically the same as the PDE
- AAPT (Android SDK) - creates R.java and bundles the resources
- ECJ (Eclipse) - compiles resulting source files and spits out errors to the console
- DX Dexer (Android SDK) - converts compiled .class files to Android's .dex (Dalvik EXecutable) files
- DX Merger (Android SDK) - merges all of the .dex files into one big .dex file
- APKBuilder (Android SDK) - creates an APK (Android Package) file from the resources and the DEX files
- ZipSigner (library) - zipaligns the APK and signs it with a debug certificate
For those interested, the build process is located in the
build() method of
com.calsignlabs.apde.build.Build.java (this isn't the cleanest code, but it's there).
Note: Libraries are dexed during the installation process to speed up build times.