Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#
# https://help.github.com/articles/dealing-with-line-endings/
#
# Linux start script should use lf
/gradlew text eol=lf

# These are Windows script files and should use crlf
*.bat text eol=crlf

# Binary files should be left untouched
*.jar binary

6 changes: 2 additions & 4 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,11 @@ jobs:

- name: Build OIE (signed)
if: github.ref == 'refs/heads/main'
working-directory: server
run: ant -f mirth-build.xml
run: ./gradlew build

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

- name: Package distribution
run: tar czf openintegrationengine.tar.gz -C server/ setup --transform 's|^setup|openintegrationengine/|'
Expand Down
2 changes: 1 addition & 1 deletion .sdkmanrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Enable auto-env through the sdkman_auto_env config
# Add key=value pairs of SDKs to use below
java=17.0.17.fx-zulu
ant=1.10.14
ant=1.10.14
85 changes: 85 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
/*
* Root build file
*
* For more detailed information on multi-project builds, please refer to
* https://docs.gradle.org/9.2.1/userguide/multi_project_builds.html
*/

allprojects {
group = "com.mirth.connect"
version = providers.gradleProperty("version").get()
}

subprojects {
repositories {
mavenCentral()
}
}

// Configure Ant to have access to JUnit task

ant.lifecycleLogLevel = AntBuilder.AntMessagePriority.INFO

configurations {
create("antJUnit")
}

dependencies {
// ant-junit4 is required for JUnit 4 annotation support (@Test, etc.)
"antJUnit"("org.apache.ant:ant-junit:1.10.15") {
exclude(group = "junit", module = "junit")
}
"antJUnit"("org.apache.ant:ant-junit4:1.10.15") {
exclude(group = "junit", module = "junit")
}
}

repositories {
mavenCentral()
}

// Make JUnit available to Ant
afterEvaluate {
ant.withGroovyBuilder {
"taskdef"(
"name" to "junit",
"classname" to "org.apache.tools.ant.taskdefs.optional.junit.JUnitTask",
"classpath" to configurations["antJUnit"].asPath
)
"taskdef"(
"name" to "junitreport",
"classname" to "org.apache.tools.ant.taskdefs.optional.junit.XMLResultAggregator",
"classpath" to configurations["antJUnit"].asPath
)
}
}

// Pass Gradle properties to Ant
project.findProperty("disableSigning")?.let {
ant.properties["disableSigning"] = it.toString()
}

project.findProperty("disableTests")?.let {
ant.properties["disableTests"] = it.toString()
}
Comment on lines +57 to +64
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


project.findProperty("coverage")?.let {
ant.properties["coverage"] = it.toString()
}

// Import existing Ant build for gradual migration
ant.importBuild("server/mirth-build.xml") { antTargetName ->
// Rename conflicting Ant targets to avoid collision with Gradle built-in tasks
when (antTargetName) {
"init" -> "ant-init"
"build" -> "ant-build"
else -> antTargetName
}
}

// Make the default Gradle build task delegate to Ant's build target
tasks.register("build") {
dependsOn("ant-build")
group = "build"
description = "Builds the project using Ant (delegated)"
}
434 changes: 217 additions & 217 deletions client/.classpath

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions client/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// ant.importBuild("ant-build.xml")
1 change: 1 addition & 0 deletions command/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// ant.importBuild("build.xml")
1 change: 1 addition & 0 deletions donkey/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// ant.importBuild("build.xml")
1 change: 1 addition & 0 deletions generator/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// ant.importBuild("build.xml")
10 changes: 10 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# This file was generated by the Gradle 'init' task.
# https://docs.gradle.org/current/userguide/build_environment.html#sec:gradle_configuration_properties

org.gradle.configuration-cache=true
org.gradle.parallel=true
org.gradle.caching=true

version=4.5.2
archiveEntryDate=1999-01-01T00:00:00.000Z

8 changes: 8 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# This file was generated by the Gradle 'init' task.
# https://docs.gradle.org/current/userguide/platforms.html#sub::toml-dependencies-format

[versions]
guava = "33.4.5-jre"

[libraries]
guava = { module = "com.google.guava:guava", version.ref = "guava" }
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
7 changes: 7 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-all.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading
Loading