Module Natures

This page describes the most common module natures as follows:

  • Plugin Name: the build type name, derived from the module nature name: com.microej.gradle.[NATURE_NAME].
  • Documentation: a link to the documentation.
  • Tasks: tasks available from the module nature, with the graph of their relationships.
  • Configuration: properties that can be defined to configure the module. Properties are defined inside the microej block of the build.gradle.kts file.

Add-On Library

Plugin Name: com.microej.gradle.addon-library

Documentation: Libraries

Tasks:

This plugin adds the following tasks to your project:

digraph mygraph {
    rankdir="RL";
    bgcolor="transparent"
    fontname="Helvetica,Arial,sans-serif"
    node [
        shape = box
        width = 1.5
        color = "#7dc5dc"
        style = filled
        fontname="Helvetica,Arial,sans-serif"
    ]
    edge [fontname="Helvetica,Arial,sans-serif"]
    "adp" [fillcolor = "#f76241"]
    "checkModule" [fillcolor = "#f76241"]
    "loadVee" [fillcolor = "#f76241"]
    "loadApplicationConfiguration" [fillcolor = "#f76241"]
    "loadTestApplicationConfiguration" [fillcolor = "#f76241"]
    "runOnSimulator" [fillcolor = "#f76241"]
    "build" -> "check"
    "check" -> "test"
    "test" -> "classes"
    "test" -> "testClasses"
    "test" -> "loadTestApplicationConfiguration"
    "testClasses" -> "compileTestJava"
    "testClasses" -> "processTestResources"
    "loadTestApplicationConfiguration" -> "loadVee"
    "processResources" -> "adp"
    "processTestResources" -> "adp"
    "processTestResources" -> "classes"
    "compileTestJava" -> "classes"
    "javadoc" -> "classes"
    "classes" -> "compileJava"
    "classes" -> "processResources"
    "build" -> "assemble"
    "assemble" -> "jar"
    "uploadArchives" -> "jar"
    "jar" -> "classes"
    "runOnSimulator" -> "classes"
    "runOnSimulator" -> "loadApplicationConfiguration"
    "loadApplicationConfiguration" -> "loadVee"
    "checkModule" -> "assemble"
    "check" -> "checkModule"

    subgraph cluster_legend {
        label="Legend";
        microej [fillcolor="#f76241" label="MicroEJ task"];
        java [fillcolor="#7dc5dc" label="Java plugin or Base plugin task"];
        microej -> java [style=invis];
        java -> microej [style=invis];
    }
}

Configuration:

This module nature inherits from the configuration of all its tasks.

J2SE Library

Plugin Name: com.microej.gradle.j2se-library

Tasks:

This plugin adds the following tasks to your project:

digraph mygraph {
    rankdir="RL";
    bgcolor="transparent"
    fontname="Helvetica,Arial,sans-serif"
    node [
        shape = box
        width = 1.5
        color = "#7dc5dc"
        style = filled
        fontname="Helvetica,Arial,sans-serif"
    ]
    edge [fontname="Helvetica,Arial,sans-serif"]
    "checkModule" [fillcolor = "#f76241"]
    "build" -> "check"
    "check" -> "test"
    "test" -> "classes"
    "test" -> "testClasses"
    "testClasses" -> "compileTestJava"
    "testClasses" -> "processTestResources"
    "processTestResources" -> "classes"
    "compileTestJava" -> "classes"
    "javadoc" -> "classes"
    "classes" -> "compileJava"
    "classes" -> "processResources"
    "build" -> "assemble"
    "assemble" -> "jar"
    "uploadArchives" -> "jar"
    "jar" -> "classes"
    "checkModule" -> "assemble"

    subgraph cluster_legend {
        label="Legend";
        microej [fillcolor="#f76241" label="MicroEJ task"];
        java [fillcolor="#7dc5dc" label="Java plugin or Base plugin task"];
        microej -> java [style=invis];
        java -> microej [style=invis];
    }
}

Configuration:

This module nature inherits from the configuration of all its tasks.

Tasks

This page describes the module nature tasks as follows:

  • Description: description and link to the related documentation.
  • Module Natures: list of Module Natures using this task.
  • Configuration: properties that can be defined to configure the task.

adp

Description: Executes the Addon Processors.

Inputs:

  • The project directory

Outputs:

  • The directory for each ADP output type (build/adp/all/main/java, build/adp/all/main/resources, build/adp/all/test/java, build/adp/all/test/resources)

Module Natures:

This task is used by the following module natures:

loadVee

Description: Loads the VEE.

Inputs:

  • The list of VEE archive files or folders.

Outputs:

  • The directory where the VEE is copied/extracted (build/vee)

Module Natures:

This task is used by the following module natures:

loadApplicationConfiguration

Description: Loads the configuration for the Application to execute.

Inputs:

  • The extracted VEE Port folder
  • The project classpath which contains the MicroEJ dependent application classes and resources
  • The Full Qualified Name of the Application main class
  • The folder containing the application configuration (configuration)
  • The System properties
  • The debug mode
  • The debug port

Outputs:

  • The configuration file with all the properties set to launch the application (build/properties/target.properties)

Module Natures:

This task is used by the following module natures:

Configuration:

This task provides the following properties that can be defined in the microej extension:

Name Description Default
applicationMainClass Full Qualified Name of the main class of the application. This option is required. Not set

For example:

microej {
  applicationMainClass = "com.company.Main"
}

runOnSimulator

Description: Executes the Application with the Simulator.

Inputs:

  • The extracted VEE Port folder
  • The configuration file with all the properties set to launch the application (build/properties/target.properties)

Module Natures:

This task is used by the following module natures:

loadTestApplicationConfiguration

Description: Loads the configuration for the Test Application to execute.

Inputs:

  • The extracted VEE Port folder

Outputs:

  • The directory containing the configuration file with all the properties set to launch the test application (build/testsuite/properties/)

Module Natures:

This task is used by the following module natures:

checkModule

Description: Checks the compliance of the module.

Inputs:

  • The list of the checkers to execute, separated by comas. If not set, all the checkers are executed.
  • The list of the checkers to skip, separated by comas.

Module Natures:

This task is used by the following module natures:

Configuration:

This task is not bound by default on any lifecycle task, which means that it should be called explicitly if it must be executed.

This task provides the following properties that can be defined in the microej extension:

Name Description Default
checkers Comma-separated list of the names of the checkers to execute. An empty list means that all checkers are executed. ""
skippedCheckers Comma-separated list of the names of the checkers to exclude. Only one property of checkers and skippedCheckers can be defined. ""

For example:

microej {
  checkers = "readme,license"
}

loadExecutableConfiguration

Description: Loads the configuration to build the Executable of an Application.

Inputs:

  • The extracted VEE Port folder
  • The project classpath which contains the MicroEJ dependent application classes and resources
  • The Full Qualified Name of the Application main class
  • The folder containing the application configuration (configuration)

Outputs:

  • The configuration file with all the properties set to launch the build of the Executable (build/properties/target.properties)

Module Natures:

This task is used by the following module natures:

buildExecutable

Description: Builds the Executable of an Application.

Inputs:

  • The extracted VEE Port folder
  • The configuration file with all the properties set to launch the build of the Executable (build/properties/target.properties)
  • The project build classpath

Outputs:

  • The directory in which the Executable file and the build files are generated (build/executable/application)
  • The Zip file containing the generated build files (build/executable/buildFiles.zip)

Module Natures:

This task is used by the following module natures:

buildWPK

Description: Builds the WPK of the Application.

Inputs:

  • The Application name
  • The Application version
  • The Full Qualified Name of the Application main class
  • The Application JAR file
  • The Application Javadoc
  • The Jar files of the Application classpath
  • The folder containing the application configuration (configuration)

Outputs:

  • The WPK of the Application (build/libs/<application_name>.wpk)

Module Natures:

This task is used by the following module natures:

buildVirtualDevice

Inputs:

  • The extracted VEE Port folder
  • The WPK of the Application
  • The project build classpath
  • The WPK of the Applications that must be pre-installed in the Virtual Device

Outputs:

  • The Zip file of the Virtual Device (build/libs/<application_name>-virtualDevice.zip)

Description: Build the Virtual Device of an Application.

Module Natures:

This task is used by the following module natures:

loadKernelExecutable

Description: Loads the Kernel Executable file.

Inputs:

  • The list of Kernel Executable files.

Outputs:

  • The loaded Kernel Executable file is copied (build/kernelExecutable/kernel.out)

Module Natures:

This task is used by the following module natures:

loadFeatureConfiguration

Description: Loads the configuration to build the Feature file of an Application.

Inputs:

  • The Kernel Virtual Device
  • The folder containing the Kernel Executable file (build/kernelExecutable)
  • The project classpath
  • The path of the folder where the Feature file must be generated (build/feature)

Outputs:

  • The configuration file with all the properties set to launch the build of the Feature file (build/properties/target.properties)

Module Natures:

This task is used by the following module natures:

buildFeature

Description: Build the Feature file of an Application.

Inputs:

  • The Kernel Virtual Device
  • The folder containing the Kernel Executable file (build/kernelExecutable)
  • The project classpath

Outputs:

  • The folder in which the Feature file is generated (build/feature)

Module Natures:

This task is used by the following module natures:

runOnDevice

Description: Runs the Executable on a Device.

Inputs:

  • The extracted VEE Port folder
  • The folder containing the Executable file (build/executable/application)
  • The configuration file with all the properties set to launch the build of the Executable (build/properties/target.properties)

Module Natures:

This task is used by the following module natures:

Global Properties

The following properties are available in any module:

Name Description Default
microejConflictResolutionRulesEnabled Boolean to enabled or disabled the MicroEJ conflict resolution rules. true

For example:

microej {
  microejConflictResolutionRulesEnabled = false
}