From 9e10e87c038b311f7302b908e464813992193182 Mon Sep 17 00:00:00 2001 From: Konrad Malawski Date: Fri, 24 Oct 2025 16:56:33 +0900 Subject: [PATCH 01/13] Update Gradle version to 9.1 --- gradle/wrapper/gradle-wrapper.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index b30abe8..3c41994 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ #Sat Aug 09 13:51:11 EEST 2025 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists From f92420b85e5bbe9f503dba0b34caed7ca1f23560 Mon Sep 17 00:00:00 2001 From: Konrad Malawski Date: Fri, 24 Oct 2025 16:57:34 +0900 Subject: [PATCH 02/13] update hashing sample instructions a little bit to include details necessary for publishing the swift-java artifacts with the least amount of annoyance --- swift-java-hashing-example/README.md | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/swift-java-hashing-example/README.md b/swift-java-hashing-example/README.md index 347df5f..272c224 100644 --- a/swift-java-hashing-example/README.md +++ b/swift-java-hashing-example/README.md @@ -25,8 +25,30 @@ Before you can build and run this project, you need to have the following instal ## Setup and Configuration +### Prepare Swift Android SDK and matching Swift + +Currently these examples utilize very recent nightly Swift Android SDK versions. In order to install these, you can use Swiftly (the Swift toolchain installer): + +You can follow [these instructions](https://github.com/swiftlang/swift-org-website/pull/985/files) to install an appropriate Swift Android SDK. + ### Publish `swift-java` packages locally -As the `swift-java` project does not yet publish the neccessary Java packages needed at runtime, we need to do it ourself, by performing the following steps: +As the `swift-java` project does not yet publish the necessary Java packages needed at runtime, we need to do it ourself, by performing the following steps: + +> Note: This step will not be necessary once swift-java publishes releases. + +In order to publish all artifacts from this library, we recommend installing and using JDK 25, because some parts of swift-java are built for most recent Java versions. +A simple way to install and manage local Java installations is [sdkman](https://sdkman.io): + +> Note: You will _not_ have to use most recent Java versions for your Android app, and the example currently targets Java language version 11. + +```bash +curl -s "https://get.sdkman.io" | bash +sdk install java 25.0.1-amzn --use # only in order to publish swift-java artifacts locally + +export JAVA_HOME="${HOME}//.sdkman/candidates/java/current" +``` + +Next, let's prepare and publish the swift-java support libraries: 1. Enter the `hashing-lib` directory ```bash From 8746fa59eb4f61023b68b72b8de24d7e6ae0d0fe Mon Sep 17 00:00:00 2001 From: Konrad Malawski Date: Fri, 24 Oct 2025 16:59:20 +0900 Subject: [PATCH 03/13] no need to require a specific JDK in hashing example --- swift-java-hashing-example/hashing-lib/build.gradle | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/swift-java-hashing-example/hashing-lib/build.gradle b/swift-java-hashing-example/hashing-lib/build.gradle index 13da81e..818f756 100644 --- a/swift-java-hashing-example/hashing-lib/build.gradle +++ b/swift-java-hashing-example/hashing-lib/build.gradle @@ -17,9 +17,8 @@ android { } java { - toolchain { - languageVersion = JavaLanguageVersion.of(11) - } + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 } dependencies { From 6eebee7c3a8b10261a8408bf51b2cd0f1c38a5d2 Mon Sep 17 00:00:00 2001 From: Konrad Malawski Date: Fri, 24 Oct 2025 17:05:59 +0900 Subject: [PATCH 04/13] Recommend latest LTS JDK 25, but we don't require it, and use Java 11 compat --- hello-swift-callback/README.md | 2 +- hello-swift-library/README.md | 2 +- hello-swift/README.md | 2 +- native-activity/README.md | 2 +- swift-java-hashing-example/README.md | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/hello-swift-callback/README.md b/hello-swift-callback/README.md index 723d619..5a99e6c 100644 --- a/hello-swift-callback/README.md +++ b/hello-swift-callback/README.md @@ -15,7 +15,7 @@ The project consists of: Before you can build and run this project, you need to have the following installed: -* **Java Development Kit (JDK)**: We recommend using JDK 21. Ensure the `JAVA_HOME` environment variable is set to your JDK installation path. +* **Java Development Kit (JDK)**: We recommend using JDK 25. Ensure the `JAVA_HOME` environment variable is set to your JDK installation path. * **Swiftly**: You need to install [Swiftly](https://www.swift.org/install/) * **Swift SDK for Android**: You need to install the [Swift SDK for Android](https://swift.org/install) diff --git a/hello-swift-library/README.md b/hello-swift-library/README.md index 6f82316..3047ba0 100644 --- a/hello-swift-library/README.md +++ b/hello-swift-library/README.md @@ -13,7 +13,7 @@ The project consists of: Before you can build and run this project, you need to have the following installed: -* **Java Development Kit (JDK)**: We recommend using JDK 21. Ensure the `JAVA_HOME` environment variable is set to your JDK installation path. +* **Java Development Kit (JDK)**: We recommend using JDK 25. Ensure the `JAVA_HOME` environment variable is set to your JDK installation path. * **Swiftly**: You need to install [Swiftly](https://www.swift.org/install/) * **Swift SDK for Android**: You need to install the [Swift SDK for Android](https://swift.org/install) diff --git a/hello-swift/README.md b/hello-swift/README.md index 8bd5172..7104af5 100644 --- a/hello-swift/README.md +++ b/hello-swift/README.md @@ -15,7 +15,7 @@ The project consists of: Before you can build and run this project, you need to have the following installed: -* **Java Development Kit (JDK)**: We recommend using JDK 21. Ensure the `JAVA_HOME` environment variable is set to your JDK installation path. +* **Java Development Kit (JDK)**: We recommend using JDK 25. Ensure the `JAVA_HOME` environment variable is set to your JDK installation path. * **Swiftly**: You need to install [Swiftly](https://www.swift.org/install/) * **Swift SDK for Android**: You need to install the [Swift SDK for Android](https://swift.org/install) diff --git a/native-activity/README.md b/native-activity/README.md index b74ccc0..4d76082 100644 --- a/native-activity/README.md +++ b/native-activity/README.md @@ -15,7 +15,7 @@ The project consists of: Before you can build and run this project, you need to have the following installed: -* **Java Development Kit (JDK)**: We recommend using JDK 21. Ensure the `JAVA_HOME` environment variable is set to your JDK installation path. +* **Java Development Kit (JDK)**: We recommend using JDK 25. Ensure the `JAVA_HOME` environment variable is set to your JDK installation path. * **Swiftly**: You need to install [Swiftly](https://www.swift.org/install/) * **Swift SDK for Android**: You need to install the [Swift SDK for Android](https://swift.org/install) * **Device/emulator with OpenGL ES support** diff --git a/swift-java-hashing-example/README.md b/swift-java-hashing-example/README.md index 272c224..99ca847 100644 --- a/swift-java-hashing-example/README.md +++ b/swift-java-hashing-example/README.md @@ -19,7 +19,7 @@ The project is structured into two main parts: Before you can build and run this project, you need to have the following installed: -* **Java Development Kit (JDK)**: We recommend using JDK 21. Ensure the `JAVA_HOME` environment variable is set to your JDK installation path. +* **Java Development Kit (JDK)**: We recommend using JDK 25. Ensure the `JAVA_HOME` environment variable is set to your JDK installation path. * **Swiftly**: You need to install [Swiftly](https://www.swift.org/install/) * **Swift SDK for Android**: You need to install the [Swift SDK for Android](https://swift.org/install) From 8bb05c186b616674290a9014a1affc6537bb8c53 Mon Sep 17 00:00:00 2001 From: Konrad `ktoso` Malawski Date: Fri, 24 Oct 2025 17:59:38 +0900 Subject: [PATCH 05/13] reword that for publishing swift-java today we require jdk25 --- swift-java-hashing-example/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/swift-java-hashing-example/README.md b/swift-java-hashing-example/README.md index 99ca847..341f5e9 100644 --- a/swift-java-hashing-example/README.md +++ b/swift-java-hashing-example/README.md @@ -36,7 +36,7 @@ As the `swift-java` project does not yet publish the necessary Java packages nee > Note: This step will not be necessary once swift-java publishes releases. -In order to publish all artifacts from this library, we recommend installing and using JDK 25, because some parts of swift-java are built for most recent Java versions. +In order to publish all artifacts from this library, you must use JDK 25, because some parts of swift-java are built for most recent Java versions. You will not have to use JDK 25 for the rest of the development process. A simple way to install and manage local Java installations is [sdkman](https://sdkman.io): > Note: You will _not_ have to use most recent Java versions for your Android app, and the example currently targets Java language version 11. From 70cfdc5845203572af9f50e223e40879327db9fc Mon Sep 17 00:00:00 2001 From: Konrad `ktoso` Malawski Date: Fri, 24 Oct 2025 18:07:34 +0900 Subject: [PATCH 06/13] Reword that this example uses jdk 25 --- hello-swift-callback/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hello-swift-callback/README.md b/hello-swift-callback/README.md index 5a99e6c..fc49c62 100644 --- a/hello-swift-callback/README.md +++ b/hello-swift-callback/README.md @@ -15,7 +15,7 @@ The project consists of: Before you can build and run this project, you need to have the following installed: -* **Java Development Kit (JDK)**: We recommend using JDK 25. Ensure the `JAVA_HOME` environment variable is set to your JDK installation path. +* **Java Development Kit (JDK)**: This example requires the use of JDK 25. This is only necessary to local-publish the swift-java dependencies, and will not be required in the future. To simplify the build steps, we recommend installing JDK 25 and following all the steps below using the same JDK. Ensure the `JAVA_HOME` environment variable is set to your JDK installation path. * **Swiftly**: You need to install [Swiftly](https://www.swift.org/install/) * **Swift SDK for Android**: You need to install the [Swift SDK for Android](https://swift.org/install) From 1daf8448949833072a981081c40300018bdc5e7d Mon Sep 17 00:00:00 2001 From: Konrad `ktoso` Malawski Date: Fri, 24 Oct 2025 18:08:49 +0900 Subject: [PATCH 07/13] Apply suggestions from code review --- hello-swift-callback/README.md | 2 +- swift-java-hashing-example/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hello-swift-callback/README.md b/hello-swift-callback/README.md index fc49c62..723d619 100644 --- a/hello-swift-callback/README.md +++ b/hello-swift-callback/README.md @@ -15,7 +15,7 @@ The project consists of: Before you can build and run this project, you need to have the following installed: -* **Java Development Kit (JDK)**: This example requires the use of JDK 25. This is only necessary to local-publish the swift-java dependencies, and will not be required in the future. To simplify the build steps, we recommend installing JDK 25 and following all the steps below using the same JDK. Ensure the `JAVA_HOME` environment variable is set to your JDK installation path. +* **Java Development Kit (JDK)**: We recommend using JDK 21. Ensure the `JAVA_HOME` environment variable is set to your JDK installation path. * **Swiftly**: You need to install [Swiftly](https://www.swift.org/install/) * **Swift SDK for Android**: You need to install the [Swift SDK for Android](https://swift.org/install) diff --git a/swift-java-hashing-example/README.md b/swift-java-hashing-example/README.md index 341f5e9..96e91c1 100644 --- a/swift-java-hashing-example/README.md +++ b/swift-java-hashing-example/README.md @@ -19,7 +19,7 @@ The project is structured into two main parts: Before you can build and run this project, you need to have the following installed: -* **Java Development Kit (JDK)**: We recommend using JDK 25. Ensure the `JAVA_HOME` environment variable is set to your JDK installation path. +* **Java Development Kit (JDK)**: This example requires the use of JDK 25. This is only necessary to local-publish the swift-java dependencies, and will not be required in the future. To simplify the build steps, we recommend installing JDK 25 and following all the steps below using the same JDK. Ensure the `JAVA_HOME` environment variable is set to your JDK installation path. * **Swiftly**: You need to install [Swiftly](https://www.swift.org/install/) * **Swift SDK for Android**: You need to install the [Swift SDK for Android](https://swift.org/install) From 1769419c45154b2ee86b6b1fc2d3f09d006a2ef7 Mon Sep 17 00:00:00 2001 From: Konrad `ktoso` Malawski Date: Fri, 24 Oct 2025 20:32:20 +0900 Subject: [PATCH 08/13] Prepare for future link --- swift-java-hashing-example/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/swift-java-hashing-example/README.md b/swift-java-hashing-example/README.md index 96e91c1..94fda71 100644 --- a/swift-java-hashing-example/README.md +++ b/swift-java-hashing-example/README.md @@ -29,7 +29,7 @@ Before you can build and run this project, you need to have the following instal Currently these examples utilize very recent nightly Swift Android SDK versions. In order to install these, you can use Swiftly (the Swift toolchain installer): -You can follow [these instructions](https://github.com/swiftlang/swift-org-website/pull/985/files) to install an appropriate Swift Android SDK. +You can follow [these instructions](https://www.swift.org/documentation/articles/swift-android-getting-started.html) to install an appropriate Swift Android SDK. ### Publish `swift-java` packages locally As the `swift-java` project does not yet publish the necessary Java packages needed at runtime, we need to do it ourself, by performing the following steps: From 28ddf6da36b3d83bb7a3d6535b75ab4f4f48f279 Mon Sep 17 00:00:00 2001 From: Konrad `ktoso` Malawski Date: Fri, 24 Oct 2025 20:33:42 +0900 Subject: [PATCH 09/13] Rename SDK to "Swift SDK for Android" --- swift-java-hashing-example/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/swift-java-hashing-example/README.md b/swift-java-hashing-example/README.md index 94fda71..c9bcd12 100644 --- a/swift-java-hashing-example/README.md +++ b/swift-java-hashing-example/README.md @@ -29,7 +29,7 @@ Before you can build and run this project, you need to have the following instal Currently these examples utilize very recent nightly Swift Android SDK versions. In order to install these, you can use Swiftly (the Swift toolchain installer): -You can follow [these instructions](https://www.swift.org/documentation/articles/swift-android-getting-started.html) to install an appropriate Swift Android SDK. +You can follow [these instructions](https://www.swift.org/documentation/articles/swift-android-getting-started.html) to install an appropriate Swift SDK for Android. ### Publish `swift-java` packages locally As the `swift-java` project does not yet publish the necessary Java packages needed at runtime, we need to do it ourself, by performing the following steps: From 1a42aafac75657c4efcd4ec02fc8263a9eecd434 Mon Sep 17 00:00:00 2001 From: Konrad `ktoso` Malawski Date: Fri, 24 Oct 2025 20:40:50 +0900 Subject: [PATCH 10/13] Apply suggestions from code review --- swift-java-hashing-example/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/swift-java-hashing-example/README.md b/swift-java-hashing-example/README.md index c9bcd12..3e3bae1 100644 --- a/swift-java-hashing-example/README.md +++ b/swift-java-hashing-example/README.md @@ -32,11 +32,11 @@ Currently these examples utilize very recent nightly Swift Android SDK versions. You can follow [these instructions](https://www.swift.org/documentation/articles/swift-android-getting-started.html) to install an appropriate Swift SDK for Android. ### Publish `swift-java` packages locally -As the `swift-java` project does not yet publish the necessary Java packages needed at runtime, we need to do it ourself, by performing the following steps: +As the `swift-java` project does not yet publish the necessary Java packages needed at runtime, we need to do it ourselves, by performing the following steps: > Note: This step will not be necessary once swift-java publishes releases. -In order to publish all artifacts from this library, you must use JDK 25, because some parts of swift-java are built for most recent Java versions. You will not have to use JDK 25 for the rest of the development process. +In order to publish all artifacts from this library, you must use JDK 25, because some parts of swift-java are built for the most recent Java versions. You will not have to use JDK 25 for the rest of the development process. A simple way to install and manage local Java installations is [sdkman](https://sdkman.io): > Note: You will _not_ have to use most recent Java versions for your Android app, and the example currently targets Java language version 11. From 779e369388b086492f0f794799c478734dc87a75 Mon Sep 17 00:00:00 2001 From: Konrad `ktoso` Malawski Date: Fri, 24 Oct 2025 23:43:02 +0900 Subject: [PATCH 11/13] Update swift-java-hashing-example/README.md Co-authored-by: finagolfin --- swift-java-hashing-example/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/swift-java-hashing-example/README.md b/swift-java-hashing-example/README.md index 3e3bae1..3ed3bd6 100644 --- a/swift-java-hashing-example/README.md +++ b/swift-java-hashing-example/README.md @@ -19,7 +19,7 @@ The project is structured into two main parts: Before you can build and run this project, you need to have the following installed: -* **Java Development Kit (JDK)**: This example requires the use of JDK 25. This is only necessary to local-publish the swift-java dependencies, and will not be required in the future. To simplify the build steps, we recommend installing JDK 25 and following all the steps below using the same JDK. Ensure the `JAVA_HOME` environment variable is set to your JDK installation path. +* **Java Development Kit (JDK)**: This example requires the use of JDK 25. This is only necessary to locally publish the swift-java dependencies, and will not be required in the future. To simplify the build steps, we recommend installing JDK 25 and following all the steps below using the same JDK. Ensure the `JAVA_HOME` environment variable is set to your JDK installation path. * **Swiftly**: You need to install [Swiftly](https://www.swift.org/install/) * **Swift SDK for Android**: You need to install the [Swift SDK for Android](https://swift.org/install) From 7cdb0f84f19949dc08fc62da7e6644bed19a1cd7 Mon Sep 17 00:00:00 2001 From: Mishal Shah Date: Fri, 24 Oct 2025 09:16:41 -0700 Subject: [PATCH 12/13] Update swift-java-hashing-example/README.md --- swift-java-hashing-example/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/swift-java-hashing-example/README.md b/swift-java-hashing-example/README.md index 3ed3bd6..35ac014 100644 --- a/swift-java-hashing-example/README.md +++ b/swift-java-hashing-example/README.md @@ -29,7 +29,7 @@ Before you can build and run this project, you need to have the following instal Currently these examples utilize very recent nightly Swift Android SDK versions. In order to install these, you can use Swiftly (the Swift toolchain installer): -You can follow [these instructions](https://www.swift.org/documentation/articles/swift-android-getting-started.html) to install an appropriate Swift SDK for Android. +You can follow [these instructions](https://www.swift.org/documentation/articles/swift-sdk-for-android-getting-started.html) to install an appropriate Swift SDK for Android. ### Publish `swift-java` packages locally As the `swift-java` project does not yet publish the necessary Java packages needed at runtime, we need to do it ourselves, by performing the following steps: From cdc090d8b72cc6da4c5ab293b73298cadb970b51 Mon Sep 17 00:00:00 2001 From: Tim Sneath Date: Fri, 24 Oct 2025 10:04:35 -0700 Subject: [PATCH 13/13] Update README with sdkman installation instructions Added installation instructions for sdkman and Java setup. --- swift-java-hashing-example/README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/swift-java-hashing-example/README.md b/swift-java-hashing-example/README.md index 35ac014..4d1921a 100644 --- a/swift-java-hashing-example/README.md +++ b/swift-java-hashing-example/README.md @@ -41,10 +41,14 @@ A simple way to install and manage local Java installations is [sdkman](https:// > Note: You will _not_ have to use most recent Java versions for your Android app, and the example currently targets Java language version 11. +Here's how to install `sdkman`: ```bash curl -s "https://get.sdkman.io" | bash -sdk install java 25.0.1-amzn --use # only in order to publish swift-java artifacts locally +``` +Now restart the terminal so that the `sdk` utility is added to your path, and then set JDK 25 as your current Java install. +```bash +sdk install java 25.0.1-amzn --use # only in order to publish swift-java artifacts locally export JAVA_HOME="${HOME}//.sdkman/candidates/java/current" ```