Skip to content

Conversation

@NicoPiel
Copy link
Collaborator

@NicoPiel NicoPiel commented Dec 1, 2025

Adds an initial Gradle build system that delegates to the existing Ant build to enable gradual migration and tooling improvements.

Highlights:

  • Introduces a root Gradle configuration that imports and delegates to the project's Ant build targets, avoiding immediate rewrite of existing build logic.
  • Adds the Gradle wrapper and supporting files (wrapper properties, jar, and scripts) so the repository can be built consistently without requiring a local Gradle install.
  • Adds per-subproject Gradle stub files to make the repository a multi-project Gradle layout and allow incremental conversion of subprojects.
  • Adds Gradle metadata/configuration (gradle.properties, dependency platform TOML) and updates SDKMAN settings to include a Gradle version for reproducible developer environments.
  • Adds .gitattributes and .gitignore tweaks and normalizes an IDE classpath file to remove trailing encoding differences.
  • Configures Ant-to-Gradle interoperability (ant taskdefs and properties) and maps Ant targets to avoid conflicts with Gradle built-in tasks.

Why:

  • Allows us to start using Gradle tooling and the wrapper for builds, CI, and IDEs while preserving the working Ant build.
  • Supports incremental migration of subprojects to Gradle without disrupting existing build behavior.

Notes / Next steps:

  • Subprojects remain backed by the Ant build; plan incremental conversion of individual modules to native Gradle builds.
  • Verify CI pipelines and developer SDK setups pick up the wrapper and SDKMAN gradle setting.

@NicoPiel NicoPiel force-pushed the feature/gradle-build-ant branch 2 times, most recently from 6a6e3c7 to ddf0ada Compare December 1, 2025 15:00
Copy link
Contributor

@mgaffigan mgaffigan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other issues to address

  • CI build scripts need updated (.github/workflow/...)
  • Readme/Contributor documents need updated
  • ant mirth-build build target needs to be updated to block build outside of gradle with migration guidance in error message

Comment on lines +46 to +53
// Pass Gradle properties to Ant
project.findProperty("disableSigning")?.let {
ant.properties["disableSigning"] = it.toString()
}

project.findProperty("disableTests")?.let {
ant.properties["disableTests"] = it.toString()
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are there other properties we need to be passing?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question. I'm not sure. These are the only two I use and the only two available in mirth-build.xml, afaia.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know JUnit supports some properties for running specific tests instead of the whole suite, but I doubt anyone actually uses that. I have in the past, but I would need to look them up to even identify what they are called, because it's not something I do frequently. I wouldn't hold up this PR for that.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

9adf3f3

This commit added disableSigning as well as cert and keystore_property_file

NicoPiel and others added 5 commits December 29, 2025 01:29
Signed-off-by: Nico Piel <nico.piel@hotmail.de>
Signed-off-by: Nico Piel <nico.piel@hotmail.de>
Adds a top-level Gradle build that imports the existing Ant build to enable a gradual migration to Gradle while still using Ant for current tasks. Configures Ant to run JUnit (including ant-junit4) and exposes select Gradle properties to Ant; renames conflicting Ant targets to avoid collisions and makes the Gradle build task delegate to the Ant build target. Also adds placeholder Gradle files for subprojects and bumps the configured Gradle SDK version.

Co-authored-by: Mitch Gaffigan <mitch.gaffigan@comcast.net>
Signed-off-by: Nico Piel <nico.piel@hotmail.de>
Signed-off-by: Nico Piel <nico.piel@hotmail.de>
Signed-off-by: Nico Piel <nico.piel@hotmail.de>
@NicoPiel NicoPiel force-pushed the feature/gradle-build-ant branch 3 times, most recently from 4018468 to 6284f3b Compare December 29, 2025 00:31
Changes the root project name to a lowercase value to avoid case-related build/tooling issues (improves compatibility with Gradle/Ant and CI environments).

Signed-off-by: Nico Piel <nico.piel@hotmail.de>
Comment on lines +46 to +53
// Pass Gradle properties to Ant
project.findProperty("disableSigning")?.let {
ant.properties["disableSigning"] = it.toString()
}

project.findProperty("disableTests")?.let {
ant.properties["disableTests"] = it.toString()
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know JUnit supports some properties for running specific tests instead of the whole suite, but I doubt anyone actually uses that. I have in the past, but I would need to look them up to even identify what they are called, because it's not something I do frequently. I wouldn't hold up this PR for that.

Comment on lines +46 to +53
// Pass Gradle properties to Ant
project.findProperty("disableSigning")?.let {
ant.properties["disableSigning"] = it.toString()
}

project.findProperty("disableTests")?.let {
ant.properties["disableTests"] = it.toString()
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

9adf3f3

This commit added disableSigning as well as cert and keystore_property_file

Signed-off-by: Nico Piel <nico.piel@hotmail.de>
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces Gradle build support to enable gradual migration from the existing Ant-based build system. It adds the Gradle wrapper (version 9.2.1), root and subproject build configurations that delegate to Ant, version catalog management, and updates to supporting files like .gitignore and .gitattributes.

Key Changes:

  • Adds Gradle wrapper scripts and configuration for reproducible builds without requiring local Gradle installation
  • Implements root build configuration that imports the Ant build and provides Ant-to-Gradle interoperability (JUnit taskdefs, property passing)
  • Creates stub subproject build files to establish multi-project structure while preserving Ant build delegation

Reviewed changes

Copilot reviewed 12 out of 16 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
settings.gradle.kts Configures multi-project structure with 5 subprojects and foojay-resolver plugin
build.gradle.kts Root build that imports Ant, configures JUnit tasks, passes properties, and renames conflicting targets
gradlew / gradlew.bat Gradle wrapper shell and batch scripts for cross-platform execution
gradle/wrapper/gradle-wrapper.properties Wrapper configuration specifying Gradle distribution URL and settings
gradle/wrapper/gradle-wrapper.jar Binary wrapper JAR for bootstrapping Gradle
gradle.properties Gradle build optimization settings (configuration cache, parallel, caching)
gradle/libs.versions.toml Version catalog with Guava dependency declaration
client/build.gradle.kts Stub build file with commented Ant import for client subproject
command/build.gradle.kts Stub build file with commented Ant import for command subproject
donkey/build.gradle.kts Stub build file with commented Ant import for donkey subproject
generator/build.gradle.kts Stub build file with commented Ant import for generator subproject
server/build.gradle.kts Stub build file with commented Ant import for server subproject
.gitattributes Adds line ending normalization for gradlew and binary handling for JARs
.gitignore Adds exclusion for Gradle build output directories
.sdkmanrc Formatting adjustment (no functional change)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

# Add key=value pairs of SDKs to use below
java=17.0.17.fx-zulu
ant=1.10.14
ant=1.10.14
Copy link

Copilot AI Dec 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR description states that the SDKMAN settings should include a Gradle version for reproducible developer environments, but no Gradle version has been added to this file. Consider adding a line like "gradle=8.11.1" (or the appropriate version) to ensure developers have a consistent Gradle version installed via SDKMAN.

Copilot uses AI. Check for mistakes.
* This file was generated by the Gradle 'init' task.
*
* The settings file is used to specify which projects to include in your build.
* For more detailed information on multi-project builds, please refer to https://docs.gradle.org/8.14/userguide/multi_project_builds.html in the Gradle documentation.
Copy link

Copilot AI Dec 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment references documentation for Gradle 8.14, but the wrapper is configured to use Gradle 9.2.1 (which doesn't exist). These version references should be consistent and both should reference a valid, existing Gradle version.

Suggested change
* For more detailed information on multi-project builds, please refer to https://docs.gradle.org/8.14/userguide/multi_project_builds.html in the Gradle documentation.
* For more detailed information on multi-project builds, please refer to https://docs.gradle.org/current/userguide/multi_project_builds.html in the Gradle documentation.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants