From 4c3e40a1c225e621a0d31500153fa8d553ba19e9 Mon Sep 17 00:00:00 2001 From: Gitea Date: Mon, 20 Apr 2026 17:10:58 +0530 Subject: [PATCH] first --- .gitea/workflows/test.yml | 109 ++++++++++++++++++++++++++++---------- package.json | 63 +--------------------- 2 files changed, 82 insertions(+), 90 deletions(-) diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml index 8bd6bbe..7cc6f9d 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -1,48 +1,101 @@ -name: Node CI Pipeline +name: RN APK Build on: push: branches: - main - - master - - develop - pull_request: - branches: - - main - - master - - develop jobs: build: runs-on: ubuntu-latest + env: + ANDROID_SDK_ROOT: ${{ runner.temp }}/android-sdk + steps: - # Checkout code + # 1. Checkout code - name: Checkout uses: actions/checkout@v4 - # Setup Node.js - - name: Setup Node.js + # 2. Node setup + - name: Setup Node uses: actions/setup-node@v4 with: - node-version: 22 + node-version: 20 + cache: npm - # Diagnostics - - name: Diagnostics - run: | - set -e - node -v - npm -v - pwd - - # Install dependencies + # 3. Install JS deps - name: Install dependencies - run: npm ci + run: npm install - # Lint - - name: ESLint - run: npm run lint + # 4. Java setup + - name: Setup Java + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: 17 - # Optional Test (uncomment if needed) - # - name: Jest Tests - # run: npm test -- --ci --coverage \ No newline at end of file + # 5. Gradle cache + - name: Cache Gradle + uses: actions/cache@v4 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} + restore-keys: gradle- + + # 6. Maven cache + - name: Cache Maven + uses: actions/cache@v4 + with: + path: ~/.m2/repository + key: maven-${{ hashFiles('**/*.gradle*') }} + restore-keys: maven- + + # 7. Android SDK setup + - name: Setup Android SDK + uses: android-actions/setup-android@v2 + with: + accept-android-sdk-licenses: true + + # 8. Install SDK components + - name: Install SDK Components + run: | + sdkmanager \ + "platform-tools" \ + "platforms;android-36" \ + "build-tools;36.0.0" \ + "ndk;27.1.12297006" \ + "cmake;3.22.1" + + # 9. Gradlew permission + - name: Make Gradlew executable + run: chmod +x android/gradlew + + # 10. Clean build (safe) + - name: Clean project + run: cd android && ./gradlew clean + + # 11. Build APK + - name: Build Release APK + run: | + cd android + ./gradlew assembleRelease \ + --no-daemon \ + --stacktrace \ + -Dorg.gradle.jvmargs="-Xmx4g -Dfile.encoding=UTF-8" \ + -Dorg.gradle.daemon=false \ + -Pandroid.ndkVersion=27.1.12297006 \ + -Pandroid.ndkPath=$ANDROID_SDK_ROOT/ndk/27.1.12297006 + + # 12. Verify APK + - name: Show APK + run: find android/app/build/outputs/apk -name "*.apk" + + # 13. Upload APK artifact + - name: Upload APK + uses: actions/upload-artifact@v4 + with: + name: app-release + path: android/app/build/outputs/apk/release/app-release.apk \ No newline at end of file diff --git a/package.json b/package.json index 3109643..c7d0d67 100644 --- a/package.json +++ b/package.json @@ -1,63 +1,3 @@ -<<<<<<< HEAD -{ - "name": "PerformicsStoreDNA", - "version": "0.0.1", - "private": true, - "scripts": { - "android": "react-native run-android", - "ios": "react-native run-ios", - "lint": "eslint .", - "start": "react-native start", - "test": "jest" - }, - "dependencies": { - "@react-native-async-storage/async-storage": "^2.2.0", - "@react-native/new-app-screen": "0.80.0", - "@react-navigation/elements": "^2.5.2", - "@react-navigation/native": "^7.1.14", - "@react-navigation/native-stack": "^7.3.21", - "@reduxjs/toolkit": "^2.8.2", - "axios": "^1.10.0", - "react": "19.1.0", - "react-native": "0.80.0", - "react-native-chart-kit": "^6.12.0", - "react-native-element-dropdown": "^2.12.4", - "react-native-keyboard-aware-scroll-view": "^0.9.5", - "react-native-linear-gradient": "^2.8.3", - "react-native-otp-entry": "^1.8.5", - "react-native-safe-area-context": "^5.5.0", - "react-native-screens": "^4.11.1", - "react-native-sqlite-storage": "^6.0.1", - "react-native-svg": "^15.12.0", - "react-native-toast-message": "^2.3.1", - "react-native-vector-icons": "^10.2.0", - "react-redux": "^9.2.0" - }, - "devDependencies": { - "@babel/core": "^7.25.2", - "@babel/preset-env": "^7.25.3", - "@babel/runtime": "^7.25.0", - "@react-native-community/cli": "19.0.0", - "@react-native-community/cli-platform-android": "19.0.0", - "@react-native-community/cli-platform-ios": "19.0.0", - "@react-native/babel-preset": "0.80.0", - "@react-native/eslint-config": "0.80.0", - "@react-native/metro-config": "0.80.0", - "@react-native/typescript-config": "0.80.0", - "@types/jest": "^29.5.13", - "@types/react": "^19.1.0", - "@types/react-test-renderer": "^19.1.0", - "eslint": "^8.19.0", - "jest": "^29.6.3", - "prettier": "2.8.8", - "react-test-renderer": "19.1.0", - "typescript": "5.0.4" - }, - "engines": { - "node": ">=18" - } -} -======= { "name": "PerformicsStoreDNA", "version": "0.0.1", @@ -137,5 +77,4 @@ "engines": { "node": ">=18" } -} ->>>>>>> dabur-store-dna +} \ No newline at end of file