Complete reference for all available Gradle tasks in the Bearsampp Module PHP project.
Group: build
Description: Build release package. Interactive by default; non-interactive when -PbundleVersion=* (latest) or a concrete version is provided.
Usage:
# Interactive mode (default β prompts for version)
gradle release
# Non-interactive (build latest found in bin/)
gradle release -PbundleVersion=*
# Non-interactive (build specific version)
gradle release -PbundleVersion=8.4.14Parameters:
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
bundleVersion |
String | No | PHP version to build | 8.3.15 |
Process:
- Validates environment and version
- Creates preparation directory
- Copies base PHP files
- Processes extensions (if configured)
- Processes PEAR (if configured)
- Processes dependencies (if configured)
- Outputs prepared bundle under
bearsampp-build/tmp/bundles_prep/bins/php/php{version}/ - Packages the prepared folder into an archive in
bearsampp-build/bins/php/{bundle.release}/ensuring the top-level folder inside the archive is{bundle.release}/containingbin/andbin/archived/
Output Locations:
- Prepared folder:
bearsampp-build/tmp/bundles_prep/bins/php/php{version}/ - Final archive:
bearsampp-build/bins/php/{bundle.release}/bearsampp-php-{version}-{bundle.release}.{7z|zip}
Group: build
Description: Execute the release build process
Usage:
gradle releaseBuild -PbundleVersion=8.3.15Parameters:
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
bundleVersion |
String | Yes | PHP version to build | 8.3.15 |
Note: This task is typically called by the release task. Use release instead for normal builds.
Group: build
Description: Package release into archive (7z or zip) including the version folder at the root of the archive
Usage:
gradle packageRelease -PbundleVersion=8.3.15Notes:
- Chooses archiver based on
bundle.formatinbuild.properties(7zorzip). - Archive content layout mirrors module-bruno:
- Root folder:
{bundle.release}/(e.g.,2025.10.31/) - Inside root:
bin/php{version}/andbin/archived/ - Optional:
releases.propertiesat the same level asbin/
- Root folder:
- Output:
bearsampp-build/bins/php/{bundle.release}/bearsampp-php-{version}-{bundle.release}.{7z|zip}
Group: build
Description: Package release into a .7z archive (requires 7-Zip in PATH). Ensures the top-level folder inside the archive is {bundle.release}/ containing bin/ and bin/archived/.
Usage:
gradle packageRelease7z -PbundleVersion=8.3.15Group: build
Description: Package release into a .zip archive using Gradle's native Zip task. Ensures the top-level folder inside the archive is {bundle.release}/ containing bin/ and bin/archived/.
Usage:
gradle packageReleaseZip -PbundleVersion=8.3.15Group: build
Description: Clean build artifacts and temporary files
Usage:
gradle cleanCleans:
build/directorytmp/directory- All temporary build files
Output:
Cleaned: E:/Bearsampp-development/module-php/build
Cleaned: E:/Bearsampp-development/module-php/tmp
[SUCCESS] Build artifacts cleaned
Group: verification
Description: Verify build environment and dependencies
Usage:
gradle verifyChecks:
| Check | Description | Required |
|---|---|---|
| Java 8+ | Java version 8 or higher | Yes |
| build.properties | Build configuration file exists | Yes |
| releases.properties | Release definitions file exists | Yes |
| pear directory | PEAR installation directory exists | Yes |
| pear-install.bat | PEAR installation script exists | Yes |
| bin directory | PHP versions directory exists | Yes |
Output:
Environment Check Results:
------------------------------------------------------------
[PASS] Java 8+
[PASS] build.properties
[PASS] releases.properties
[PASS] pear directory
[PASS] pear-install.bat
[PASS] bin directory
------------------------------------------------------------
[SUCCESS] All checks passed! Build environment is ready.
Group: verification
Description: Validate build.properties configuration
Usage:
gradle validatePropertiesValidates:
| Property | Required | Description |
|---|---|---|
bundle.name |
Yes | Name of the bundle |
bundle.release |
Yes | Release version |
bundle.type |
Yes | Type of bundle |
bundle.format |
Yes | Archive format |
Output:
[SUCCESS] All required properties are present:
bundle.name = php
bundle.release = 2025.10.31
bundle.type = bins
bundle.format = 7z
Group: verification
Description: Validate DLL architecture (64-bit check)
Usage:
gradle validateDllArchitecture -PdllFile=path/to/file.dllParameters:
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
dllFile |
String | Yes | Path to DLL file to validate | ext/php_redis.dll |
Output:
Validating architecture for: php_redis.dll
MachineType: 64-bit
[SUCCESS] DLL is 64-bit compatible
Group: help
Description: Display build configuration information
Usage:
gradle infoDisplays:
- Project information (name, version, description)
- Bundle properties (name, release, type, format)
- Paths (project dir, root dir, dev path, PHP ext, PEAR install)
- Java information (version, home)
- Gradle information (version, home)
- Available task groups
- Quick start commands
Group: help
Description: Display PHP-specific build information
Usage:
gradle phpInfoDisplays:
- PHP extension processing information
- PEAR installation information
- Dependencies information
- Architecture verification information
- Configuration files
- Useful commands
Group: help
Description: List all available bundle versions in bin/ directory
Usage:
gradle listVersionsOutput:
Available php versions in bin/:
------------------------------------------------------------
8.1.32
8.1.33
8.2.28
8.2.29
8.3.20
8.3.24
8.3.26
8.3.27
8.4.10
8.4.11
8.4.13
8.4.14
------------------------------------------------------------
Total versions: 12
To build a specific version:
gradle release -PbundleVersion=8.4.14
Group: help
Description: List all available releases from releases.properties
Usage:
gradle listReleasesOutput:
Available PHP Releases:
--------------------------------------------------------------------------------
8.1.32 -> https://windows.php.net/downloads/releases/php-8.1.32-Win32-vs16-x64.zip
8.1.33 -> https://windows.php.net/downloads/releases/php-8.1.33-Win32-vs16-x64.zip
...
--------------------------------------------------------------------------------
Total releases: 50
Group: help
Description: List PHP extensions configured in bin directories
Usage:
gradle listExtensionsOutput:
Scanning for PHP extension configurations...
================================================================================
PHP 8.3.15:
--------------------------------------------------------------------------------
imagick -> https://windows.php.net/downloads/pecl/releases/imagick/3.7.0/php_imagick-3.7.0-8.3-ts-vs16-x64.zip
redis -> https://windows.php.net/downloads/pecl/releases/redis/6.0.2/php_redis-6.0.2-8.3-ts-vs16-x64.zip
xdebug -> https://xdebug.org/files/php_xdebug-3.3.1-8.3-vs16-x86_64.dll
================================================================================
Group: help
Description: List PEAR configurations in bin directories
Usage:
gradle listPearConfigOutput:
Scanning for PEAR configurations...
================================================================================
PHP 8.3.15:
--------------------------------------------------------------------------------
phppear.pear -> https://pear.php.net/install-pear-nozlib.phar
================================================================================
Group: help
Description: List dependencies configured in bin directories
Usage:
gradle listDependenciesOutput:
Scanning for dependency configurations...
================================================================================
PHP 8.3.15:
--------------------------------------------------------------------------------
imagemagick -> https://imagemagick.org/archive/binaries/ImageMagick-7.1.1-28-portable-Q16-HDRI-x64.zip
================================================================================
release
βββ releaseBuild
βββ (validates environment)
βββ (creates directories)
βββ (copies base files)
βββ (processes extensions)
βββ (processes PEAR)
βββ (processes dependencies)
| Group | Tasks |
|---|---|
| build | release, releaseBuild, clean |
| verification | verify, validateProperties, validateDllArchitecture |
| help | info, phpInfo, listVersions, listReleases, listExtensions, listPearConfig, listDependencies |
# 1. Verify environment
gradle verify
# 2. List available versions
gradle listVersions
# 3. Check extensions for a version
gradle listExtensions
# 4. Build the release
gradle release -PbundleVersion=8.3.15
# 5. Clean up
gradle clean# Run with info logging
gradle release -PbundleVersion=8.3.15 --info
# Run with debug logging
gradle release -PbundleVersion=8.3.15 --debug
# Run with stack trace on error
gradle release -PbundleVersion=8.3.15 --stacktrace# Validate build properties
gradle validateProperties
# Verify environment
gradle verify
# Validate a specific DLL
gradle validateDllArchitecture -PdllFile=ext/php_redis.dll# Get build info
gradle info
# Get PHP-specific info
gradle phpInfo
# List all available versions
gradle listVersions
# List all releases
gradle listReleases
# List extensions for all versions
gradle listExtensions
# List PEAR configs
gradle listPearConfig
# List dependencies
gradle listDependencies| Option | Description | Example |
|---|---|---|
--info |
Set log level to INFO | gradle release --info |
--debug |
Set log level to DEBUG | gradle release --debug |
--stacktrace |
Print stack trace on error | gradle release --stacktrace |
--scan |
Create build scan | gradle release --scan |
--dry-run |
Show what would be executed | gradle release --dry-run |
--parallel |
Execute tasks in parallel | gradle release --parallel |
--offline |
Execute build without network access | gradle release --offline |
Set via -P flag:
| Property | Type | Description | Example |
|---|---|---|---|
bundleVersion |
String | PHP version to build | -PbundleVersion=8.3.15 |
dllFile |
String | DLL file to validate | -PdllFile=ext/php_redis.dll |
Set via -D flag:
| Property | Type | Description | Example |
|---|---|---|---|
org.gradle.daemon |
Boolean | Enable Gradle daemon | -Dorg.gradle.daemon=true |
org.gradle.parallel |
Boolean | Enable parallel execution | -Dorg.gradle.parallel=true |
Last Updated: 2025-01-31
Version: 2025.10.31