Create build.gradle #38
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build APK (Ant) | |
| on: | |
| push: | |
| branches: [ "master" ] | |
| pull_request: | |
| branches: [ "master" ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Set up JDK 8 | |
| uses: actions/setup-java@v3 | |
| with: | |
| distribution: temurin | |
| java-version: 8 | |
| - name: Install Ant | |
| run: sudo apt-get install -y ant | |
| - name: Install Android SDK (legacy) | |
| run: | | |
| wget https://dl.google.com/android/repository/tools_r25.2.5-linux.zip -O sdk-tools.zip | |
| unzip sdk-tools.zip -d $HOME/android-sdk | |
| yes | $HOME/android-sdk/tools/android update sdk --no-ui --all --filter build-tools-25.0.3,android-15,platform-tools | |
| - name: Fix Ant tasks | |
| run: | | |
| export ANDROID_HOME=$HOME/android-sdk | |
| mkdir -p $HOME/.ant/lib | |
| cp $ANDROID_HOME/tools/lib/ant-tasks.jar $HOME/.ant/lib/ | |
| cp $ANDROID_HOME/tools/lib/sdklib.jar $HOME/.ant/lib/ | |
| - name: Build APK with Ant | |
| run: | | |
| export ANDROID_HOME=$HOME/android-sdk | |
| ant debug | |
| - name: Upload APK | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: DroidVNC-APK | |
| path: bin/*.apk |