Skip to content

Commit 850225a

Browse files
committed
rename SwiftKitSwift
1 parent d8db270 commit 850225a

File tree

9 files changed

+25
-25
lines changed

9 files changed

+25
-25
lines changed

Package.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,9 @@ let package = Package(
169169

170170
// Support library written in Swift for SwiftKit "Java"
171171
.library(
172-
name: "SwiftKitSwift",
172+
name: "SwiftJavaRuntimeSupport",
173173
type: .dynamic,
174-
targets: ["SwiftKitSwift"]
174+
targets: ["SwiftJavaRuntimeSupport"]
175175
),
176176

177177
.library(
@@ -213,7 +213,7 @@ let package = Package(
213213
name: "SwiftJavaDocumentation",
214214
dependencies: [
215215
"SwiftJava",
216-
"SwiftKitSwift",
216+
"SwiftJavaRuntimeSupport",
217217
]
218218
),
219219

@@ -351,7 +351,7 @@ let package = Package(
351351
]
352352
),
353353
.target(
354-
name: "SwiftKitSwift",
354+
name: "SwiftJavaRuntimeSupport",
355355
dependencies: [],
356356
swiftSettings: [
357357
.swiftLanguageMode(.v5),

Sources/JExtractSwiftLib/FFM/FFMSwift2JavaGenerator+SwiftThunkPrinting.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ extension FFMSwift2JavaGenerator {
108108
"""
109109
// Generated by swift-java
110110
111-
import SwiftKitSwift
111+
import SwiftJavaRuntimeSupport
112112
113113
""")
114114

@@ -136,7 +136,7 @@ extension FFMSwift2JavaGenerator {
136136
"""
137137
// Generated by swift-java
138138
139-
import SwiftKitSwift
139+
import SwiftJavaRuntimeSupport
140140
141141
"""
142142
)

Sources/JExtractSwiftLib/FFM/FFMSwift2JavaGenerator.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ extension FFMSwift2JavaGenerator {
189189
private static final boolean INITIALIZED_LIBS = initializeLibs();
190190
static boolean initializeLibs() {
191191
System.loadLibrary(SwiftLibraries.LIB_NAME_SWIFT_CORE);
192-
System.loadLibrary(SwiftLibraries.LIB_NAME_SWIFTKITSWIFT);
192+
System.loadLibrary(SwiftLibraries.LIB_NAME_SWIFT_JAVA_RUNTIME_SUPPORT);
193193
System.loadLibrary(LIB_NAME);
194194
return true;
195195
}
@@ -339,7 +339,7 @@ extension FFMSwift2JavaGenerator {
339339
private static SymbolLookup getSymbolLookup() {
340340
if (SwiftLibraries.AUTO_LOAD_LIBS) {
341341
System.loadLibrary(SwiftLibraries.LIB_NAME_SWIFT_CORE);
342-
System.loadLibrary(SwiftLibraries.LIB_NAME_SWIFTKITSWIFT);
342+
System.loadLibrary(SwiftLibraries.LIB_NAME_SWIFT_JAVA_RUNTIME_SUPPORT);
343343
System.loadLibrary(LIB_NAME);
344344
}
345345

Sources/SwiftJava/Helpers/_Semaphore.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import wasi_pthread
3030
#endif
3131

3232
public final class _Semaphore: @unchecked Sendable {
33-
#if canImport(Darwin)
33+
#if canImport(Dispatch)
3434
private let sem: DispatchSemaphore
3535
#elseif (compiler(<6.1) && !os(WASI)) || (compiler(>=6.1) && _runtime(_multithreaded))
3636
private let sem: UnsafeMutablePointer<sem_t> = UnsafeMutablePointer.allocate(capacity: 1)

SwiftKitCore/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,18 +73,18 @@ tasks.test {
7373
}
7474
}
7575

76-
// SwiftKit depends on SwiftKitSwift (Swift library that this Java library calls into)
76+
// SwiftKit depends on SwiftJavaRuntimeSupport (Swift library that this Java library calls into)
7777

7878
def compileSwift = tasks.register("compileSwift", Exec) {
79-
description "Compile the swift-java SwiftKitSwift dynamic library that SwiftKit (Java) calls into"
79+
description "Compile the swift-java SwiftJavaRuntimeSupport dynamic library that SwiftKit (Java) calls into"
8080

8181
inputs.file(new File(rootDir, "Package.swift"))
8282
inputs.dir(new File(rootDir, "Sources/")) // a bit generous, but better safe than sorry, and include all Swift source changes
8383
outputs.dir(new File(rootDir, ".build"))
8484

8585
workingDir = rootDir
8686
commandLine "swift"
87-
args("build", "--target", "SwiftKitSwift")
87+
args("build", "--target", "SwiftJavaRuntimeSupport")
8888
}
8989
tasks.build {
9090
dependsOn("compileSwift")

SwiftKitCore/src/main/java/org/swift/swiftkit/core/SwiftLibraries.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public final class SwiftLibraries {
2727
// Library names of core Swift and SwiftKit
2828
public static final String LIB_NAME_SWIFT_CORE = "swiftCore";
2929
public static final String LIB_NAME_SWIFT_CONCURRENCY = "swift_Concurrency";
30-
public static final String LIB_NAME_SWIFTKITSWIFT = "SwiftKitSwift";
30+
public static final String LIB_NAME_SWIFT_JAVA_RUNTIME_SUPPORT = "SwiftJavaRuntimeSupport";
3131

3232
/**
3333
* Allows for configuration if jextracted types should automatically attempt to load swiftCore and the library type is from.
@@ -42,10 +42,10 @@ public final class SwiftLibraries {
4242
@SuppressWarnings("unused")
4343
private static final boolean INITIALIZED_LIBS = loadLibraries(false);
4444

45-
public static boolean loadLibraries(boolean loadSwiftKit) {
46-
System.loadLibrary(LIB_NAME_SWIFTKITSWIFT);
47-
if (loadSwiftKit) {
48-
System.loadLibrary(LIB_NAME_SWIFTKITSWIFT);
45+
public static boolean loadLibraries(boolean loadSwiftJavaRuntimeSupport) {
46+
System.loadLibrary(LIB_NAME_SWIFT_JAVA_RUNTIME_SUPPORT);
47+
if (loadSwiftJavaRuntimeSupport) {
48+
System.loadLibrary(LIB_NAME_SWIFT_JAVA_RUNTIME_SUPPORT);
4949
}
5050
return true;
5151
}

SwiftKitFFM/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,18 +75,18 @@ tasks.withType(JavaCompile).configureEach {
7575
options.compilerArgs.add("-Xlint:preview")
7676
}
7777

78-
// SwiftKit depends on SwiftKitSwift (Swift library that this Java library calls into)
78+
// SwiftKit depends on SwiftJavaRuntimeSupport (Swift library that this Java library calls into)
7979

8080
def compileSwift = tasks.register("compileSwift", Exec) {
81-
description "Compile the swift-java SwiftKitSwift dynamic library that SwiftKit (Java) calls into"
81+
description "Compile the swift-java SwiftJavaRuntimeSupport dynamic library that SwiftKit (Java) calls into"
8282

8383
inputs.file(new File(rootDir, "Package.swift"))
8484
inputs.dir(new File(rootDir, "Sources/")) // a bit generous, but better safe than sorry, and include all Swift source changes
8585
outputs.dir(new File(rootDir, ".build"))
8686

8787
workingDir = rootDir
8888
commandLine "swift"
89-
args("build", "--target", "SwiftKitSwift")
89+
args("build", "--target", "SwiftJavaRuntimeSupport")
9090
}
9191
tasks.build {
9292
dependsOn("compileSwift")

SwiftKitFFM/src/main/java/org/swift/swiftkit/ffm/SwiftRuntime.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
public class SwiftRuntime {
3434

3535
public static final String STDLIB_DYLIB_NAME = "swiftCore";
36-
public static final String SWIFTKITSWIFT_DYLIB_NAME = "SwiftKitSwift";
36+
public static final String SWIFT_JAVA_RUNTIME_SUPPORT_DYLIB_NAME = "SwiftJavaRuntimeSupport";
3737

3838
private static final String STDLIB_MACOS_DYLIB_PATH = "/usr/lib/swift/libswiftCore.dylib";
3939

@@ -42,10 +42,10 @@ public class SwiftRuntime {
4242
@SuppressWarnings("unused")
4343
private static final boolean INITIALIZED_LIBS = loadLibraries(false);
4444

45-
public static boolean loadLibraries(boolean loadSwiftKit) {
45+
public static boolean loadLibraries(boolean loadSwiftJavaRuntimeSupport) {
4646
System.loadLibrary(STDLIB_DYLIB_NAME);
47-
if (loadSwiftKit) {
48-
System.loadLibrary(SWIFTKITSWIFT_DYLIB_NAME);
47+
if (loadSwiftJavaRuntimeSupport) {
48+
System.loadLibrary(SWIFT_JAVA_RUNTIME_SUPPORT_DYLIB_NAME);
4949
}
5050
return true;
5151
}
@@ -487,4 +487,4 @@ boolean isEnabled() {
487487
}
488488
throw new IllegalArgumentException("Not handled log group: " + this);
489489
}
490-
}
490+
}

0 commit comments

Comments
 (0)