File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -26,10 +26,6 @@ struct JExtractSwiftBuildToolPlugin: SwiftJavaPluginProtocol, BuildToolPlugin {
2626 func createBuildCommands( context: PluginContext , target: Target ) throws -> [ Command ] {
2727 let toolURL = try context. tool ( named: " SwiftJavaTool " ) . url
2828
29- // The URL of the compiled Java sources
30- let javaClassFileURL = context. pluginWorkDirectoryURL
31- . appending ( path: " compiled-java-output " )
32-
3329 var commands : [ Command ] = [ ]
3430
3531 guard let sourceModule = target. sourceModule else { return [ ] }
@@ -148,6 +144,15 @@ struct JExtractSwiftBuildToolPlugin: SwiftJavaPluginProtocol, BuildToolPlugin {
148144 )
149145 ]
150146
147+ // If we do not need Java callbacks, we can skip the remaining steps.
148+ guard configuration? . enableJavaCallbacks ?? false else {
149+ return commands
150+ }
151+
152+ // The URL of the compiled Java sources
153+ let javaClassFileURL = context. pluginWorkDirectoryURL
154+ . appending ( path: " compiled-java-output " )
155+
151156 // Build SwiftKitCore and get the classpath
152157 // as the jextracted sources will depend on that
153158
You can’t perform that action at this time.
0 commit comments