@@ -22,18 +22,20 @@ import System
2222@preconcurrency import SystemPackage
2323#endif
2424
25- /// Builds Swift-Java callbacks in a single command:
26- /// 1. Building SwiftKitCore with Gradle
27- /// 2. Compiling extracted Java sources with javac
28- /// 3. Running `swift-java configure` to produce a swift-java.config
29- /// 4. Running `swift-java wrap-java` to generate Swift wrappers
30- ///
31- /// This command is used by ``JExtractSwiftPlugin`` to consolidate all of the above
32- /// into a single build command that declares only a Swift file as its output,
33- /// avoiding SPM treating intermediate Java artifacts (compiled classes, config files,
34- /// Gradle output directories) as module resources, which would trigger
35- /// resource_bundle_accessor.swift generation and pull Foundation.Bundle into the binary.
3625extension SwiftJava {
26+ /// Builds Swift-Java callbacks in a single command:
27+ /// 1. Building SwiftKitCore with Gradle
28+ /// 2. Compiling extracted Java sources with javac
29+ /// 3. Running `swift-java configure` to produce a swift-java.config
30+ /// 4. Running `swift-java wrap-java` to generate Swift wrappers
31+ ///
32+ /// **WORKAROUND**: rdar://172649681 if we invoke commands one by one with java outputs SwiftPM will link Foundation
33+ ///
34+ /// This command is used by ``JExtractSwiftPlugin`` to consolidate all of the above
35+ /// into a single build command that declares only a Swift file as its output,
36+ /// avoiding SPM treating intermediate Java artifacts (compiled classes, config files,
37+ /// Gradle output directories) as module resources, which would trigger
38+ /// resource_bundle_accessor.swift generation and pull Foundation.Bundle into the binary.
3739 struct JavaCallbacksBuildCommand : AsyncParsableCommand {
3840
3941 static let configuration = CommandConfiguration (
0 commit comments