diff --git a/.buildkite/android.yml b/.buildkite/android.yml index c02f6c7c4..ff0be5687 100644 --- a/.buildkite/android.yml +++ b/.buildkite/android.yml @@ -1,19 +1,19 @@ steps: - label: ':robot_face: Android Build' command: - 'curl https://sh.rustup.rs -sSf | sh -s -- -y' - 'source /root/.cargo/env' - 'rustup target add aarch64-linux-android arm-linux-androideabi i686-linux-android x86_64-linux-android' - 'apt update && apt install -y autoconf libtool build-essential cmake git libgtest-dev libssl-dev zlib1g-dev' + - 'scripts/install_protobuf.sh' - 'yarn cleaninstall --frozen-lockfile --skip-optional' - 'cd native/android' - - 'scripts/install_protobuf.sh' - './gradlew clean && ./gradlew bundleRelease --no-daemon "-Dorg.gradle.jvmargs=-Xmx32g -XX:MaxPermSize=32g -XX:+HeapDumpOnOutOfMemoryError"' plugins: - docker#v3.13.0: image: 'reactnativecommunity/react-native-android:latest' shell: ['/bin/bash', '-e', '-c'] environment: - 'BUILDKITE=true' agents: - 'autoscaling=true' diff --git a/.github/workflows/android_ci.yml b/.github/workflows/android_ci.yml index 5ea8a4fc1..6dc639bce 100644 --- a/.github/workflows/android_ci.yml +++ b/.github/workflows/android_ci.yml @@ -1,58 +1,58 @@ name: Android Build CI on: push: branches: [master] paths-ignore: - 'landing/**' - 'web/**' - 'docs/**' - 'keyserver/**' - 'desktop/**' jobs: build: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 - name: set up JDK 11 uses: actions/setup-java@v2 with: java-version: '11' distribution: 'adopt' - name: rustup target add aarch64-linux-android arm-linux-androideabi i686-linux-android x86_64-linux-android run: rustup target add aarch64-linux-android arm-linux-androideabi i686-linux-android x86_64-linux-android - name: Install Protobuf compiler - working-directory: ./native/android/scripts + working-directory: ./scripts run: sudo ./install_protobuf.sh - name: Install Yarn run: npm install -g yarn - name: yarn --frozen-lockfile --network-timeout 180000 run: yarn --frozen-lockfile --network-timeout 180000 - name: Save ANDROID_KEY_STORE_B64 to file env: ANDROID_KEY_STORE_B64: ${{secrets.ANDROID_KEY_STORE_B64}} run: echo "$ANDROID_KEY_STORE_B64" > ANDROID_KEY_STORE_B64.b64 - name: Save ANDROID_KEY_STORE to file run: base64 -d ANDROID_KEY_STORE_B64.b64 > android_key_store.keystore - name: Configure gradle.properties run: | mkdir ~/.gradle touch ~/.gradle/gradle.properties echo "COMM_UPLOAD_STORE_FILE=$(pwd)/android_key_store.keystore" >> ~/.gradle/gradle.properties echo "COMM_UPLOAD_KEY_ALIAS=AndroidSigningKey" >> ~/.gradle/gradle.properties - name: Build with Gradle working-directory: ./native/android env: ANDROID_SIGNING_PASSWORD: ${{secrets.ANDROID_SIGNING_PASSWORD}} run: ./gradlew bundleRelease diff --git a/.github/workflows/android_release.yml b/.github/workflows/android_release.yml index cb3cb48b3..eb222edfc 100644 --- a/.github/workflows/android_release.yml +++ b/.github/workflows/android_release.yml @@ -1,61 +1,61 @@ name: Android Build/Upload to Play Store Console on: release: types: [published] jobs: build: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 - name: set up JDK 11 uses: actions/setup-java@v2 with: java-version: '11' distribution: 'adopt' - name: rustup target add aarch64-linux-android arm-linux-androideabi i686-linux-android x86_64-linux-android run: rustup target add aarch64-linux-android arm-linux-androideabi i686-linux-android x86_64-linux-android - name: Install Protobuf compiler - working-directory: ./native/android/scripts + working-directory: ./scripts run: sudo ./install_protobuf.sh - name: Install Yarn run: npm install -g yarn - name: yarn --frozen-lockfile --network-timeout 180000 run: yarn --frozen-lockfile --network-timeout 180000 - name: Save ANDROID_KEY_STORE_B64 to file env: ANDROID_KEY_STORE_B64: ${{secrets.ANDROID_KEY_STORE_B64}} run: echo "$ANDROID_KEY_STORE_B64" > ANDROID_KEY_STORE_B64.b64 - name: Save ANDROID_KEY_STORE to file run: base64 -d ANDROID_KEY_STORE_B64.b64 > android_key_store.keystore - name: Configure gradle.properties run: | mkdir ~/.gradle touch ~/.gradle/gradle.properties echo "COMM_UPLOAD_STORE_FILE=$(pwd)/android_key_store.keystore" >> ~/.gradle/gradle.properties echo "COMM_UPLOAD_KEY_ALIAS=AndroidSigningKey" >> ~/.gradle/gradle.properties - name: Build with Gradle working-directory: ./native/android env: ANDROID_SIGNING_PASSWORD: ${{secrets.ANDROID_SIGNING_PASSWORD}} run: ./gradlew bundleRelease - name: Save PLAY_STORE_PUBLISHING_KEY to file working-directory: ./native/android env: PLAY_STORE_PUBLISHING_KEY: ${{secrets.PLAY_STORE_PUBLISHING_KEY}} run: echo "$PLAY_STORE_PUBLISHING_KEY" > PLAY_STORE_PUBLISHING_KEY.json - name: Upload to Google Play working-directory: ./native/android run: node upload-aab.js diff --git a/native/android/scripts/install_protobuf.sh b/scripts/install_protobuf.sh similarity index 100% rename from native/android/scripts/install_protobuf.sh rename to scripts/install_protobuf.sh