Complete configuration reference for the Bearsampp Module Perl build system.
- Configuration Files
- Build Properties
- Gradle Properties
- Environment Variables
- Directory Configuration
- Perl Version Configuration
- Archive Configuration
- Best Practices
| File | Purpose | Required |
|---|---|---|
build.properties |
Main build configuration | Yes |
gradle.properties |
Gradle-specific settings | No |
settings.gradle |
Gradle project settings | Yes |
releases.properties |
Release metadata | No |
Main configuration file for the build system.
Location: <project-root>/build.properties
Format: Java properties file
Example:
bundle.name = perl
bundle.release = 2025.4.26
bundle.type = tools
bundle.format = 7z
#build.path = C:/Bearsampp-buildDescription: Name of the bundle
Type: String
Required: Yes
Default: perl
Example:
bundle.name = perlNotes:
- Used in archive naming:
bearsampp-{bundle.name}-{version}-{bundle.release}.{format} - Used in directory structure:
bearsampp-build/{bundle.type}/{bundle.name}/
Description: Release version identifier
Type: String (date format recommended: YYYY.M.D)
Required: Yes
Default: None
Example:
bundle.release = 2025.4.26Notes:
- Used in archive naming
- Used in output directory structure
- Recommended format:
YYYY.M.D(e.g.,2025.4.26) - Can be any string, but date format is conventional
Description: Type of bundle (determines output directory)
Type: String
Required: Yes
Default: tools
Valid Values: tools, bins, apps
Example:
bundle.type = toolsNotes:
- Determines output path:
bearsampp-build/{bundle.type}/{bundle.name}/ - For Perl, use
tools - Matches Bearsampp module categorization
Description: Archive format for packaged releases
Type: String
Required: Yes
Default: 7z
Valid Values: 7z, zip
Example:
bundle.format = 7zNotes:
7z: Better compression, requires 7-Zip installedzip: Native Java support, no external dependencies- Affects archive extension:
.7zor.zip
Description: Override default build root path
Type: String (file path)
Required: No
Default: <project-parent>/bearsampp-build
Example:
build.path = C:/Bearsampp-buildNotes:
- Optional property
- Overrides default build location
- Can also be set via
BEARSAMPP_BUILD_PATHenvironment variable - Priority:
build.path>BEARSAMPP_BUILD_PATH> default
Gradle-specific configuration for build performance and behavior.
Location: <project-root>/gradle.properties
Format: Java properties file
Example:
# Gradle daemon configuration
org.gradle.daemon=true
org.gradle.parallel=true
org.gradle.caching=true
# JVM settings
org.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=512m
# Gradle console output
org.gradle.console=autoorg.gradle.daemon=trueDescription: Enable Gradle daemon for faster builds
Recommended: true
org.gradle.parallel=trueDescription: Enable parallel task execution
Recommended: true
Notes: Currently limited benefit for this project, but useful for future enhancements
org.gradle.caching=trueDescription: Enable Gradle build cache
Recommended: true
Notes: Speeds up repeated builds
org.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=512mDescription: JVM memory settings for Gradle
Recommended: -Xmx2g -XX:MaxMetaspaceSize=512m
Notes:
-Xmx2g: Maximum heap size (2GB)-XX:MaxMetaspaceSize=512m: Metaspace limit- Adjust based on available system memory
Description: Override default build root path
Type: String (file path)
Required: No
Example:
# Windows (PowerShell)
$env:BEARSAMPP_BUILD_PATH = "C:/Bearsampp-build"
# Windows (CMD)
set BEARSAMPP_BUILD_PATH=C:\Bearsampp-build
# Linux/macOS
export BEARSAMPP_BUILD_PATH=/opt/bearsampp-buildPriority: Lower than build.path in build.properties
Description: Path to 7-Zip installation directory
Type: String (directory path)
Required: No (only if bundle.format=7z and 7-Zip not in PATH)
Example:
# Windows (PowerShell)
$env:7Z_HOME = "C:/Program Files/7-Zip"
# Windows (CMD)
set 7Z_HOME=C:\Program Files\7-ZipNotes:
- Only needed if 7-Zip is not in PATH
- Should point to directory containing
7z.exe - Build will search common locations automatically
Description: Path to Java installation directory
Type: String (directory path)
Required: Yes (usually set by Java installer)
Example:
# Windows (PowerShell)
$env:JAVA_HOME = "C:/Program Files/Java/jdk-17"
# Windows (CMD)
set JAVA_HOME=C:\Program Files\Java\jdk-17
# Linux/macOS
export JAVA_HOME=/usr/lib/jvm/java-17-openjdk<project-root>/
├── bin/ # Perl version bundles
│ ├── perl5.40.0/
│ ├── perl5.38.2/
│ └── archived/ # Archived versions
│ └── perl5.36.0/
├── build.gradle
├── build.properties
└── gradle.properties
<build-root>/ # Default: <project-parent>/bearsampp-build
├── tmp/ # Temporary build files
│ ├── bundles_prep/tools/perl/
│ ├── bundles_build/tools/perl/
│ ├── downloads/perl/
│ ├── extract/perl/
│ └── gradle/tools/perl/
└── tools/perl/ # Final output
└── 2025.4.26/
└── bearsampp-perl-5.40.0-2025.4.26.7z
Method 1: build.properties
build.path = C:/Custom-Build-PathMethod 2: Environment Variable
$env:BEARSAMPP_BUILD_PATH = "C:/Custom-Build-Path"Method 3: Command Line (not currently supported, use methods 1 or 2)
Each Perl version should be placed in the bin/ directory with the following structure:
bin/
└── perl5.40.0/ # Version folder
├── perl.exe # Main Perl executable (required)
├── perl5.40.0.exe # Version-specific executable
├── bin/ # Perl binaries
├── lib/ # Perl libraries
├── site/ # Site-specific modules
└── ...
Format: perl{major}.{minor}.{patch}
Examples:
perl5.40.0perl5.38.2perl5.36.0
Notes:
- Version folder name must start with
perl - Must contain
perl.exein the root or subdirectory - Build system will search for
perl.exerecursively
Older versions can be moved to bin/archived/:
bin/
├── perl5.40.0/ # Current versions
├── perl5.38.2/
└── archived/ # Archived versions
├── perl5.36.0/
└── perl5.34.0/
Notes:
- Archived versions are still available for building
- Helps organize current vs. legacy versions
gradle listVersionsshows both locations
If Perl binaries are not found locally, the build system will attempt to download from modules-untouched:
URL Pattern:
https://github.com/Bearsampp/modules-untouched/releases/download/perl-{version}/perl-{version}-win64.7z
Configuration: No configuration needed, automatic
Cache Location: bearsampp-build/tmp/downloads/perl/
Extract Location: bearsampp-build/tmp/extract/perl/{version}/
Format: bearsampp-{bundle.name}-{version}-{bundle.release}.{format}
Example: bearsampp-perl-5.40.0-2025.4.26.7z
Components:
bearsampp: Fixed prefix{bundle.name}: Frombuild.properties(e.g.,perl){version}: Perl version (e.g.,5.40.0){bundle.release}: Frombuild.properties(e.g.,2025.4.26){format}: Frombuild.properties(e.g.,7zorzip)
Top-Level Folder: perl{version}/
Example:
bearsampp-perl-5.40.0-2025.4.26.7z
└── perl5.40.0/ ← Version folder at root
├── perl.exe
├── perl5.40.0.exe
├── bin/
├── lib/
├── site/
└── ...
Notes:
- Archive always contains the version folder at the root
- Matches structure of other Bearsampp modules
- Ensures consistent extraction behavior
Each archive is accompanied by hash sidecar files:
Generated Hashes:
.md5- MD5 checksum.sha1- SHA-1 checksum.sha256- SHA-256 checksum.sha512- SHA-512 checksum
Format:
{hash} {filename}
Example (.md5 file):
a1b2c3d4e5f6... bearsampp-perl-5.40.0-2025.4.26.7z
Recommended:
bin/
├── perl5.40.0/ # Latest stable
├── perl5.38.2/ # Previous stable
└── archived/
├── perl5.36.0/ # Older versions
└── perl5.34.0/
Benefits:
- Clear separation of current vs. archived versions
- Easy to find latest versions
- Maintains build capability for all versions
Recommended: Use environment variable for team consistency
# Set in team documentation or CI/CD
$env:BEARSAMPP_BUILD_PATH = "C:/Bearsampp-build"Benefits:
- Consistent across team members
- No need to modify
build.properties - Easy to change for different environments
Recommended: Use 7z for production, zip for development
Production (build.properties):
bundle.format = 7zDevelopment (build.properties):
bundle.format = zipBenefits:
7z: Better compression for distributionzip: Faster builds, no external dependencies
Recommended (gradle.properties):
org.gradle.daemon=true
org.gradle.parallel=true
org.gradle.caching=true
org.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=512m
org.gradle.console=autoBenefits:
- Faster builds with daemon and caching
- Better memory management
- Improved console output
Recommended: .gitignore configuration
# Build outputs (external directory)
/bearsampp-build/
# Gradle files
/.gradle/
/build/
# IDE files
/.idea/
*.iml
/.vscode/
# Temporary files
*.tmp
*.logBenefits:
- Keeps repository clean
- Avoids committing build artifacts
- Consistent across team
Recommended: Environment-specific configuration
# Example GitHub Actions
env:
BEARSAMPP_BUILD_PATH: ${{ github.workspace }}/build-output
JAVA_HOME: ${{ env.JAVA_HOME_17_X64 }}Benefits:
- Consistent builds across environments
- Easy to configure per environment
- No hardcoded paths
build.properties:
bundle.name = perl
bundle.release = 2025.4.26
bundle.type = tools
bundle.format = zipgradle.properties:
org.gradle.daemon=true
org.gradle.caching=true
org.gradle.jvmargs=-Xmx1gNotes: Fast builds with zip format, moderate memory usage
build.properties:
bundle.name = perl
bundle.release = 2025.4.26
bundle.type = tools
bundle.format = 7z
build.path = C:/Bearsampp-buildgradle.properties:
org.gradle.daemon=true
org.gradle.parallel=true
org.gradle.caching=true
org.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=512mNotes: Optimized compression, dedicated build path, maximum performance
build.properties:
bundle.name = perl
bundle.release = 2025.4.26
bundle.type = tools
bundle.format = 7z
# build.path set via environment variableEnvironment Variables:
BEARSAMPP_BUILD_PATH=/opt/ci-build
JAVA_HOME=/usr/lib/jvm/java-17-openjdkNotes: Environment-driven configuration, no hardcoded paths
Symptom: Permission denied errors
Solution:
- Check directory permissions
- Use a different build path
- Run with appropriate permissions
Symptom: 7-Zip not found error
Solution:
- Install 7-Zip
- Set
7Z_HOMEenvironment variable - Or change
bundle.formattozip
Symptom: Build fails with property error
Solution:
- Run
gradle validateProperties - Check property format in
build.properties - Ensure all required properties are present
Last Updated: 2025-04-26
Version: 2025.4.26