Skip to content

build: 升级compileSdk到34 #158

build: 升级compileSdk到34

build: 升级compileSdk到34 #158

name: pr-check-format-code
on:
pull_request:
branches: [ master ]
jobs:
check-format-code:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
- name: Cache android-studio
id: cache-android-studio
uses: actions/cache@v2
with:
path: android-studio
key: ${{ runner.os }}-android-studio
- name: download android-studio
if: steps.cache-android-studio.outputs.cache-hit != 'true'
run: |
wget https://redirector.gvt1.com/edgedl/android/studio/ide-zips/2021.1.1.20/android-studio-2021.1.1.20-linux.tar.gz
tar -xvzf android-studio-2021.1.1.20-linux.tar.gz
rm -rf android-studio-2021.1.1.20-linux.tar.gz
- name: use android-studio format all files
run: ./android-studio/bin/format.sh -s .idea/codeStyles/Project.xml -r -m \*.java,\*.kt,\*.xml .
- name: show diff for files not formated
run: |
if ! git diff --quiet; then
git diff --exit-code
fi