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 Android port uses JDK 17 while Maven runs with JDK 11. The helper scripts download both JDKs and set `JAVA_HOME` and `JAVA_HOME_17`.
33
-
34
32
## Preparing the workspace
35
33
36
-
Clone the repository and run the setup script to install Maven, download JDK 11 and JDK 17, build the core modules, and install the Maven archetypes. This step must be performed before building any ports.
34
+
Clone the repository and run the setup script to download JDK 8 and JDK 17, install Maven, build the core modules, and install the Maven archetypes. This step must be performed before building any ports.
@@ -46,35 +44,31 @@ The script runs `mvn install` in `maven/`, installs `cn1-maven-archetypes`, and
46
44
47
45
## Building the Android port
48
46
49
-
Run the Android build script. It sources the environment from `tools/env.sh`, ensuring `JAVA_HOME` points to JDK 11 and `JAVA_HOME_17` points to JDK 17. If the JDKs are missing, the script will run `setup-workspace.sh` to download them:
47
+
The Android port uses JDK 17 for compilation while Maven runs with JDK 8. Run the build script:
50
48
51
49
```bash
52
50
./scripts/build-android-port.sh -DskipTests
53
51
```
54
52
55
-
The resulting artifacts are placed in `maven/android/target`.
53
+
Artifacts are placed in `maven/android/target`.
56
54
57
55
## Building the iOS port
58
56
59
-
The iOS port can only be built on macOS with Xcode installed. The build script sources `tools/env.sh` and ensures `JAVA_HOME` points to JDK 11, running `setup-workspace.sh` if necessary:
57
+
The iOS port can only be built on macOS with Xcode installed. Run the iOS script:
60
58
61
59
```bash
62
60
./scripts/build-ios-port.sh -DskipTests
63
61
```
64
62
65
-
The build output is in `maven/ios/target`.
63
+
Artifacts are produced in `maven/ios/target`.
66
64
67
65
## Convenience scripts
68
66
69
-
The `scripts` directory contains helper scripts:
70
-
71
-
-`setup-workspace.sh` – installs Maven, downloads JDK 11 and JDK 17, builds the core modules, installs Maven archetypes, provisions the Codename One build client, and writes `tools/env.sh`.
72
-
-`build-android-port.sh` – builds the Android port using JDK 11 for Maven and JDK 17 for compilation.
73
-
-`build-ios-port.sh` – builds the iOS port on macOS with JDK 11.
74
-
75
-
These scripts accept additional Maven arguments, which are passed through to the underlying `mvn` commands.
67
+
-`setup-workspace.sh` – installs Maven, downloads JDK 8 and JDK 17, builds the core modules, installs Maven archetypes, provisions the Codename One build client, and writes `tools/env.sh`.
68
+
-`build-android-port.sh` – builds the Android port using JDK 8 for Maven and JDK 17 for compilation.
69
+
-`build-ios-port.sh` – builds the iOS port on macOS with JDK 8.
76
70
77
71
## Further reading
78
72
79
-
- Blog post: *Building Codename One from source, Maven edition* – https://www.codenameone.com/blog/building-codename-one-from-source-maven-edition.html
0 commit comments