Skip to content

Commit 3189a9b

Browse files
committed
Update yml
1 parent e228d64 commit 3189a9b

File tree

2 files changed

+29
-2
lines changed

2 files changed

+29
-2
lines changed

.github/workflows/ci.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,11 @@ jobs:
126126
- name: Install dependencies
127127
run: yarn install --frozen-lockfile
128128

129-
- name: Setup Java 17
129+
- name: Setup Java 21
130130
uses: actions/setup-java@v4
131131
with:
132132
distribution: 'temurin'
133-
java-version: '17'
133+
java-version: '21'
134134

135135
- name: Setup Android SDK
136136
uses: android-actions/setup-android@v3
@@ -151,6 +151,18 @@ jobs:
151151
- name: Initialize Tauri Android project
152152
run: yarn tauri android init --ci
153153

154+
- name: Ensure JitPack repository (for usb-serial-for-android)
155+
shell: bash
156+
run: |
157+
set -euo pipefail
158+
FILE="src-tauri/gen/android/build.gradle.kts"
159+
echo "Ensuring JitPack repository is present in $FILE"
160+
if ! grep -q 'jitpack.io' "$FILE"; then
161+
printf '\nallprojects {\n repositories {\n maven(url = "https://jitpack.io")\n }\n}\n' >> "$FILE"
162+
fi
163+
echo "Repositories block in $FILE now contains:"
164+
grep -n "jitpack.io" "$FILE" || true
165+
154166
- name: Build Tauri Android APK
155167
uses: tauri-apps/tauri-action@v0
156168
with:

.github/workflows/release.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,21 @@ jobs:
105105
restore-keys: |
106106
${{ runner.os }}-gradle-
107107
108+
- name: Ensure JitPack repository (for usb-serial-for-android)
109+
shell: bash
110+
run: |
111+
set -euo pipefail
112+
FILE="src-tauri/gen/android/build.gradle.kts"
113+
if [ -f "$FILE" ]; then
114+
echo "Ensuring JitPack repository is present in $FILE"
115+
if ! grep -q 'jitpack.io' "$FILE"; then
116+
printf '\nallprojects {\n repositories {\n maven(url = "https://jitpack.io")\n }\n}\n' >> "$FILE"
117+
fi
118+
grep -n "jitpack.io" "$FILE" || true
119+
else
120+
echo "Warning: $FILE not found (will be generated by Tauri on first build)."
121+
fi
122+
108123
- name: Build Android release (unsigned)
109124
run: |
110125
yarn tauri:build:android

0 commit comments

Comments
 (0)