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.
These tasks can utilize the same dashOConfig
or those properties may be configured in your custom task. When defining your custom task you will need to specify the input and output file (or directory). Simply calling the from
and to
methods will configure the ${gradleInput}
and ${gradleOutput}
properties for DashO. The setSupportClasspath(classpath)
method can be used to set ${gradleSupport}
. The string should be formatted like a standard Java classpath; utilizing the path delimiter specific to your OS. If you have a need for your custom task to pass additional user properties to DashO, you can specify them by using the addUserProperty(name, value)
method.
Example
task myCustomDashOTask (type:DashODirTask) {
from("$MyInputDirectory")
to("$MyOutputDirectory")
setSupportClasspath("$MyClasspath")
addUserProperty("MyPropertyName", "MyValue")
addUserProperty("MyOtherPropertyName", "MyOtherValue")
}