name: Android
on: [push, pull_request]
jobs:
  build:
    runs-on: ubuntu-20.04
    steps:

    - name: 下载源码
      uses: actions/checkout@v1

    - name: 配置JDK
      uses: actions/setup-java@v3
      with:
        java-version: '11'
        distribution: 'temurin'
        cache: gradle

    - name: 下载submodule源码
      run: mv -f .gitmodules_github .gitmodules && git submodule sync && git submodule update --init

    - name: 赋予gradlew文件可执行权限
      run: chmod +x ./Android/gradlew

    - name: 编译
      run: cd Android && ./gradlew build
