From 155008fc7857bf1cbef467291ff721cadfa57223 Mon Sep 17 00:00:00 2001 From: nessi Date: Sun, 28 Jun 2026 09:59:24 +0200 Subject: [PATCH] ci: replace Gradle setup action with manual installation and pin frontend dependencies Replace gradle/actions/setup-gradle with manual Gradle 8.8 installation to resolve compatibility issues. Pin all frontend dependencies to specific versions instead of using 'latest' for reproducible builds. Update TypeScript moduleResolution to 'Bundler' and add Vite client types. --- .gitea/workflows/ci.yml | 12 ++++++++---- frontend/package.json | 16 ++++++++-------- frontend/tsconfig.json | 5 +++-- 3 files changed, 19 insertions(+), 14 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index a4457ee..2435ab8 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -51,9 +51,13 @@ jobs: distribution: "temurin" java-version: "17" - uses: android-actions/setup-android@v3 - - uses: gradle/actions/setup-gradle@v4 - with: - gradle-version: "8.8" + - name: Install Gradle + run: | + apt-get update + apt-get install -y curl unzip + curl -fsSL https://services.gradle.org/distributions/gradle-8.8-bin.zip -o /tmp/gradle-8.8-bin.zip + unzip -q /tmp/gradle-8.8-bin.zip -d /opt + /opt/gradle-8.8/bin/gradle --version - name: Prepare Firebase configuration if: "${{ secrets.GOOGLE_SERVICES_JSON_BASE64 != '' }}" run: echo "${{ secrets.GOOGLE_SERVICES_JSON_BASE64 }}" | base64 -d > android/app/google-services.json @@ -69,7 +73,7 @@ jobs: ANDROID_KEY_ALIAS: "${{ secrets.ANDROID_KEY_ALIAS }}" ANDROID_KEY_PASSWORD: "${{ secrets.ANDROID_KEY_PASSWORD }}" run: | - gradle testDebugUnitTest assembleDebug assembleRelease bundleRelease + /opt/gradle-8.8/bin/gradle testDebugUnitTest assembleDebug assembleRelease bundleRelease - name: Upload debug APK uses: actions/upload-artifact@v3 with: diff --git a/frontend/package.json b/frontend/package.json index 3751157..1375cfd 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -9,15 +9,15 @@ "preview": "vite preview --host 0.0.0.0" }, "dependencies": { - "@vitejs/plugin-react": "latest", - "lucide-react": "latest", - "vite": "latest", - "react": "latest", - "react-dom": "latest" + "lucide-react": "0.468.0", + "react": "18.3.1", + "react-dom": "18.3.1" }, "devDependencies": { - "typescript": "latest", - "@types/react": "latest", - "@types/react-dom": "latest" + "@types/react": "18.3.3", + "@types/react-dom": "18.3.0", + "@vitejs/plugin-react": "4.3.1", + "typescript": "5.5.4", + "vite": "5.4.2" } } diff --git a/frontend/tsconfig.json b/frontend/tsconfig.json index 8c69ba7..4e09b20 100644 --- a/frontend/tsconfig.json +++ b/frontend/tsconfig.json @@ -10,11 +10,12 @@ "strict": true, "forceConsistentCasingInFileNames": true, "module": "ESNext", - "moduleResolution": "Node", + "moduleResolution": "Bundler", "resolveJsonModule": true, "isolatedModules": true, "noEmit": true, - "jsx": "react-jsx" + "jsx": "react-jsx", + "types": ["vite/client"] }, "include": ["src"], "references": []