Repository navigation
60 lines (47 loc) · 1.63 KB
/
Copy pathandroid-style.yml
File metadata and controls
60 lines (47 loc) · 1.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#
# © 2026-present https://github.com/cengiz-pz
#
name: Android Code Style
on:
pull_request:
branches:
- main
paths:
- 'android/src/**/*.java'
- 'android/src/**/*.kt'
- 'android/src/**/*.xml'
jobs:
android-style:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Set up Java
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: 21
- name: Install ktlint
uses: ./.github/actions/install-ktlint
- name: Run ktlint
run: ktlint "android/src/**/*.kt" "!android/src/**/*Plugin.kt"
- name: Run Checkstyle
run: |
CHECKSTYLE_VERSION="12.3.1"
wget "https://github.com/checkstyle/checkstyle/releases/download/checkstyle-${CHECKSTYLE_VERSION}/checkstyle-${CHECKSTYLE_VERSION}-all.jar" \
-O checkstyle-all.jar
java -jar checkstyle-all.jar -c .github/config/checkstyle.xml android/src
- name: Install Node
uses: ./.github/actions/install-node
- name: Install Prettier and XML plugin
run: npm install --save-dev prettier @prettier/plugin-xml
- name: Check XML formatting
run: |
npx prettier \
--config .github/config/prettier.xml.json \
--parser xml \
--check "android/src/**/*.xml"
- name: Install editorconfig-checker
uses: ./.github/actions/install-ec
- name: Verify EditorConfig (Final Newline & Trailing Space)
run: find android/src \( -name "*.java" -o -name "*.kt" -o -name "*.xml" \) | xargs editorconfig-checker