You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The "Java2Swift" tool produces Swift wrapper types (using JavaKit) for Java classes. It's provided as a standalone executable that takes in an input module, some translation manifests, and either a Jar file or a list of class names, and produces Swift source files.
We should create a SwiftPM build plugin that runs the tool for us. For example, it should make it easy to declare a SwiftPM target and fill in some of the source files via the generator. For example, the JavaKitJar module is fully generated, but with a Makefile.
The text was updated successfully, but these errors were encountered:
Introduce the plugin `Java2SwiftPlugin`, which will invoke Java2Swift to
generate Swift wrappers for the specified Java classes. Each SwiftPM
target that uses this plugin must contain a file named `Java2Swift.config`
that specifies options for the Java2Swift tool. This is a JSON file
with a top-level dictionary that currently can contain keys for the
Java class path (`classPath`) and a dictionary called `classes` whose
keys are Java canonical class names (such as `java.util.Vector`) and
whose values are the corresponding Swift names. For example:
```swift
{
"classes" : {
"java.util.Vector" : "JavaVector"
}
}
```
will translate the class `java.util.Vector` into the Swift type `JavaVector`.
The resulting Swift files will become part of the Swift module that uses
this plugin.
I've updated the JavaKitSampleApp to make use of this, albeit in a very
narrow way that is not at all compelling. The user guide also needs updating.
Fixes issue swiftlang#16
This was mostly implemented in PR #77 , but we need to make sure that we're picking up the manifest files generated from other targets we depend on. Right now, we only get the manifest files if they are in the "pre-baked" location generated/<modulename>.swift2java.
The "Java2Swift" tool produces Swift wrapper types (using JavaKit) for Java classes. It's provided as a standalone executable that takes in an input module, some translation manifests, and either a Jar file or a list of class names, and produces Swift source files.
We should create a SwiftPM build plugin that runs the tool for us. For example, it should make it easy to declare a SwiftPM target and fill in some of the source files via the generator. For example, the
JavaKitJar
module is fully generated, but with a Makefile.The text was updated successfully, but these errors were encountered: