Java 9 and Later
PreEmptive Protection™ DashO™ for Android & Java can be used with Java 9 and Java 10, with limitations as documented below. DashO’s support for Java 9 (and later versions) will continue to improve with each release.
Supported
Inputs and support libraries containing Java 9 or Java 10 class files will be processed.
However, any module-info.class
files in support libraries will not be evaluated for class references or module dependencies, and support for modules as inputs is limited.
Inputs and support libraries containing Java 11 or Java 12 class files are not yet supported.
Limitations
There are currently some limitations on how DashO handles some Java 9 and 10 features. These limitations will be resolved in future DashO releases.
Modules
Java Modules, introduced in Java 9, will not be interpreted as modules by DashO; they will be treated as standard jar files.
DashO will neither update nor use the information in module-info.class
.
If processing a module as an input:
- Configure DashO to not rename or remove the classes and packages referenced by the
module-info
. - Auto copy must be enabled to ensure that the
module-info.class
is copied to the output. - Make sure to use a package prefix if you configure renaming to flatten packages.
See this section.
- If you are flattening packages for a module, it must be the only input so that the prefixed package will not exist in more than one module.
Because of these limitations, support for Java Modules is disabled by default to ensure that you don't encounter unintentional or unexpected build results.
To process Java Modules as inputs, opt-in by adding a new User Property named PROVISIONAL_MODULE_SUPPORT
and setting it to true
.
Note: This property will be ignored once support is no longer provisional.
String Encryption
Introduced in Java 9, invokedynamic
-based string concatenation (described in JEP-280) may pass string constants to a bootstrap method.
DashO String Encryption does not currently support this.
Constant strings when concatenated with non-constant values (e.g. "Welcome, " + name + ", to string concatenation."
) will not be encrypted, by default.
DashO will issue a warning, only once per build, if this issue is encountered.
This issue does not affect classes compiled for Java 8 (and earlier) running on a Java 9 (or later) JVM.
Compiling with -XDstringConcat=indy
, as described in JEP-280, will allow DashO String Encryption to work as it does for Java 8, and earlier.
Build Integrations
The older Gradle integrations will output warnings (e.g. WARNING: An illegal reflective access operation...
) when run with Java 9, or later.
Those warnings can be ignored.
Multi-release Jars
DashO will generate a build error if a multi-release jar is configured as an input.
Note: If used as a support library, you will see a
Duplicate class
warning which can be ignored.