The DashO Gradle Plugins for Java integrate PreEmptive Protection DashO into Gradle builds for JVM-based Java projects. They add DashO protection tasks to the build and support Gradle up-to-date checking, so Gradle can skip a DashO task when its inputs and configuration have not changed.
For Android applications and Android libraries built with the Android Gradle Plugin, use the DashO Gradle Plugin for Android instead.
Available plugins
Choose the plugin that matches the artifact or workflow you need to protect:
| Plugin | Added task | Use it when |
com.preemptive.dasho |
obfuscate |
You use the standard Java plugin and want DashO to protect the compiled class directory before Gradle creates the JAR. |
com.preemptive.dashoJar |
obfuscateJar |
You want Gradle to create the JAR first and then produce a protected JAR. |
com.preemptive.dashoCustom |
None | You need to define a custom DashO task and control its input, output, support classpath, or user properties. |
The two integrated plugins add their protection tasks to the Gradle build lifecycle. The custom plugin provides DashO task types but does not add or run a task automatically.
Requirements
Before configuring a Java plugin:
- Install and activate a DashO version that supports your Java and Gradle environment.
- Identify DashO Home, which contains the Gradle plugin JAR under its gradle directory.
- Create a DashO Standard Mode project file for the Java application or library.
- Review the DashO system requirements and the release information for the DashO version you use.
Next steps
- Use Configure the DashO Gradle Plugins for Java to add the plugin artifact.
- Apply the selected plugin
- Configure the DashO project file
- Verify the protection task.
If the plugin cannot be applied or the protection task fails, review Gradle Plugins for Java Troubleshooting.