@@ -15,25 +15,11 @@ jobs:
1515 check-codestyle :
1616 runs-on : ubuntu-latest
1717 steps :
18- - name : Checkout repository
19- uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
20- with :
21- fetch-depth : 0
22-
23- - name : Set up JDK
24- uses : actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
25- with :
26- distribution : temurin
27- java-version : 20
28-
29- - name : Copy CI gradle.properties
30- run : mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
18+ - name : Setup build environment
19+ uses : android-password-store/android-password-store/.github/reusable-workflows/setup-gradle@develop
3120
3221 - name : Check codestyle
33- uses : gradle/actions/setup-gradle@6cec5d49d4d6d4bb982fbed7047db31ea6d38f11 # v3
34- with :
35- arguments : ktfmtCheck
36- gradle-home-cache-cleanup : true
22+ run : ./gradlew ktfmtCheck
3723
3824 - name : Upload Kotlin build report
3925 if : " ${{ always() }}"
@@ -45,25 +31,11 @@ jobs:
4531 unit-tests :
4632 runs-on : ubuntu-latest
4733 steps :
48- - name : Checkout repository
49- uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
50- with :
51- fetch-depth : 0
52-
53- - name : Set up JDK
54- uses : actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
55- with :
56- distribution : temurin
57- java-version : 20
58-
59- - name : Copy CI gradle.properties
60- run : mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
34+ - name : Setup build environment
35+ uses : android-password-store/android-password-store/.github/reusable-workflows/setup-gradle@develop
6136
6237 - name : Run unit tests
63- uses : gradle/actions/setup-gradle@6cec5d49d4d6d4bb982fbed7047db31ea6d38f11 # v3
64- with :
65- arguments : test -PslimTests
66- gradle-home-cache-cleanup : true
38+ run : ./gradlew test -PslimTests
6739
6840 - name : (Fail-only) Upload test report
6941 if : " ${{ failure() }}"
@@ -82,25 +54,11 @@ jobs:
8254 build-apks :
8355 runs-on : ubuntu-latest
8456 steps :
85- - name : Checkout repository
86- uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
87- with :
88- fetch-depth : 0
89-
90- - name : Set up JDK
91- uses : actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
92- with :
93- distribution : temurin
94- java-version : 20
95-
96- - name : Copy CI gradle.properties
97- run : mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
57+ - name : Setup build environment
58+ uses : android-password-store/android-password-store/.github/reusable-workflows/setup-gradle@develop
9859
9960 - name : Build debug APKs
100- uses : gradle/actions/setup-gradle@6cec5d49d4d6d4bb982fbed7047db31ea6d38f11 # v3
101- with :
102- arguments : assembleFreeDebug assembleNonFreeDebug assembleNonFreeRelease
103- gradle-home-cache-cleanup : true
61+ run : ./gradlew assembleFreeDebug assembleNonFreeDebug assembleNonFreeRelease
10462
10563 - name : Upload Kotlin build report
10664 if : " ${{ always() }}"
@@ -112,25 +70,11 @@ jobs:
11270 check-api :
11371 runs-on : ubuntu-latest
11472 steps :
115- - name : Checkout repository
116- uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
117- with :
118- fetch-depth : 0
119-
120- - name : Set up JDK
121- uses : actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
122- with :
123- distribution : temurin
124- java-version : 20
125-
126- - name : Copy CI gradle.properties
127- run : mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
73+ - name : Setup build environment
74+ uses : android-password-store/android-password-store/.github/reusable-workflows/setup-gradle@develop
12875
12976 - name : Check library API
130- uses : gradle/actions/setup-gradle@6cec5d49d4d6d4bb982fbed7047db31ea6d38f11 # v3
131- with :
132- arguments : metalavaCheckCompatibilityRelease
133- gradle-home-cache-cleanup : true
77+ run : ./gradlew metalavaCheckCompatibilityRelease
13478
13579 - name : Upload Kotlin build report
13680 if : " ${{ always() }}"
@@ -142,25 +86,11 @@ jobs:
14286 lint :
14387 runs-on : ubuntu-latest
14488 steps :
145- - name : Checkout repository
146- uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
147- with :
148- fetch-depth : 0
149-
150- - name : Set up JDK
151- uses : actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
152- with :
153- distribution : temurin
154- java-version : 20
155-
156- - name : Copy CI gradle.properties
157- run : mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
89+ - name : Setup build environment
90+ uses : android-password-store/android-password-store/.github/reusable-workflows/setup-gradle@develop
15891
15992 - name : Run Lint
160- uses : gradle/actions/setup-gradle@6cec5d49d4d6d4bb982fbed7047db31ea6d38f11 # v3
161- with :
162- arguments : lint
163- gradle-home-cache-cleanup : true
93+ run : ./gradlew lint
16494
16595 - name : Upload Kotlin build report
16696 if : " ${{ always() }}"
0 commit comments