Customization
If the integrated plugins do not work for you, we allow you to create your own Gradle task leveraging DashO by using the com.preemptive.dashoCustom
plugin and extending a provided task type.
Task Types
The plugin defines two task types:
DashODirTask
- Takes a directory as input and outputs to a directory.Note: The contents of DashO's output directory will be deleted before DashO runs.
DashOFileTask
- Takes a jar (or APK) file as input and outputs to a jar (or APK) file.
The DashO project should be configured with the correct output type based on the task type being used.
You can configure these tasks using dashOConfig
or directly in your custom task's definition.
The custom task must specify the input and output file (or directory).
Calling from
and to
will configure the ${gradleInput}
and ${gradleOutput}
for DashO.
Calling setSupportClasspath(classpath)
will configure ${gradleSupport}
for DashO.
Format the classpath
string like a standard Java classpath, using the path delimiter appropriate for your operating system.
Additional user properties can be passed to DashO, by calling addUserProperty(name, value)
.
Example
task myCustomDashOTask (type:DashODirTask) {
from("$MyInputDirectory")
from("$MyOtherInputDirectory")
to("$MyOutputDirectory")
setSupportClasspath("$MyClasspath")
addUserProperty("MyPropertyName", "MyValue")
addUserProperty("MyOtherPropertyName", "MyOtherValue")
}