The DashO Gradle Plugin for Android must locate a compatible DashO Home before it can protect an Android build.
When you install DashO in a default location with a DashO installer, the Android plugin normally locates a compatible installation automatically. Configure DashO Home only when you use a non-default installation location, need to select a specific DashO version, or automatic discovery does not find a compatible installation.
DashO Home resolution order
The Android plugin uses the first valid DashO Home found in the following order.
1. home in the dasho closure
Set home when you want the build file to identify an exact installation directory:
dasho {
home "/Applications/PreEmptive Protection DashO X.y.app/Contents/app"
}
2. DASHO_HOME Gradle project property
Define DASHO_HOME in gradle.properties or pass it with -P:
gradlew -PDASHO_HOME=/Applications/PreEmptive\ Protection\ DashO\ X.y.app/Contents/app build
3. DASHO_HOME Java system property
Pass DASHO_HOME to the Gradle process with -D:
gradlew -DDASHO_HOME=/Applications/PreEmptive\ Protection\ DashO\ X.y.app/Contents/app build
4. DASHO_HOME environment variable
Set the DASHO_HOME environment variable to the DashO Home directory before running the Gradle build.
5. searchVersion in the dasho closure
Set searchVersion to search the default installation locations for a particular major or major-and-minor DashO version:
dasho {
searchVersion "{major}[.{minor}]"
}When you provide both a major and minor version, the plugin searches for that version line. When you provide only a major version, it selects the latest compatible installation for that major version that it can find in a default installation location.
6. Automatic search
If none of the preceding settings provide DashO Home, the plugin searches the default installation locations for a compatible DashO version.
The versions searched depend on the Android plugin version. Review DashO Gradle Plugin for Android Version Compatibility for the applicable search behavior.
Choose between home and searchVersion
Do not configure home and searchVersion together.
- Use
homewhen the DashO installation is in a non-default location, or the build must use an exact installation directory. - Use
searchVersionwhen DashO is installed in a default location, and the build should select a particular version line. - Configure neither when the newest compatible DashO installation in a default location is appropriate.
Verify the configured location
Run a protected Gradle build. If DashO Home is valid, the build output identifies the DashO version when the protection task runs.
If the plugin reports that DashO was not found or that DashO Home is invalid:
- Confirm that the selected directory contains
DashOPro.jar. - Confirm that the DashO version is compatible with the Android plugin version.
- Check whether a higher-priority
DASHO_HOME,home, or system property is overriding the setting you intended to use. - Review Gradle Plugin for Android Troubleshooting.