Skip to content

Commit 24c96f5

Browse files
committed
Replace the Ant build with Gradle
Native Gradle 8.14.1 build (wrapper committed, distribution checksum pinned): same artifacts, same locations. server/setup is the assembled distribution, server/dist the extension zips. The Ant build files are replaced by tombstones pointing at ./gradlew; Eclipse project files are retired in favor of native IDE Gradle import. CI builds with gradle/actions/setup-gradle (wrapper validation, SHA-pinned action) and the Dockerfile builds with the wrapper. Cross-project staging uses per-project artifact inventories (Gradle-9-safe; no cross-project configuration resolution, no exec(Closure); --warning-mode all carries no Gradle-9-fatal classes). Output parity with the Ant build was verified archive-by-archive; evidence and tooling arrive with the dependency commit. Note: this commit references the version catalog introduced by the next commit and does not build standalone; the branch head does. The .gitattributes line-ending rules follow PR #214 by NicoPiel. Refs #52, #214 Signed-off-by: Finnegan's Owner <44065187+pacmano1@users.noreply.github.com>
1 parent 8a2dc59 commit 24c96f5

49 files changed

Lines changed: 2107 additions & 3639 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitattributes

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Line-ending rules for files where endings are functional.
2+
# (Pattern follows PR #214 by NicoPiel.)
3+
4+
# Unix start scripts must stay LF
5+
/gradlew text eol=lf
6+
oieserver text eol=lf
7+
configure-from-env text eol=lf
8+
9+
# Windows scripts must stay CRLF
10+
*.bat text eol=crlf
11+
12+
# Binary files are left untouched
13+
*.jar binary

.github/workflows/build.yaml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,18 @@ jobs:
3232
java-package: 'jdk+fx'
3333
distribution: 'zulu'
3434

35+
- name: Set up Gradle
36+
uses: gradle/actions/setup-gradle@ed408507eac070d1f99cc633dbcf757c94c7933a # v4.4.3
37+
with:
38+
validate-wrappers: true
39+
3540
- name: Build OIE (signed)
3641
if: github.ref == 'refs/heads/main'
37-
working-directory: server
38-
run: ant -f mirth-build.xml
42+
run: ./gradlew build
3943

4044
- name: Build OIE (unsigned)
4145
if: github.ref != 'refs/heads/main'
42-
working-directory: server
43-
run: ant -f mirth-build.xml -DdisableSigning=true -Dcoverage=true
46+
run: ./gradlew build -PdisableSigning=true -Pcoverage=true
4447

4548
- name: Package distribution
4649
run: tar czf openintegrationengine.tar.gz -C server/ setup --transform 's|^setup|openintegrationengine/|'

.gitignore

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ donkey/donkey-test
178178
# /client/src/com/mirth/connect/client/ui/panels/reference/
179179

180180
# /client/src/com/mirth/connect/client/ui/util/
181-
/client/src/com/mirth/connect/client/ui/util/DocParser.java
181+
/client/src/main/java/com/mirth/connect/client/ui/util/DocParser.java
182182

183183
# /client/src/com/mirth/connect/connectors/
184184

@@ -205,7 +205,7 @@ donkey/donkey-test
205205
# /client/src/com/mirth/connect/connectors/ws/
206206

207207
# /client/src/com/mirth/connect/plugins/
208-
/client/src/com/mirth/connect/plugins/sampledashboardcolumn
208+
/client/src/main/java/com/mirth/connect/plugins/sampledashboardcolumn
209209

210210
# /client/src/com/mirth/connect/plugins/dashboardstatus/
211211

@@ -554,14 +554,14 @@ donkey/donkey-test
554554
# /server/src/com/mirth/connect/model/util/
555555

556556
# /server/src/com/mirth/connect/plugins/
557-
/server/src/com/mirth/connect/plugins/Graphical Mapper Transformer Step.xml
558-
/server/src/com/mirth/connect/plugins/consoleconnectorstatus
559-
/server/src/com/mirth/connect/plugins/Console Connector Status Monitor Plugin.xml
560-
/server/src/com/mirth/connect/plugins/extendedhl7vocab
561-
/server/src/com/mirth/connect/plugins/Extended HL7 Vocabulary.xml
562-
/server/src/com/mirth/connect/plugins/Sample Dashboard Column Plugin.xml
563-
/server/src/com/mirth/connect/plugins/ExtensionParser.xml
564-
/server/src/com/mirth/connect/plugins/ExtensionRepositoryParser.java
557+
/server/src/main/resources/com/mirth/connect/plugins/Graphical Mapper Transformer Step.xml
558+
/server/src/main/java/com/mirth/connect/plugins/consoleconnectorstatus
559+
/server/src/main/resources/com/mirth/connect/plugins/Console Connector Status Monitor Plugin.xml
560+
/server/src/main/java/com/mirth/connect/plugins/extendedhl7vocab
561+
/server/src/main/resources/com/mirth/connect/plugins/Extended HL7 Vocabulary.xml
562+
/server/src/main/resources/com/mirth/connect/plugins/Sample Dashboard Column Plugin.xml
563+
/server/src/main/resources/com/mirth/connect/plugins/ExtensionParser.xml
564+
/server/src/main/java/com/mirth/connect/plugins/ExtensionRepositoryParser.java
565565

566566
# /server/src/com/mirth/connect/plugins/dashboardstatus/
567567

@@ -612,7 +612,7 @@ donkey/donkey-test
612612
# /server/src/com/mirth/connect/server/
613613

614614
# /server/src/com/mirth/connect/server/builders/
615-
/server/src/com/mirth/connect/server/builders/VocalEZParser.java
615+
/server/src/main/java/com/mirth/connect/server/builders/VocalEZParser.java
616616

617617
# /server/src/com/mirth/connect/server/controllers/
618618

@@ -635,7 +635,7 @@ donkey/donkey-test
635635
# /server/src/com/mirth/connect/server/util/javascript/
636636

637637
# /server/src/com/mirth/connect/util/
638-
/server/src/com/mirth/connect/util/GenerateExtensionUpdate.java
638+
/server/src/main/java/com/mirth/connect/util/GenerateExtensionUpdate.java
639639

640640
# /server/src/org/
641641

@@ -650,3 +650,6 @@ donkey/donkey-test
650650
# /server/src/org/mozilla/javascript/
651651

652652
# /server/src/org/mozilla/javascript/xmlimpl/
653+
server/setup.tar.gz
654+
dependency-check-report.html
655+
dependency-check-report.json

.sdkmanrc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
# Enable auto-env through the sdkman_auto_env config
22
# Add key=value pairs of SDKs to use below
33
java=17.0.17.fx-zulu
4-
ant=1.10.14

CONTRIBUTING.md

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,30 @@ git checkout -b feature/your-feature-name
2626
```
2727

2828
### 5. Install Tooling
29-
OIE specifies the working versions of Java and Ant in [.sdkmanrc](./.sdkmanrc). To take advantage of this, install [SDKMAN](https://sdkman.io/) and run `sdk env install`
30-
in the project's root directory.
29+
OIE specifies the working Java version in [.sdkmanrc](./.sdkmanrc). To take advantage of this, install [SDKMAN](https://sdkman.io/) and run `sdk env install`
30+
in the project's root directory. No other tooling is required.
31+
32+
### 5a. Build
33+
The build is driven by Gradle through the included wrapper; no separate Gradle install is needed:
34+
```bash
35+
./gradlew build -PdisableSigning=true # full build without jar signing
36+
./gradlew test # run the unit tests (-Pcoverage=true for JaCoCo)
37+
./gradlew dist # build the distribution extension zips
38+
```
39+
On Windows use `gradlew.bat` instead of `./gradlew`. The assembled distribution lands in `server/setup`, the same location the previous Ant build used. For release artifacts, run a clean build: `./gradlew clean build dist`.
40+
41+
Dependencies are pinned and checksum-verified. To change a dependency version: edit `gradle/libs.versions.toml`, then run `./gradlew --write-verification-metadata sha256 help` to refresh the checksum metadata. Only when adding a **new** artifact that ships in the distribution does `gradle/vendored-layout.json` need a one-line placement entry, and the build fails with a message telling you so.
42+
43+
### Run and debug
44+
45+
```bash
46+
./gradlew :server:createDerbyDb # one-time: create the embedded database
47+
./gradlew :server:devRun # run the server from the development tree
48+
./gradlew :server:devLauncher # run the server the way production starts it (from server/setup)
49+
./gradlew :client:devClient # run the administrator client against https://localhost:8443
50+
```
51+
52+
Add `--debug-jvm` to any of these to suspend on JVM start and attach a debugger on port 5005. The JDK module flags come from `server/conf/default_modules.vmoptions`, the same file the production launcher uses. For IDEs, import the repository as a Gradle project (IntelliJ does this natively; Eclipse via Buildship); the old `.classpath`/`.project` files are gone on purpose.
3153

3254
### 6. Implement your changes
3355

Dockerfile

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ FROM ubuntu:noble-20251013 AS builder
1313
WORKDIR /app
1414
# sdkman requires bash
1515
SHELL ["/bin/bash", "-c"]
16-
ARG ANT_BUILD_ARGS="-DdisableSigning=true"
16+
ARG GRADLE_BUILD_ARGS="-PdisableSigning=true"
1717

1818
# Stage 1a: Install dependencies
1919
# Install necessary tools
@@ -26,10 +26,12 @@ RUN apt-get update\
2626

2727
# Stage 1b: Build the application
2828
# Copy the entire source tree (excluding .dockerignore files), and build
29+
# (file encoding is pinned to UTF-8 in gradle.properties)
2930
COPY . .
30-
WORKDIR /app/server
31-
RUN source "$HOME/.sdkman/bin/sdkman-init.sh" \
32-
&& ANT_OPTS="-Dfile.encoding=UTF8" ant -f mirth-build.xml ${ANT_BUILD_ARGS}
31+
RUN --mount=type=cache,target=/root/.gradle/caches,sharing=locked \
32+
--mount=type=cache,target=/root/.gradle/wrapper,sharing=locked \
33+
source "$HOME/.sdkman/bin/sdkman-init.sh" \
34+
&& ./gradlew --no-daemon build ${GRADLE_BUILD_ARGS}
3335

3436
##########################################
3537
#

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
- [Why Open Integration Engine?](#why-open-integration-engine)
1414
- [Core Features](#core-features)
1515
- [Who It’s For](#who-its-for)
16+
- [Building from Source](#building-from-source)
1617
- [Project Values](#project-values)
1718
- [Community and Governance](#community-and-governance)
1819
- [History and Roadmap](#history-and-roadmap)
@@ -70,6 +71,19 @@ The **Open Integration Engine Project** is an open-source initiative committed t
7071

7172
---
7273

74+
## Building from Source
75+
76+
The build is driven by Gradle through the committed wrapper; the only prerequisite is JDK 17 (see [.sdkmanrc](.sdkmanrc)):
77+
78+
```bash
79+
./gradlew build # full build + tests; distribution lands in server/setup
80+
./gradlew clean build dist # release form, plus extension zips in server/dist
81+
```
82+
83+
On Windows use `gradlew.bat`. See [CONTRIBUTING.md](CONTRIBUTING.md) for the full command reference, the dependency policy, and how to run the server for development.
84+
85+
---
86+
7387
## Project Values
7488

7589
- **Community-Driven Development** – Innovation through global collaboration

0 commit comments

Comments
 (0)