diff --git a/.github/workflows/build_android.yml b/.github/workflows/build_android.yml index 63444f9..82c3833 100644 --- a/.github/workflows/build_android.yml +++ b/.github/workflows/build_android.yml @@ -19,23 +19,25 @@ jobs: PLAY_STORE_UPLOAD_KEY_PROPERTIES: ${{ secrets.PLAY_STORE_UPLOAD_KEY_PROPERTIES }} PLAY_STORE_UPLOAD_KEY: ${{ secrets.PLAY_STORE_UPLOAD_KEY }} ENVIRONMENT: ${{ github.ref_name == 'master' && 'live' || 'beta'}} + CHANNEL_ID: ${{ secrets.SLACK_CHANNEL_ID }} steps: - name: Checkout uses: actions/checkout@v4 - name: Setup Java - uses: actions/setup-java@v1 + uses: actions/setup-java@v5 with: java-version: "17.x" + cache: 'gradle' - - name: Dar permisos de ejecución al script + - name: Add permissions to script run: chmod +x extract_name@version.sh - name: Extract app version run: echo "APP_VERSION=$(./extract_name@version.sh)" >> $GITHUB_ENV - name: Reading FVM - uses: kuhnroyal/flutter-fvm-config-action@v1 + uses: kuhnroyal/flutter-fvm-config-action@v3 - name: Setup Flutter uses: subosito/flutter-action@v2 @@ -43,6 +45,15 @@ jobs: flutter-version: ${{ env.FLUTTER_VERSION }} channel: ${{ env.FLUTTER_CHANNEL }} architecture: x64 + cache: true + + - name: Cache Pub dependencies + uses: actions/cache@v4 + with: + path: ~/.pub-cache + key: ${{ runner.os }}-pub-android-${{ hashFiles('**/pubspec.lock') }} + restore-keys: | + ${{ runner.os }}-pub-android- - name: Dependencies run: | @@ -50,13 +61,13 @@ jobs: flutter pub run build_runner build --delete-conflicting-outputs flutter pub run intl_utils:generate - - name: Setup Ruby and bundle install + - name: Setup Ruby uses: ruby/setup-ruby@v1 with: ruby-version: "3.3.0" bundler-cache: true working-directory: android - + - name: Get Google Play Console API key run: echo $GOOGLE_PLAY_API_KEY | base64 -d > ./android/fastlane/api-access.json @@ -74,7 +85,7 @@ jobs: id: slack uses: slackapi/slack-github-action@v1.24.0 with: - channel-id: "C08M356URCH" + channel-id: "${{ env.CHANNEL_ID }}" payload: | { "blocks": [ diff --git a/.github/workflows/build_ios.yml b/.github/workflows/build_ios.yml index d76000b..d9d18c4 100644 --- a/.github/workflows/build_ios.yml +++ b/.github/workflows/build_ios.yml @@ -19,6 +19,7 @@ jobs: FASTLANE_PASSWORD: ${{ secrets.FASTLANE_PASSWORD }} FASTLIGHT_APP_STORE_CONNECT_PRIVATE_KEY: ${{ secrets.FASTLIGHT_APP_STORE_CONNECT_PRIVATE_KEY }} ENVIRONMENT: ${{ github.ref_name == 'master' && 'live' || 'beta'}} + CHANNEL_ID: ${{ secrets.SLACK_CHANNEL_ID }} steps: - name: Setup iOS certificates repository SSH uses: shimataro/ssh-key-action@v2 @@ -34,9 +35,9 @@ jobs: run: xcodebuild -version - name: Reading FVM - uses: kuhnroyal/flutter-fvm-config-action@v1 + uses: kuhnroyal/flutter-fvm-config-action@v3 - - name: Dar permisos de ejecución al script + - name: Add permissions to script run: chmod +x extract_name@version.sh - name: Extract app version @@ -48,6 +49,15 @@ jobs: flutter-version: ${{ env.FLUTTER_VERSION }} channel: ${{ env.FLUTTER_CHANNEL }} architecture: x64 + cache: true + + - name: Cache Pub dependencies (Dart) + uses: actions/cache@v4 + with: + path: ~/.pub-cache + key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.lock') }} + restore-keys: | + ${{ runner.os }}-pub- - name: Dependencies run: | @@ -55,11 +65,26 @@ jobs: flutter pub run build_runner build --delete-conflicting-outputs flutter pub run intl_utils:generate + - name: Setup Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: "3.3.0" + bundler-cache: true + working-directory: ios + + - name: Cache CocoaPods + uses: actions/cache@v4 + with: + path: ios/Pods + key: ${{ runner.os }}-pods-${{ hashFiles('ios/Podfile.lock') }} + restore-keys: | + ${{ runner.os }}-pods- + - name: iOS setup working-directory: ios run: | - flutter precache --ios - bundle install + # flutter precache --ios deleted is redundant (subosito does it) + # bundle install is redundant (ruby/setup-ruby does it) pod install - name: Run lane @@ -71,7 +96,7 @@ jobs: id: slack uses: slackapi/slack-github-action@v1.24.0 with: - channel-id: "C08M356URCH" + channel-id: "${{ env.CHANNEL_ID }}" payload: | { "blocks": [ diff --git a/android/gradle.properties b/android/gradle.properties index f018a61..961eab9 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -1,3 +1,5 @@ org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError android.useAndroidX=true android.enableJetifier=true +org.gradle.parallel=true +org.gradle.configureondemand=true \ No newline at end of file