diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 9951f4ae4f..566e620645 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -35,8 +35,14 @@ jobs: TMessagesProj/jni/ffmpeg/build TMessagesProj/jni/libvpx/build key: ${{ hashFiles('ffmpeg_status', 'libvpx_status', 'TMessagesProj/jni/*ffmpeg*.sh', 'TMessagesProj/jni/*libvpx*.sh', 'TMessagesProj/jni/patches/ffmpeg/*') }} + - name: Set up JDK 17 + uses: actions/setup-java@v3 + if: steps.cache.outputs.cache-hit != 'true' + with: + java-version: '17' + distribution: 'temurin' - name: Setup Android SDK Tools - uses: android-actions/setup-android@v2 + uses: android-actions/setup-android@v3 if: steps.cache.outputs.cache-hit != 'true' - name: Install NDK if: steps.cache.outputs.cache-hit != 'true' @@ -68,8 +74,14 @@ jobs: path: | TMessagesProj/jni/boringssl/build key: ${{ hashFiles('boringssl_status') }} + - name: Set up JDK 17 + uses: actions/setup-java@v3 + if: steps.cache.outputs.cache-hit != 'true' + with: + java-version: '17' + distribution: 'temurin' - name: Setup Android SDK Tools - uses: android-actions/setup-android@v2 + uses: android-actions/setup-android@v3 if: steps.cache.outputs.cache-hit != 'true' - name: Install NDK if: steps.cache.outputs.cache-hit != 'true' @@ -128,8 +140,14 @@ jobs: path: | TMessagesProj/jni/boringssl/build key: ${{ hashFiles('boringssl_status') }} + - name: Set up JDK 17 + uses: actions/setup-java@v3 + if: steps.cache.outputs.cache-hit != 'true' + with: + java-version: '17' + distribution: 'temurin' - name: Setup Android SDK Tools - uses: android-actions/setup-android@v2 + uses: android-actions/setup-android@v3 if: steps.cache.outputs.cache-hit != 'true' - name: Install NDK if: steps.cache.outputs.cache-hit != 'true' @@ -165,8 +183,14 @@ jobs: path: | TMessagesProj/libs/libv2ray.aar key: ${{ hashFiles('bin/libs/v2ray/*', 'v2ray_status') }} + - name: Set up JDK 17 + uses: actions/setup-java@v3 + if: steps.cache.outputs.cache-hit != 'true' + with: + java-version: '17' + distribution: 'temurin' - name: Setup Android SDK Tools - uses: android-actions/setup-android@v2 + uses: android-actions/setup-android@v3 if: steps.cache.outputs.cache-hit != 'true' - name: Install NDK if: steps.cache.outputs.cache-hit != 'true' @@ -200,8 +224,14 @@ jobs: path: | TMessagesProj/libs/ss-rust-release.aar key: ${{ hashFiles('shadowsocks_status') }} + - name: Set up JDK 17 + uses: actions/setup-java@v3 + if: steps.cache.outputs.cache-hit != 'true' + with: + java-version: '17' + distribution: 'temurin' - name: Setup Android SDK Tools - uses: android-actions/setup-android@v2 + uses: android-actions/setup-android@v3 if: steps.cache.outputs.cache-hit != 'true' - name: Install NDK if: steps.cache.outputs.cache-hit != 'true' @@ -233,8 +263,14 @@ jobs: path: | TMessagesProj/libs/ssr-libev-release.aar key: ${{ hashFiles('shadowsocksr_status') }} + - name: Set up JDK 17 + uses: actions/setup-java@v3 + if: steps.cache.outputs.cache-hit != 'true' + with: + java-version: '17' + distribution: 'temurin' - name: Setup Android SDK Tools - uses: android-actions/setup-android@v2 + uses: android-actions/setup-android@v3 if: steps.cache.outputs.cache-hit != 'true' - name: Install NDK if: steps.cache.outputs.cache-hit != 'true' @@ -251,18 +287,23 @@ jobs: needs: - native - v2ray - # - shadowsocks - # - shadowsocksr + - shadowsocks + - shadowsocksr strategy: matrix: flavor: # - FullRelease - - MiniDebug + - MiniRelease steps: - name: Checkout uses: actions/checkout@v2 + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' - name: Setup Android SDK Tools - uses: android-actions/setup-android@v2 + uses: android-actions/setup-android@v3 - name: Install NDK run: | echo "y" | sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null @@ -319,8 +360,7 @@ jobs: run: | export LOCAL_PROPERTIES="${{ secrets.LOCAL_PROPERTIES }}" export DEBUG_BUILD=true - sed '/signingConfig signingConfigs.release/d' TMessagesProj/build.gradle > TMessagesProj/build.gradle.tmp - mv TMessagesProj/build.gradle.tmp TMessagesProj/build.gradle + sed -i 's/signingConfig signingConfigs.release//g' TMessagesProj/build.gradle ./gradlew TMessagesProj:assemble${{ matrix.flavor }} APK=$(find TMessagesProj/build/outputs/apk -name '*arm64-v8a*.apk')