From 8d4232c9b1ac4850862568dcaf93c4db2863c46a Mon Sep 17 00:00:00 2001 From: Tony Germano Date: Sat, 17 Oct 2026 05:18:14 -0400 Subject: [PATCH] Use Gradle's default javac source path and processor settings The compile tasks pointed -sourcepath at the source directories and used the compile classpath as the annotation processor path. Neither is needed, and running every processor found on the classpath becomes a liability once dependency resolution turns transitive: any newly arrived jar that ships a processor would start running. The only processors on any classpath today are log4j-core's (PluginProcessor, GraalVmProcessor; no other resolved or vendored jar ships a META-INF/services/javax.annotation.processing.Processor), and no source uses @Plugin, so they generated nothing. Drop both overrides and let Gradle pass -proc:none with its own (empty) source path. As a side benefit, log4j-core's processors are not registered as incremental, so every change forced a full recompile of the module; incremental compilation now works. Removing -sourcepath cannot change what is compiled: every source file is passed to javac explicitly, and the only file a source-set exclude hides (generator's HL7ModelGeneratorTest under **/test/**) is referenced by nothing. Effect on the distribution, checked with oie-build-parity's compare_builds.py against a build of the parent commit (both built with clean build dist -PdisableSigning=true): - 711 files on both sides, same file set; 699 byte-identical; 478 of 490 jars/zips have identical entry contents. - 34 entries differ, 24 distinct classes in 12 jars, all anonymous inner classes: client-lib/mirth-client.jar (12) ChannelPanel$GroupAssignmentDialog$1, ChannelSetup$25, CustomAttachmentDialog$2, RegexAttachmentDialog$1/$3, MessageBrowserAdvancedFilter$1/$3, MirthPropertiesTable$1, BaseEditorPane$NameEditor$1, SourceSettingsPanel$1/$2, org.fife.ui.rtextarea.RTextArea$1 {server,client,cli}-lib/mirth-client-core.jar MirthMapperWrapper$1, net.lingala.zip4j.unzip.Unzip$1/$2 server-lib/mirth-server.jar: MirthMapperWrapper$1 {client,cli}-lib/donkey-model.jar, server-lib/donkey/donkey-model.jar, server-lib/donkey/donkey-server.jar: XStreamSerializer$1 extensions/http/http-client.jar: HttpListener$1, HttpSender$5/$7 extensions/smtp/smtp-client.jar: SmtpSender$1/$3 extensions/tcp/tcp-server.jar: TcpDispatcher$1/$2, TcpReceiver$1 compare_builds.py reports these as real differences (exit 1) because it treats any class content change as real. - For all 34 entries, javap -c -p -s output (bytecode, signatures, flags) is identical. The javap -v diff contains only Utf8 constants and LocalVariableTable rows: the anonymous class constructor's parameters, which javac copies from the superclass constructor (data, columnNames, name, wrapped, ...) while annotation processing is enabled, are now named arg0..N. The LocalVariableTable is debug information only. No -parameters flag is used, so no MethodParameters attribute is emitted either way and reflection (Parameter.getName) is unaffected; the default serialVersionUID computation does not include it. The only visible change is debugger variable names in those constructors. Also drop CONTRIBUTING.md's parenthetical claiming the parity tooling reproduces a byte-identical comparison, which no longer holds. Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Tony Germano --- CONTRIBUTING.md | 3 +-- build.gradle | 12 ------------ 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 17ec55d4ca..d139d181f2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -51,8 +51,7 @@ tests of the build scripts. When you change build logic (staging, packaging, jar definitions), confirm the change does not alter the product: build `server/setup` before and after, and compare the two trees. The [oie-build-parity](https://github.com/pacmano1/oie-build-parity) -tooling does this at the archive-entry level (and can reproduce the -original byte-identical comparison against the pre-Gradle Ant baseline). +tooling does this at the archive-entry level. Only the changes you intended should appear. ### Run and debug diff --git a/build.gradle b/build.gradle index 83d7e13a66..d355209929 100644 --- a/build.gradle +++ b/build.gradle @@ -179,18 +179,6 @@ subprojects { options.encoding = 'UTF-8' options.debug = true } - // Match Ant's javac invocation: -sourcepath defaults to srcdir, and - // annotation processors are discovered on the compile classpath - // (Gradle would otherwise pass -proc:none, which also changes the - // parameter-name metadata javac records for anonymous classes). - compileJava { - options.sourcepath = sourceSets.main.java.sourceDirectories - options.annotationProcessorPath = configurations.compileClasspath - } - compileTestJava { - options.sourcepath = sourceSets.test.java.sourceDirectories - options.annotationProcessorPath = configurations.testCompileClasspath - } // Legacy modules assemble their published archives explicitly. // Newer modules use Gradle's normal JAR convention.