This class is an alternate to JavaAppPackaging designed to support the ash shell. JavaAppPackaging generates bash-specific code that is not compatible with ash, a very stripped-down, lightweight shell used by popular micro base Docker images like BusyBox. The AshScriptPlugin will generate simple ash-compatible output.
Just like with JavaAppPackaging you can override the bash-template file by creating a src/templates directory and adding your own bash-template file. Actually this isn't a bad idea as the default bash-template file inherited from JavaAppPackaging has a lot of stuff you probably don't want/need in a highly-constrained environment like ash+BusyBox. Something much simpler will do, for example:
#!/usr/bin/env sh
realpath () { ( TARGET_FILE="$1"
cd "$(dirname "$TARGET_FILE")" TARGET_FILE=$(basename "$TARGET_FILE")
COUNT=0 while [ -L "$TARGET_FILE" -a $COUNT -lt 100 ] do TARGET_FILE=$(readlink "$TARGET_FILE") cd "$(dirname "$TARGET_FILE")" TARGET_FILE=$(basename "$TARGET_FILE") COUNT=$(($COUNT + 1)) done
if [ "$TARGET_FILE" == "." -o "$TARGET_FILE" == ".." ]; then cd "$TARGET_FILE" TARGET_FILEPATH= else TARGET_FILEPATH=/$TARGET_FILE fi
The Setting to add to the build scope for each project that activates this AutoPlugin. The settings returned here are guaranteed to be added to a given build scope only once regardless of how many projects for that build activate this AutoPlugin.
The Setting to add to the build scope for each project that activates this AutoPlugin. The settings returned here are guaranteed to be added to a given build scope only once regardless of how many projects for that build activate this AutoPlugin.
Determines whether this AutoPlugin will be activated for this project when the requires clause is satisfied.
Determines whether this AutoPlugin will be activated for this project when the requires clause is satisfied.
When this method returns allRequirements, and requires method returns Web && Javascript, this plugin instance will be added automatically if the Web and Javascript plugins are enabled.
When this method returns noTrigger, and requires method returns Web && Javascript, this plugin instance will be added only if the build user enables it, but it will automatically add both Web and Javascript.