Skip to content

Commit 3f3bd46

Browse files
committed
use JAVA_HOME in ci-verify script
1 parent 35540c4 commit 3f3bd46

File tree

8 files changed

+10
-69
lines changed

8 files changed

+10
-69
lines changed

Plugins/JExtractSwiftCommandPlugin/JExtractSwiftCommandPlugin.swift

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//---------------------------------------------===-------------------------===//
1+
//===----------------------------------------------------------------------===//
22
//
33
// This source file is part of the Swift.org open source project
44
//
@@ -10,7 +10,7 @@
1010
//
1111
// SPDX-License-Identifier: Apache-2.0
1212
//
13-
//---------------------------------------------===-------------------------===//
13+
//===----------------------------------------------------------------------===//
1414

1515
import Foundation
1616
import PackagePlugin
@@ -32,13 +32,11 @@ final class JExtractSwiftCommandPlugin: SwiftJavaPluginProtocol, BuildToolPlugin
3232
var buildOutputs: Bool = true
3333

3434
func createBuildCommands(context: PluginContext, target: any Target) async throws -> [Command] {
35-
print("JEXTRACT COMMAND CREATE BUILD COMMANDS ================================")
3635
// FIXME: This is not a build plugin but SwiftPM forces us to impleme the protocol anyway? rdar://139556637
3736
return []
3837
}
3938

4039
func performCommand(context: PluginContext, arguments: [String]) throws {
41-
print("JEXTRACT COMMAND ================================")
4240
// Plugin can't have dependencies, so we have some naive argument parsing instead:
4341
self.verbose = arguments.contains("-v") || arguments.contains("--verbose")
4442

Plugins/Java2SwiftPlugin/Java2SwiftPlugin.swift

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//---------------------------------------------===-------------------------===//
1+
//===----------------------------------------------------------------------===//
22
//
33
// This source file is part of the Swift.org open source project
44
//
@@ -10,7 +10,7 @@
1010
//
1111
// SPDX-License-Identifier: Apache-2.0
1212
//
13-
//---------------------------------------------===-------------------------===//
13+
//===----------------------------------------------------------------------===//
1414

1515
import Foundation
1616
import PackagePlugin
@@ -24,15 +24,8 @@ struct Java2SwiftBuildToolPlugin: SwiftJavaPluginProtocol, BuildToolPlugin {
2424
var verbose: Bool = getEnvironmentBool("SWIFT_JAVA_VERBOSE")
2525

2626
func createBuildCommands(context: PluginContext, target: Target) throws -> [Command] {
27-
print("JAVA2Swift ================================")
28-
print("JAVA2Swift ================================")
29-
print("JAVA2Swift ================================")
30-
print("JAVA2Swift ================================")
31-
print("JAVA2Swift ================================")
32-
3327
guard let sourceModule = target.sourceModule else { return [] }
3428

35-
3629
// Note: Target doesn't have a directoryURL counterpart to directory,
3730
// so we cannot eliminate this deprecation warning.
3831
let sourceDir = target.directory.string

Plugins/JavaCompilerPlugin/JavaCompilerPlugin.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import PackagePlugin
1818
@main
1919
struct JavaCompilerBuildToolPlugin: BuildToolPlugin {
2020
func createBuildCommands(context: PluginContext, target: Target) throws -> [Command] {
21-
print("COMPILER PLUGIN ================================")
2221
guard let sourceModule = target.sourceModule else { return [] }
2322

2423
// Collect all of the Java source files within this target's sources.

Plugins/PluginsShared/Configuration.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//---------------------------------------------===-------------------------===//
1+
//===----------------------------------------------------------------------===//
22
//
33
// This source file is part of the Swift.org open source project
44
//
@@ -10,7 +10,7 @@
1010
//
1111
// SPDX-License-Identifier: Apache-2.0
1212
//
13-
//---------------------------------------------===-------------------------===//
13+
//===----------------------------------------------------------------------===//
1414

1515
import Foundation
1616

Plugins/SwiftJavaPlugin/JExtractSwiftPlugin.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ struct JExtractSwiftBuildToolPlugin: SwiftJavaPluginProtocol, BuildToolPlugin {
2222
var verbose: Bool = getEnvironmentBool("SWIFT_JAVA_VERBOSE")
2323

2424
func createBuildCommands(context: PluginContext, target: Target) throws -> [Command] {
25-
print("JEXTRACT BUILD COMMANDS PLAIN PLUGIN ================================")
2625
let toolURL = try context.tool(named: "JExtractSwiftTool").url
2726

2827
guard let sourceModule = target.sourceModule else { return [] }
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
#!/bin/sh
22

33
swift build
4-
java -cp .build/plugins/outputs/javakitsampleapp/JavaKitExample/destination/JavaCompilerPlugin/Java -Djava.library.path=.build/debug com.example.swift.JavaKitSampleMain
4+
"$JAVA_HOME/bin/java" \
5+
-cp .build/plugins/outputs/javakitsampleapp/JavaKitExample/destination/JavaCompilerPlugin/Java \
6+
-Djava.library.path=.build/debug \
7+
"com.example.swift.JavaKitSampleMain"

swift-java-plugin/build.gradle.kts

Lines changed: 0 additions & 38 deletions
This file was deleted.

swift-java-plugin/src/main/kotlin/org/swift/swiftjava/gradle/SwiftJavaPlugin.kts

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)