Skip to content

Commit 47aaa01

Browse files
authored
Merge branch 'main' into wip-jextract-plugin
2 parents 354ea56 + 3436f46 commit 47aaa01

File tree

71 files changed

+2100
-2789
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+2100
-2789
lines changed

Package.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,6 @@ let package = Package(
147147
dependencies: [
148148
.package(url: "https://github.com/swiftlang/swift-syntax.git", branch: "main"),
149149
.package(url: "https://github.com/apple/swift-argument-parser", from: "1.5.0"),
150-
.package(url: "https://github.com/apple/swift-collections.git", .upToNextMinor(from: "1.1.0")),
151150
.package(url: "https://github.com/ordo-one/package-benchmark", .upToNextMajor(from: "1.4.0")),
152151
],
153152
targets: [
@@ -318,7 +317,6 @@ let package = Package(
318317
.product(name: "SwiftSyntax", package: "swift-syntax"),
319318
.product(name: "SwiftSyntaxBuilder", package: "swift-syntax"),
320319
.product(name: "ArgumentParser", package: "swift-argument-parser"),
321-
.product(name: "Collections", package: "swift-collections"),
322320
"JavaTypes",
323321
],
324322
swiftSettings: [

Samples/JavaKitSampleApp/Sources/JavaKitExample/JavaKitExample.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ extension HelloSwift: HelloSwiftNativeMethods {
5757
print("Hello from the subclass!")
5858
helloSub.greetMe()
5959

60-
assert(helloSub.super.value == 2.71828)
60+
assert(helloSub.value == 2.71828)
6161
} else {
6262
fatalError("Expected subclass here")
6363
}

Sources/JExtractSwift/ImportedDecls+Printing.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
import Foundation
1616
import JavaTypes
1717
import SwiftSyntax
18-
import OrderedCollections
1918

2019
extension ImportedFunc {
2120
/// Render a `@{@snippet ... }` comment section that can be put inside a JavaDoc comment
@@ -99,4 +98,4 @@ extension Optional where Wrapped == VariableAccessorKind {
9998
func renderMethodName(_ decl: ImportedFunc) -> String {
10099
self?.renderMethodName(decl) ?? decl.baseIdentifier
101100
}
102-
}
101+
}

Sources/JExtractSwift/ImportedDecls.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ public struct ImportedVariable: ImportedDecl, CustomStringConvertible {
263263
/// Usually this will be all the accessors the variable declares,
264264
/// however if the getter is async or throwing we may not be able to import it
265265
/// (yet), and therefore would skip it from the supported set.
266-
public var supportedAccessorKinds: OrderedSet<VariableAccessorKind> = [.get, .set]
266+
public var supportedAccessorKinds: [VariableAccessorKind] = [.get, .set]
267267

268268
/// This is the base identifier for the function, e.g., "init" for an
269269
/// initializer or "f" for "f(a:b:)".

Sources/Java2Swift/JavaToSwift.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,8 @@ struct JavaToSwift: ParsableCommand {
183183
) throws {
184184
let translator = JavaTranslator(
185185
swiftModuleName: moduleName,
186-
environment: environment
186+
environment: environment,
187+
translateAsClass: true
187188
)
188189

189190
// Keep track of all of the Java classes that will have

0 commit comments

Comments
 (0)