DryRun is a Java-based utility designed to validate and process Pebble templates within a Gradle-managed environment. It provides a safe way to test template logic, path resolution, and environment configurations without executing a full production deployment.
Ensure your Ubuntu environment is configured with the following:
- JDK 17 or higher
- Gradle 7.x+
- JAVA_HOME: Points to your JDK installation.
- ANDROID_HOME: Points to your Android SDK.
Clone the repository to your local machine:
Bash
git clone https://github.com/jimturner-adfa/PebbleSyntaxChecker.git
cd DryRun
The project utilizes environment variables to resolve template paths. You can verify your setup using the included bash logic:
Bash
if [[ -z "$JAVA_HOME" ]]; then
echo "Warning: JAVA_HOME is not set."
fi
if [[ -z "$ANDROID_HOME" ]]; then
echo "Warning: ANDROID_HOME is not set."
fi
This project is configured to use relative paths for template loading. Ensure your FileLoader prefix is correctly pointed to your resources directory:
Bash
DryRun.sh <templeDir> <Language>
where:
- templateDir - the directory containing the template with the peb files
- language - is either java or kotlin
The script will:
- Copy your tenplate directory into a new directory with the suffix .copy.
- Run the Pebble parser on the peb file in the copy
- Based on the value of language it will delete files not used (i.e. if the language is "java", the all kotlin files will be deleted)
- run gradle to build the template and verify the syntax