Skip to content

Commit fbd33ba

Browse files
add configurable java-version input (default 17) and updated README.md (#38)
1 parent 7ab1e2a commit fbd33ba

File tree

2 files changed

+28
-10
lines changed

2 files changed

+28
-10
lines changed

.github/workflows/pr-check.yaml

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
### Workflow Jobs
1414
# 1. **Setup**: Prepares the build environment
1515
# - Checks out repository code
16-
# - Sets up Java 17
16+
# - Sets up Java (default 17, configurable via `java-version` input)
1717
# - Configures Gradle
1818
# - Manages dependency caching
1919
#
@@ -36,7 +36,7 @@
3636
# - Generates platform-specific executables and packages
3737
#
3838
### Prerequisites
39-
# - Java 17
39+
# - Java (configurable, defaults to 17)
4040
# - Gradle
4141
# - Configured build scripts for:
4242
# - Android module
@@ -47,12 +47,18 @@
4747
# - Dependency Guard
4848
#
4949
### Configuration Parameters
50-
# The workflow requires two input parameters:
50+
# The workflow requires below parameters:
5151
#
5252
# | Parameter | Description | Type | Required |
5353
# |-----------|-------------|------|----------|
5454
# | `android_package_name` | Name of the Android project module | String | Yes |
5555
# | `desktop_package_name` | Name of the Desktop project module | String | Yes |
56+
# | `web_package_name` | Name of the Web project module | String | Yes |
57+
# | `ios_package_name` | Name of the iOS project module | String | Yes |
58+
# | `build_ios` | Enable iOS build | Boolean | No |
59+
# | `use_cocoapods` | Whether to use CocoaPods for integrating the shared module into the iOS app | Boolean | Required **if `build_ios` = true** |
60+
# | `shared_module` | Gradle path to the shared Kotlin Multiplatform module used in the iOS app (e.g., :cmp-shared, :shared) | String | Required **if `build_ios` = true** |
61+
# | `java-version` | Java version to use (e.g., 17, 21) | String | No |
5662
#
5763
### Usage Example
5864
# ```yaml
@@ -81,8 +87,9 @@
8187
# web_package_name: 'cmp-web' # <-- Change Your Web Package Name
8288
# ios_package_name: 'cmp-ios' # <-- Change Your iOS Package Name
8389
# build_ios: true # <-- Change to 'false' if you don't want to build iOS
84-
# use_cocoapods: true
85-
# shared_module: ':cmp-shared'
90+
# use_cocoapods: true # <-- Required if build_ios = true
91+
# shared_module: ':cmp-shared' # <-- Required if build_ios = true
92+
# java-version: '21' # <-- Set according to the JDK your project uses (default is 17)
8693
# ```
8794
#
8895
# GitHub Actions workflow for continuous integration of Mobile-Wallet project
@@ -93,6 +100,12 @@ name: Debug Build & PR Checks
93100
on:
94101
workflow_call:
95102
inputs:
103+
java-version:
104+
description: 'Java version to use (e.g., 17, 21)'
105+
type: string
106+
required: false
107+
default: '17'
108+
96109
android_package_name:
97110
description: 'Name of the Android project module'
98111
type: string
@@ -155,7 +168,9 @@ jobs:
155168
uses: actions/checkout@v4
156169

157170
- name: Static Analysis Check
158-
uses: openMF/[email protected]
171+
uses: openMF/[email protected]
172+
with:
173+
java-version: ${{ inputs.java-version }}
159174

160175
build_android_app:
161176
name: Build Android Application

README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1343,7 +1343,7 @@ This reusable GitHub Actions workflow provides a comprehensive Continuous Integr
13431343
- iOS app build support
13441344

13451345
## Prerequisites
1346-
- Java 17
1346+
- Java (configurable, defaults to 17)
13471347
- Gradle
13481348
- Configured build scripts for:
13491349
- Android module
@@ -1386,8 +1386,10 @@ This reusable GitHub Actions workflow provides a comprehensive Continuous Integr
13861386
| `web_package_name` | Name of the Web project module | String | Yes |
13871387
| `ios_package_name` | Name of the iOS project module | String | Yes |
13881388
| `build_ios` | Enable iOS build | Boolean | No |
1389-
| `use_cocoapods` | Whether to use CocoaPods for integrating the shared module into the iOS app | String | Yes |
1390-
| `shared_module` | Gradle path to the shared Kotlin Multiplatform module used in the iOS app (e.g., :cmp-shared, :shared) | String | Yes |
1389+
| `use_cocoapods` | Whether to use CocoaPods for integrating the shared module into the iOS app | Boolean | Yes |
1390+
| `shared_module` | Gradle path to the shared Kotlin Multiplatform module used in the iOS app (e.g., :cmp-shared, :shared) | String | Required **if `build_ios` = true** |
1391+
| `use_cocoapods` | Whether to use CocoaPods for integrating the shared module into the iOS app | Boolean| Required **if `build_ios` = true** |
1392+
| `java-version` | Java version to use (e.g., 17, 21) | String | No |
13911393

13921394
## Workflow Trigger Conditions
13931395
- Triggered on workflow call
@@ -1406,7 +1408,7 @@ on:
14061408
jobs:
14071409
pr_checks:
14081410
name: PR Checks
1409-
uses: openMF/mifos-x-actionhub/.github/workflows/[email protected].3
1411+
uses: openMF/mifos-x-actionhub/.github/workflows/[email protected].4
14101412
with:
14111413
android_package_name: 'cmp-android'
14121414
desktop_package_name: 'cmp-desktop'
@@ -1415,6 +1417,7 @@ jobs:
14151417
build_ios: true # <-- Change to 'false' if you don't want to build iOS
14161418
use_cocoapods: true
14171419
shared_module: ':cmp-shared'
1420+
java-version: '21' # <-- Set according to the JDK your project uses (default is 17)
14181421
```
14191422

14201423
<div align="right">

0 commit comments

Comments
 (0)