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
Copy file name to clipboardExpand all lines: swift-java-hashing-example/README.md
+28-2Lines changed: 28 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,14 +19,40 @@ The project is structured into two main parts:
19
19
20
20
Before you can build and run this project, you need to have the following installed:
21
21
22
-
***Java Development Kit (JDK)**: We recommend using JDK 21. Ensure the `JAVA_HOME` environment variable is set to your JDK installation path.
22
+
***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.
23
23
***Swiftly**: You need to install [Swiftly](https://www.swift.org/install/)
24
24
***Swift SDK for Android**: You need to install the [Swift SDK for Android](https://swift.org/install)
25
25
26
26
## Setup and Configuration
27
27
28
+
### Prepare Swift Android SDK and matching Swift
29
+
30
+
Currently these examples utilize very recent nightly Swift Android SDK versions. In order to install these, you can use Swiftly (the Swift toolchain installer):
31
+
32
+
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.
33
+
28
34
### Publish `swift-java` packages locally
29
-
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:
35
+
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:
36
+
37
+
> Note: This step will not be necessary once swift-java publishes releases.
38
+
39
+
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.
40
+
A simple way to install and manage local Java installations is [sdkman](https://sdkman.io):
41
+
42
+
> Note: You will _not_ have to use most recent Java versions for your Android app, and the example currently targets Java language version 11.
43
+
44
+
Here's how to install `sdkman`:
45
+
```bash
46
+
curl -s "https://get.sdkman.io"| bash
47
+
```
48
+
Now restart the terminal so that the `sdk` utility is added to your path, and then set JDK 25 as your current Java install.
49
+
50
+
```bash
51
+
sdk install java 25.0.1-amzn --use # only in order to publish swift-java artifacts locally
0 commit comments