From 6dc8f8f9fcfd6d2d371d3990381a445af7f05523 Mon Sep 17 00:00:00 2001 From: Dave Lester Date: Fri, 24 Oct 2025 12:37:18 -0700 Subject: [PATCH 1/2] Updates project README.md to clarify its current status, make the language around self-publication of supporting libraries more accessible, and remove the construction emoji that previously appeared. --- README.md | 57 +++++++++++++++++++++++++++---------------------------- 1 file changed, 28 insertions(+), 29 deletions(-) diff --git a/README.md b/README.md index da56781c..660c6a00 100644 --- a/README.md +++ b/README.md @@ -5,16 +5,32 @@ This repository contains two approaches to Swift/Java interoperability. - Swift library (`SwiftJava`) and bindings generator that allows a Swift program to make use of Java libraries by wrapping Java classes in corresponding Swift types, allowing Swift to directly call any wrapped Java API. - The `swift-java` tool which offers automated ways to import or "extract" bindings to sources or libraries in either language. The results are bindings for Swift or Java. -## :construction: Early Development :construction: +## Dependencies + +### Required JDK versions + +Note that this project consists of multiple modules which currently have different Swift and Java runtime requirements. + +You'll need to install the necessary JDK version locally. On macOS for example, you can install the JDK with [homebrew](https://brew.sh) using: + +```bash +$ brew install openjdk +# and create a symlink into /Library/Java/JavaVirtualMachines +$ sudo ln -sfn /opt/homebrew/opt/openjdk/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk.jdk -**:construction: This project is in early development, please keep this in mind as you try out the project and do provide feedback about any issues you encounter. :construction:** +# or if you have a distribution as cask it will be installed into /Library/Java/JavaVirtualMachines +$ brew install --cask corretto +``` -There is no guarantee about API stability of this package, neither in the Java or Swift parts, until the project releases a stable 1.0 release; APIs may change without prior notice. +Alternatively, you can use a JDK manager like [sdkman](https://sdkman.io/install/) and set your `JAVA_HOME` environment variable: + +```bash +$ export JAVA_HOME="$(sdk home java current)" +``` -### :construction: Self-publish support Java libraries (SwiftKit) +## Self-publish supporting Java libraries -While we work out how to provide the necessary support libraries for the Java side of Java code generated by `swift-java jextract`, -you will currently need to publish them locally and depend on them this way; +Swift-java relies on supporting libraries that are under active development and not yet publisehd to Maven Central. To use the project, you'll need to self-publish these libraries locally so your Java project can depend on them. To publish the libraries to your local maven repository (`$HOME/.m2`), you can run: @@ -34,29 +50,6 @@ repositories { We anticipate simplifying this in the future. -## Dependencies - -### Required JDK versions - -This project consists of different modules which have different Swift and Java runtime requirements. - -On macOS for example, you can install the JDK with [homebrew](https://brew.sh) using - -```bash -$ brew install openjdk -# and create a symlink into /Library/Java/JavaVirtualMachines -$ sudo ln -sfn /opt/homebrew/opt/openjdk/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk.jdk - -# or if you have a distribution as cask it will be installed into /Library/Java/JavaVirtualMachines -$ brew install --cask corretto -``` - -or you can use a JDK manager like [sdkman](https://sdkman.io/install/) and set your `JAVA_HOME` environment variable - -```bash -$ export JAVA_HOME="$(sdk home java current)" -``` - ## SwiftJava macros SwiftJava is a Swift library offering macros which simplify writing JNI code "by hand" but also calling Java code from Swift. @@ -231,3 +224,9 @@ xcrun docc preview Sources/SwiftJavaDocumentation/Documentation.docc # Monitoring /Users/ktoso/code/swift-java/Sources/SwiftJavaDocumentation/Documentation.docc for changes... ``` + +## Project Status + +**This project is under active development. We welcome feedback about any issues you encounter.** + +There is no guarantee about API stability until the project reaches a 1.0 release. \ No newline at end of file From c24680e54735bbddb620c33f8a66f996c15c2500 Mon Sep 17 00:00:00 2001 From: Konrad `ktoso` Malawski Date: Sat, 25 Oct 2025 05:54:45 +0900 Subject: [PATCH 2/2] Update README.md Co-authored-by: Honza Dvorsky --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 660c6a00..2688f288 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ $ export JAVA_HOME="$(sdk home java current)" ## Self-publish supporting Java libraries -Swift-java relies on supporting libraries that are under active development and not yet publisehd to Maven Central. To use the project, you'll need to self-publish these libraries locally so your Java project can depend on them. +Swift-java relies on supporting libraries that are under active development and not yet published to Maven Central. To use the project, you'll need to self-publish these libraries locally so your Java project can depend on them. To publish the libraries to your local maven repository (`$HOME/.m2`), you can run: