Skip to content

Conversation

@N6REJ
Copy link
Contributor

@N6REJ N6REJ commented Nov 15, 2025

PR Type

Enhancement, Documentation


Description

  • Migrated build system from Ant to Gradle with modernized configuration

  • Relocated build artifacts to shared bearsampp-build directory structure

  • Added comprehensive build documentation with Gradle tasks and usage instructions

  • Removed deprecated Ant build configuration files


Diagram Walkthrough

flowchart LR
  A["Ant build system"] -- "deprecated" --> B["Gradle build system"]
  B --> C["Shared build directory"]
  B --> D["Gradle properties"]
  E["build.xml removed"] --> B
  F["Documentation added"] --> G["README.md"]
Loading

File Walkthrough

Relevant files
Documentation
README.md
Add Gradle build system documentation and usage guide       

README.md

  • Added comprehensive Gradle build documentation section with
    prerequisites and configuration
  • Documented build properties, output locations, and directory structure
  • Listed common Gradle tasks for building, verifying, and managing
    versions
  • Explained archive layout and 7-Zip integration requirements
+49/-0   
Enhancement
build.xml
Remove deprecated Ant build configuration                               

build.xml

  • Removed entire Ant build configuration file
  • Deleted all Ant targets, properties, and import statements
  • Eliminated legacy build-commons and build-bundle imports
+0/-35   
Configuration changes
gradle.properties
Add Gradle build configuration properties                               

gradle.properties

  • Added Gradle daemon and parallel execution configuration
  • Configured JVM settings with 2GB heap and metaspace limits
  • Enabled build caching and console output settings
  • Set Gradle 7.0+ compatibility requirement
+19/-0   

@N6REJ N6REJ added the enhancement ✨ Improve program label Nov 15, 2025
@qodo-merge-pro
Copy link

qodo-merge-pro bot commented Nov 15, 2025

PR Compliance Guide 🔍

Below is a summary of compliance checks for this PR:

Security Compliance
Untrusted tool execution

Description: Relying on the external 7-Zip executable from PATH or an unconstrained 7Z_HOME introduces
supply-chain/path-hijack risk where a malicious 7z binary could be executed during builds,
potentially compromising the build output and developer machine.
README.md [20-21]

Referred Code
- 7-Zip installed and available in PATH or via `7Z_HOME` when using `bundle.format=7z`
Insecure build path override

Description: Allowing override of the build output path via environment variable BEARSAMPP_BUILD_PATH
without guidance on secure, controlled locations can cause builds to write artifacts and
temporary files to unintended or shared paths, risking tampering or data leakage.
README.md [31-34]

Referred Code
- You can override with:
  - `build.path` in `build.properties`, or
  - Environment variable `BEARSAMPP_BUILD_PATH`
Sensitive information exposure

Description: Enabling JVM heap dumps on OOM (HeapDumpOnOutOfMemoryError) can write memory dumps
containing sensitive data to disk without specifying a secure directory or access
controls, risking sensitive information exposure on developer machines or CI agents.
gradle.properties [9-9]

Referred Code
org.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError
Ticket Compliance
🎫 No ticket provided
  • Create ticket/issue
Codebase Duplication Compliance
Codebase context is not defined

Follow the guide to enable codebase context checks.

Custom Compliance
🟢
Generic: Meaningful Naming and Self-Documenting Code

Objective: Ensure all identifiers clearly express their purpose and intent, making code
self-documenting

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Comprehensive Audit Trails

Objective: To create a detailed and reliable record of critical system actions for security analysis
and compliance.

Status:
No runtime logs: The PR only adds build documentation and Gradle properties without any application code
that could implement or affect audit logging of critical actions.

Referred Code
## Build (Gradle)

The build system has been modernized to align with the Bruno module and now writes artifacts to the shared bearsampp-build directory instead of the local project build/ folder.
Additionally, Gradle's own temporary `build/` directory is relocated to the shared tmp area so nothing is written under the module folder during builds.

Prerequisites:
- Java 8+
- Gradle (wrapper or system Gradle)
- 7-Zip installed and available in PATH or via `7Z_HOME` when using `bundle.format=7z`

Build properties are defined in `build.properties`:
- `bundle.name` (e.g., `perl`)
- `bundle.release` (e.g., `2025.4.26`)
- `bundle.type` (e.g., `tools`)
- `bundle.format` (`7z` or `zip`)
- Optional: `build.path` to override the default build root

Build output location:
- Default root: `<repo-root>/../bearsampp-build`
- You can override with:
  - `build.path` in `build.properties`, or


 ... (clipped 21 lines)

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Robust Error Handling and Edge Case Management

Objective: Ensure comprehensive error handling that provides meaningful context and graceful
degradation

Status:
No error paths: The changes are configuration and documentation only, providing no new code paths where
runtime errors or edge cases are handled or mishandled.

Referred Code
# Gradle Build Properties for Bearsampp Module Perl

# Gradle daemon configuration
org.gradle.daemon=true
org.gradle.parallel=true
org.gradle.caching=true

# JVM settings for Gradle
org.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError

# Configure console output
org.gradle.console=auto
org.gradle.warning.mode=all

# Build performance
org.gradle.configureondemand=false

# Gradle version compatibility
# This project is compatible with Gradle 7.0+

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Error Handling

Objective: To prevent the leakage of sensitive system information through error messages while
providing sufficient detail for internal debugging.

Status:
No user errors: The PR introduces no user-facing error handling changes; only documentation and Gradle
settings are added, so secure error messaging cannot be assessed from this diff.

Referred Code
## Build (Gradle)

The build system has been modernized to align with the Bruno module and now writes artifacts to the shared bearsampp-build directory instead of the local project build/ folder.
Additionally, Gradle's own temporary `build/` directory is relocated to the shared tmp area so nothing is written under the module folder during builds.

Prerequisites:
- Java 8+
- Gradle (wrapper or system Gradle)
- 7-Zip installed and available in PATH or via `7Z_HOME` when using `bundle.format=7z`

Build properties are defined in `build.properties`:
- `bundle.name` (e.g., `perl`)
- `bundle.release` (e.g., `2025.4.26`)
- `bundle.type` (e.g., `tools`)
- `bundle.format` (`7z` or `zip`)
- Optional: `build.path` to override the default build root

Build output location:
- Default root: `<repo-root>/../bearsampp-build`
- You can override with:
  - `build.path` in `build.properties`, or


 ... (clipped 21 lines)

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Logging Practices

Objective: To ensure logs are useful for debugging and auditing without exposing sensitive
information like PII, PHI, or cardholder data.

Status:
No logging changes: No application logging code is introduced; the diff does not reveal whether sensitive data
might be logged elsewhere or whether structured logging is used.

Referred Code
# Gradle Build Properties for Bearsampp Module Perl

# Gradle daemon configuration
org.gradle.daemon=true
org.gradle.parallel=true
org.gradle.caching=true

# JVM settings for Gradle
org.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError

# Configure console output
org.gradle.console=auto
org.gradle.warning.mode=all

# Build performance
org.gradle.configureondemand=false

# Gradle version compatibility
# This project is compatible with Gradle 7.0+

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Security-First Input Validation and Data Handling

Objective: Ensure all data inputs are validated, sanitized, and handled securely to prevent
vulnerabilities

Status:
No input handling: The PR contains build docs and Gradle configuration only, with no new input processing or
data handling code to assess for validation or secure handling.

Referred Code
## Build (Gradle)

The build system has been modernized to align with the Bruno module and now writes artifacts to the shared bearsampp-build directory instead of the local project build/ folder.
Additionally, Gradle's own temporary `build/` directory is relocated to the shared tmp area so nothing is written under the module folder during builds.

Prerequisites:
- Java 8+
- Gradle (wrapper or system Gradle)
- 7-Zip installed and available in PATH or via `7Z_HOME` when using `bundle.format=7z`

Build properties are defined in `build.properties`:
- `bundle.name` (e.g., `perl`)
- `bundle.release` (e.g., `2025.4.26`)
- `bundle.type` (e.g., `tools`)
- `bundle.format` (`7z` or `zip`)
- Optional: `build.path` to override the default build root

Build output location:
- Default root: `<repo-root>/../bearsampp-build`
- You can override with:
  - `build.path` in `build.properties`, or


 ... (clipped 21 lines)

Learn more about managing compliance generic rules or creating your own custom rules

  • Update
Compliance status legend 🟢 - Fully Compliant
🟡 - Partial Compliant
🔴 - Not Compliant
⚪ - Requires Further Human Verification
🏷️ - Compliance label

@qodo-merge-pro
Copy link

qodo-merge-pro bot commented Nov 15, 2025

PR Code Suggestions ✨

Latest suggestions up to 363514e

CategorySuggestion                                                                                                                                    Impact
General
Align CLI property naming

Correct the Gradle command-line property from -PbundleVersion to
-Pbundle.version to match the naming convention used in build.properties.

README.md [52]

-- Build a specific version: `gradle release -PbundleVersion=5.40.0`
+- Build a specific version: `gradle release -Pbundle.version=5.40.0` (property name aligns with `build.properties` keys)
  • Apply / Chat
Suggestion importance[1-10]: 8

__

Why: The suggestion corrects a likely error in the example command by aligning the property name bundleVersion with the bundle.version convention used elsewhere, preventing a non-functional command.

Medium
Specify minimum Gradle version

Specify the minimum required Gradle version (7.0+) in the README.md and add a
command for users to verify their local version.

README.md [22]

-- Gradle (system Gradle only; do not use Gradle wrapper in this repository)
+- Gradle (system Gradle only; do not use Gradle wrapper in this repository) — minimum version: 7.0+
+- Verify your Gradle version: `gradle --version` (ensure Gradle >= 7.0)
  • Apply / Chat
Suggestion importance[1-10]: 6

__

Why: The suggestion correctly identifies that the README.md is missing the minimum required Gradle version, which is specified as 7.0+ in gradle.properties, improving documentation clarity and preventing potential build failures.

Low
Clarify cross-platform 7-Zip requirements

Clarify the 7-Zip executable name for different operating systems (e.g., 7z.exe
for Windows, 7z for macOS/Linux) in the README.md.

README.md [23]

-- 7-Zip installed and available in PATH or via `7Z_HOME` when using `bundle.format=7z`
+- 7-Zip installed and available in PATH (Windows: `7z.exe`, macOS/Linux: `7z`) or specify its location via `7Z_HOME` (path to directory containing the executable) when using `bundle.format=7z`.
  • Apply / Chat
Suggestion importance[1-10]: 5

__

Why: This is a good documentation improvement that clarifies the 7-Zip executable name for different operating systems, which helps prevent setup issues for non-Windows users.

Low
  • More

Previous suggestions

Suggestions up to commit cdca3e5
CategorySuggestion                                                                                                                                    Impact
High-level
PR is missing core build scripts

The suggestion points out that the PR is fundamentally incomplete because it
lacks the core Gradle build scripts (build.gradle, settings.gradle) required to
implement the documented build system.

Examples:

README.md [41-48]
Common tasks:
- List tasks: `gradle tasks`
- Show build info: `gradle info`
- Verify environment: `gradle verify`
- List available versions from `bin/` and `bin/archived/`: `gradle listVersions`
- Build a specific version: `gradle release -PbundleVersion=5.40.0`
- Build all available versions in `bin*/`: `gradle releaseAll`
- Clean Gradle project artifacts: `gradle clean`

Solution Walkthrough:

Before:

// PR only contains documentation and configuration files.
// File: README.md
// ...
// Common tasks:
// - List tasks: `gradle tasks`
// - Build a specific version: `gradle release -PbundleVersion=5.40.0`
// ...

// File: gradle.properties
// org.gradle.daemon=true
// ...

// Missing: build.gradle, settings.gradle, etc.

After:

// The PR should include the actual build scripts.
// File: build.gradle (conceptual)

// Load properties from build.properties

task verify {
  // Implementation for environment verification
}

task release {
  // Implementation for building a release artifact
}

task releaseAll {
  // Implementation for building all versions
}
Suggestion importance[1-10]: 10

__

Why: The suggestion correctly identifies a critical flaw: the core Gradle build scripts are missing, making the PR incomplete and the described functionality non-existent.

High
General
Correct misleading build performance comment

Correct the misleading comment for org.gradle.configureondemand=false to
accurately reflect that it disables a performance feature for stability, rather
than enabling one.

gradle.properties [15-16]

-# Build performance
+# Disable configure-on-demand for build stability, as it's an incubating feature.
+# This is the default, but we set it explicitly to ensure consistent behavior.
 org.gradle.configureondemand=false
Suggestion importance[1-10]: 4

__

Why: The suggestion correctly identifies that the comment # Build performance is misleading for org.gradle.configureondemand=false, as this setting disables a performance feature, and the proposed change improves clarity.

Low

@qodo-merge-pro
Copy link

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Clarity

The README mandates using a system Gradle and discourages the wrapper, but does not specify the minimum verified Gradle version in the README itself; consider mirroring the "Gradle 7.0+" requirement from gradle.properties to prevent confusion.

Prerequisites:
- Java 8+
- Gradle (system Gradle only; do not use Gradle wrapper in this repository)
- 7-Zip installed and available in PATH or via `7Z_HOME` when using `bundle.format=7z`
Env Var Docs

The docs mention 7Z_HOME for 7-Zip; on non-Windows systems the executable name/path may differ. Consider documenting expected binaries and example paths per OS or clarifying if Windows-only.

Notes:
- Place source bundles under `bin/` as directories named like `perl5.40.0` (or in `bin/archived/`). The build will package these and produce checksums (MD5, SHA1, SHA256, SHA512).
- When `bundle.format` is `7z`, ensure 7-Zip is installed. You can set `7Z_HOME` to the folder containing `7z.exe`.
 - The produced 7z/zip preserves the version folder as the archive root (e.g., `perl5.40.0/…`).
Memory Settings

The fixed JVM args (-Xmx2g, MaxMetaspaceSize=512m) may be high for CI or low-memory dev machines; consider making them configurable via environment variables or commenting guidance.

# JVM settings for Gradle
org.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError

# Configure console output
org.gradle.console=auto
org.gradle.warning.mode=all

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants