| types: [opened, reopened, synchronize] |
| 6 | paths-ignore: |
| 7 | - '**.md' |
| 8 | - '**.xml' |
| 9 |
| 10 | jobs: |
| 11 | build: |
| 12 | name: Gradle Build |
| 13 | runs-on: ubuntu-latest |
| 14 | env: |
| 15 | CCACHE_COMPILERCHECK: "%compiler% -dumpmachine; %compiler% -dumpversion" |
| 16 | CCACHE_NOHASHDIR: "true" |
| 17 | CCACHE_MAXSIZE: "5G" |
| 18 | CCACHE_HARDLINK: "true" |
| 19 | steps: |
| 20 | - name: Checkout |
| 21 | uses: actions/checkout@v7 |
| 22 | with: |
| 23 | submodules: 'recursive' |
| 24 | - name: Set up JDK 17 |
| 25 | uses: actions/setup-java@v6 |
| 26 | with: |
| 27 | java-version: '17' |
| 28 | distribution: 'temurin' |
| 29 | - name: Setup Android SDK Tools |
| 30 | uses: android-actions/setup-android@v4 |
| 31 | with: |
| 32 | packages: 'platform-tools' |
| 33 | - name: Set up ccache |
| 34 | uses: hendrikmuhs/ccache-action@v1 |
| 35 | with: |
| 36 | append-timestamp: false |
| 37 | key: native-${{ github.job }} |
| 38 | max-size: 5G |
| 39 | - name: Install NDK |
| 40 | run: | |
| 41 | echo "y" | sdkmanager --install "ndk;27.2.12479018" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null |
| 42 | echo "sdk.dir=${ANDROID_HOME}" > local.properties |
| 43 | echo "ndk.dir=${ANDROID_HOME}/ndk/27.2.12479018" >> local.properties |
| 44 | - name: Configure Gradle |
| 45 | run: | |
| 46 | sed -i "s/2000000000000/$(date +%s%N | cut -c1-13)/g" gradle.properties |
| 47 | echo "sdk.dir=${ANDROID_HOME}" >> local.properties |
| 48 | - name: Setup Gradle |
| 49 | uses: gradle/actions/setup-gradle@v6 |
| 50 | - name: Debug Build |
| 51 | run: | |
| 52 | export LOCAL_PROPERTIES="${{ secrets.LOCAL_PROPERTIES }}" |
| 53 | export DEBUG_BUILD=true |
| 54 | sed -i 's/signingConfig signingConfigs.release//g' TMessagesProj/build.gradle |
| 55 | ./gradlew TMessagesProj:assembleRelease --build-cache --no-configuration-cache |
| 56 |