Build an Executable
In order to build the Executable of an Application, the SDK provides the Gradle buildExecutable task.
The prerequisites to use this task are:
The Application EntryPoint must be configured, as described in Configure a Project.
A target VEE Port that uses an Architecture version
7.17minimum must be defined. Refer to the Select a VEE Port page to know the different ways to provide a VEE Port for a module project.
Once these prerequisites are fulfilled, the Executable can be built:
By double-clicking on the buildExecutable task in the Gradle tasks view:
Warning
Android Studio does not allow to run multiple Gradle tasks in parallel. If you still want to execute several Gradle tasks simultaneously, you can launch them from a terminal with the Gradle Command Line Interface (CLI).
From the command line interface:
$ ./gradlew buildExecutable
In case of Full BSP Connection, the Executable file is generated in the build/application/executable folder of the project.
Trigger Executable Build by Default
The Executable of an Application is not built and published by default (when launching a ./gradlew build or
a ./gradlew publish for example).
This default behavior can be changed by adding the produceExecutableDuringBuild() method
in the microej configuration block of the Gradle build file of the project:
microej {
produceExecutableDuringBuild()
}
Build a Stripped Executable
It is sometimes required to provide a version of an Executable which does not embed MicroEJ and customer IPs.
The main use case is when you need to provide a Kernel Executable to Application developers.
In such a stripped version of an Executable only entry symbols and metadata required for building the .fo files are kept,
all the code sections are removed.
In SDK 6, the stripped version of an Executable is built thanks to the stripExecutable task:
./gradlew stripExecutable
Calling this task automatically build the Executable then strip it.
The two Executable files are generated in the build/application/executable folder of the project.
Trigger Stripped Executable Build by Default
The Stripped Executable of an Application is not built and published by default (when launching a ./gradlew build or
a ./gradlew publish for example).
This default behavior can be changed by adding the produceStrippedExecutableDuringBuild() method
in the microej configuration block of the Gradle build file of the project:
microej {
produceStrippedExecutableDuringBuild()
}
Enabling the generation of the Stripped Executable of an Application automatically enables the generation of the Executable (non-stripped).


