Migration Notes
Note
When updating the plugin version, it is recommended to perform a clean on your project(s).
For multi-projects, run the clean command on the root project.
From 1.3.1 to 1.4.0
The plugin com.microej.gradle.addon-library has been renamed to com.microej.gradle.library.
The previous name is still supported but it is deprecated and will be removed in the next major version.
It is recommended to update your project now.
From 1.0.0 to 1.1.0
The following plugins have been removed:
plugin
com.microej.gradle.j2se-library, replaced bycom.microej.gradle.jse-library.plugin
com.microej.gradle.runtime-api, replaced bycom.microej.gradle.runtime-environment.
From 0.19.0 to 0.20.0
This section applies if SDK 6 0.20.0 is used on a project that was created using SDK 6 0.19.0
or lower.
Minimum Gradle version
The minimum required version of Gradle is now 8.6..
Upgrade the Gradle Wrapper version of your project.
New SDK EULA
A new SDK EULA must be approved before using the SDK (version 3.1-C).
Refer to SDK EULA Acceptation page to learn how to approve it.
Plugins and Configurations renaming
The following plugins and configurations have been renamed:
plugin
com.microej.gradle.j2se-librarytocom.microej.gradle.jse-library.plugin
com.microej.gradle.runtime-apitocom.microej.gradle.runtime-environment.configuration
microejRuntimeApitomicroejRuntimeEnvironment.
The previous plugins and configurations are still supported but are deprecated and will be removed in the next major version. It is recommended to update your project now.
Virtual Device Build
The Virtual Device of an Application is not built by default anymore when calling the build task.
You can call the buildVirtualDevice task to build it,
or add the following code in your build.gradle.kts file to continue to build it when calling the build task:
microej {
produceVirtualDeviceDuringBuild()
}
From 0.15.0 to 0.16.0
This section applies if SDK 6 0.16.0 is used on a project that was created using SDK 6 0.15.0
or lower.
Unification of Application EntryPoint
The creation of a Sandboxed Application and a Standalone Application have been unified. To create an Application, the following steps must be done:
Create the Java main class in the
src/main/javafolder.Define the property
applicationEntryPointin themicroejconfiguration block of thebuild.gradle.ktsfile. It must be set to the Full Qualified Name of the Application main class:microej { applicationEntryPoint = "com.mycompany.Main" }
Define a VEE (VEE Port or Kernel) by declaring a dependency in the
build.gradle.ktsfile:dependencies { microejVee("com.mycompany:myVee:1.0.0") }
If your Application requires the use of advanced features, you must create a Feature class, for example:
package com.mycompany;
import ej.kf.FeatureEntryPoint;
public class MyFeature implements FeatureEntryPoint {
@Override
public void start() {
System.out.println("Feature MyFeature started!");
}
@Override
public void stop() {
System.out.println("Feature MyFeature stopped!");
}
}
and set the property applicationEntryPoint to the Full Qualified Name of the Feature class:
microej {
applicationEntryPoint = "com.mycompany.MyFeature"
}
Testsuite Execution
When upgrading from 0.15.0 to an higher version (up to 1.0.0), you may encounter the following error when executing a testsuite:
Preparing the execution of tests with the MicroEJ JUnit test engine
org.junit.platform.commons.JUnitException: TestEngine with ID 'microej-junit-test-engine' failed to execute tests
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:113)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:88)
...
Caused by: com.microej.testengine.TestEngineException: More than one VEE Port have been provided to run the testsuite
at com.microej.testengine.MicroejTestEngine.execute(MicroejTestEngine.java:203)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:107)
... 29 more
Execute the clean task before executing the testsuite to solve this issue.
From 0.14.0 to 0.15.0
This section applies if SDK 6 0.15.0 is used on a project that was created using SDK 6 0.14.0
or lower.
Unification of VEE dependency declaration
The microejVeePort configuration, used to define a VEE Port, and the microejKernel configuration, used to define a Kernel,
have been unified into the microejVee configuration.
To use a VEE Port or a Kernel published in an artifact repository, declare a Module dependency in the
build.gradle.ktsfile:dependencies { microejVee("com.mycompany:myVee:1.0.0") }
To use a VEE Port directory available locally, declare a file dependency in the
build.gradle.ktsfile:dependencies { microejVee(files("C:\\path\\to\\my\\veePort\\source")) }
To use a VEE Port archive available locally, declare a file dependency in the
build.gradle.ktsfile:dependencies { microejVee(files("C:\\path\\to\\my\\veePort\\file.zip")) }
To use a Kernel Virtual Device and Executable available locally, declare a file dependency in the
build.gradle.kts:dependencies { microejVee(files("C:\\path\\to\\my\\kernel\\executable.out", "C:\\path\\to\\my\\kernel\\virtual\\device")) }
From 0.11.1 to 0.12.0
This section applies if SDK 6 0.12.0 is used on a project that was created using SDK 6 0.11.1
or lower.
Use of File Dependencies to Define a Local VEE Port or a Kernel Executable
The veePortPath and the kernelFile properties have been replaced by file dependencies.
To use a VEE Port archive available locally, declare a file dependency in the
build.gradle.ktsfile, with themicroejVeePortconfiguration:dependencies { microejVeePort(files("C:\\path\\to\\my\\veePort\\file.zip")) }
To use a VEE Port directory available locally, declare a file dependency in the
build.gradle.ktsfile, with themicroejVeePortconfiguration:dependencies { microejVeePort(files("C:\\path\\to\\my\\veePort\\source")) }
To use a kernel Virtual Device and Executable available locally, declare a file dependency in the
build.gradle.ktsfile, with themicroejKernelconfiguration:dependencies { microejKernel(files("C:\\path\\to\\my\\kernel\\executable.out", "C:\\path\\to\\my\\kernel\\virtual\\device")) }
From 0.10.0 to 0.11.0
This section applies if SDK 6 0.11.0 is used on a project that was created using SDK 6 0.10.0
or lower.
Gradle mechanism usage for Multiple VEE Ports Support
Using multiple VEE Ports in a project uses Gradle mechanism now instead of relying on in-house feature.
This implies:
- the veePortPaths property has been renamed to veePortPath and accepts a String value:
microej {
veePortPath = "C:\\path\\to\\my\\veePort\\source"
}
the
kernelFilesproperty has been renamed tokernelFileand accepts a String value:microej { kernelFile = "C:\\path\\to\\my\\kernel\\file" }
Refer to the How To Build an Executable With Multiple VEE Ports section to learn how to support multiple VEE Ports using the Gradle mechanisms.
From 0.8.0 to 0.9.0
This section applies if SDK 6 0.9.0 is used on a project that was created using SDK 6 0.8.0
or lower.
Merge of the veePortDirs and veePortFiles properties
The build properties veePortDirs and veePortFiles have been merged into a single property veePortPaths.
To define a local VEE Port, set the build property veePortPaths in the microej configuration block
to the path of the VEE Port file (.zip or .vde) or to the source folder of the VEE Port:
microej {
veePortPaths = listOf("C:\\path\\to\\my\\veePort\\source")
}
The veePortPaths property is defined as a list in order to provide multiple VEE Port files or source folders if it is needed:
microej {
veePortPaths = listOf("C:\\path\\to\\my\\veePort1\\source", "C:\\path\\to\\my\\veePort2\\file.zip")
}
