-
-
Notifications
You must be signed in to change notification settings - Fork 5
835 lines (755 loc) · 31.7 KB
/
ci.yml
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
name: CI # Check Gradle and AGP combinations
on:
push:
branches-ignore:
- renovate/configure
concurrency:
# Documentation suggests ${{ github.head_ref }}, but that's only available on pull_request/pull_request_target triggers, so using ${{ github.ref }}.
# On main, we want all builds to complete even if merging happens faster to make it easier to discover at which point something broke.
# More info: https://stackoverflow.com/a/68422069/253468:
group: ${{ github.ref == 'refs/heads/main' && format('ci-main-{0}', github.sha) || format('ci-{0}', github.ref) }}
cancel-in-progress: true
jobs:
validate:
name: "0 🦺 Validation"
uses: TWiStErRob/github-workflows/.github/workflows/validate.yml@1e06403c5d561d70e40109c2701ea3092ca6ded7 # v3
permissions:
contents: read
security-events: write
actions: read
graph:
name: "1 🔨 Graph"
needs: validate
timeout-minutes: 10
permissions:
# actions/checkout
contents: read
runs-on: ubuntu-24.04
defaults:
run:
shell: bash
steps:
- name: "Set up JDK 17."
uses: actions/setup-java@v4
with:
java-version: 17
distribution: zulu
- name: "Set up Android SDK."
uses: android-actions/setup-android@v3
with:
log-accepted-android-sdk-licenses: false
- name: "Checkout ${{ github.ref }} branch in ${{ github.repository }} repository."
uses: actions/checkout@v4
- name: "Build the Graph plugin."
working-directory: graph
run: >
./gradlew
build
detekt
detektMain
detektTest
- name: "Integration test for the Graph plugin."
working-directory: graph/sample
run: >
../gradlew
-p .
--continue
--no-daemon
-x lint
:app:testR
:a:aR
--exclude-task compileRShaders
-Pfast
build:
name: "1 🔨 Build"
needs: validate
timeout-minutes: 30
permissions:
# actions/checkout
contents: read
# github/codeql-action/upload-sarif
security-events: write
# andymckay/cancel-action
actions: write
runs-on: ubuntu-24.04
defaults:
run:
shell: bash
steps:
- name: "Set up JDK 17."
uses: actions/setup-java@v4
with:
java-version: 17
distribution: zulu
- name: "Set up Android SDK."
uses: android-actions/setup-android@v3
with:
log-accepted-android-sdk-licenses: false
- name: "Checkout ${{ github.ref }} branch in ${{ github.repository }} repository."
uses: actions/checkout@v4
# Check publicly available release version first, this should be independent of repository state.
- name: "Verify docs/examples/release."
working-directory: docs/examples/release
if: ${{ success() || failure() }}
run: ./gradlew --no-daemon --no-build-cache --stacktrace assemble check
- name: "Build Gradle plugins."
run: >
./gradlew
--no-daemon
--no-build-cache
--no-configuration-cache
--no-watch-fs
--stacktrace
--continue
jar
validatePlugins
detektMain
detektTest
detektTestFixtures
detektReportMergeSarif
detektReportMergeXml
-Pnet.twisterrob.gradle.build.detektReportMergeIncludedBuilds=true
- name: "Upload 'Detekt Results' artifact."
if: ${{ success() || failure() }}
uses: actions/upload-artifact@v4
with:
name: 'Detekt Results'
if-no-files-found: error
path: |
**/build/reports/detekt/
build/reports/detekt/merge.*
- name: "Publish 'Code scanning results / detekt' GitHub Code Scanning analysis."
uses: github/codeql-action/upload-sarif@v3
if: ${{ success() || failure() }}
with:
sarif_file: ${{ github.workspace }}/build/reports/detekt/merge.sarif
- name: "Cancel other jobs on Build failure, no need to check / test it."
if: ${{ failure() }}
uses: andymckay/[email protected]
- name: "Publish Gradle plugins to mavenLocal()."
# TODEL --no-configuration-cache, because https://github.com/Kotlin/dokka/issues/2231
run: ./gradlew --no-daemon --no-build-cache --no-configuration-cache --stacktrace publishToMavenLocal
- name: "Upload 'Gradle Plugin Validation Report' artifact."
if: ${{ success() || failure() }}
uses: actions/upload-artifact@v4
with:
name: 'Gradle Plugin Validation Report'
if-no-files-found: error
path: |
**/build/reports/plugin-development/validation-report.json
- name: "Upload JARs, Maven and Gradle metadata as 'Intermediate Artifacts' artifact."
if: ${{ success() || failure() }}
uses: actions/upload-artifact@v4
with:
name: 'Intermediate Artifacts'
if-no-files-found: error
path: |
**/build/libs/*.jar
**/build/publications/release/module.json
**/build/publications/release/pom-default.xml
- name: "Upload 'mavenLocal()' artifact."
if: ${{ success() || failure() }}
uses: actions/upload-artifact@v4
with:
name: 'mavenLocal'
if-no-files-found: error
path: |
~/.m2/repository/**
- name: "Parse env.PROJECT_VERSION."
run: echo "PROJECT_VERSION=$(grep --color=never --perl-regexp --only-matching '(?<=^projectVersion=)(.*)$' gradle.properties)" | tee --append "${GITHUB_ENV}"
- name: "Calculate env.SNAPSHOT_VERSION for branches."
# ${{ github.event.pull_request.number }} is not available for push.
if: ${{ endsWith(env.PROJECT_VERSION, '-SNAPSHOT') && github.ref != 'refs/heads/main' }}
run: echo "SNAPSHOT_VERSION=$(echo "${PROJECT_VERSION}" | sed -re "s/^(.*)(-SNAPSHOT)$/\1.$(echo "${GITHUB_REF_NAME}" | tr / -)\2/")" | tee --append "${GITHUB_ENV}"
- name: "Calculate env.SNAPSHOT_VERSION for main."
if: ${{ endsWith(env.PROJECT_VERSION, '-SNAPSHOT') && github.ref == 'refs/heads/main' }}
run: echo "SNAPSHOT_VERSION=$(echo $PROJECT_VERSION)" | tee --append "${GITHUB_ENV}"
- name: "Verify docs/examples/local for release."
working-directory: docs/examples/local
if: ${{ env.SNAPSHOT_VERSION == '' }}
run: |
sed -i.bak -re "s/version \"${PROJECT_VERSION}-SNAPSHOT\"/version \"${PROJECT_VERSION}\"/g" build.gradle.kts
sed -i.bak -re "s/version \"${PROJECT_VERSION}-SNAPSHOT\"/version \"${PROJECT_VERSION}\"/g" settings.gradle.kts
./gradlew --no-daemon --no-build-cache --stacktrace assemble check
- name: "Verify docs/examples/local for snapshot."
working-directory: docs/examples/local
if: ${{ env.SNAPSHOT_VERSION != '' }}
run: ./gradlew --no-daemon --no-build-cache --stacktrace assemble check
- name: "Publish Gradle plugins to Sonatype Snapshot with version ${{ env.SNAPSHOT_VERSION }}."
if: ${{ env.SNAPSHOT_VERSION != '' }}
env:
# Implicit: -PsonatypeUsername=...
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.SONATYPE_USERNAME }}
# Implicit: -PsonatypePassword=...
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONATYPE_PASSWORD }}
# TODEL --no-configuration-cache, because https://github.com/Kotlin/dokka/issues/2231
run: >
./gradlew
--no-daemon
--no-build-cache
--no-configuration-cache
--no-watch-fs
--stacktrace
publishLibraryPublicationToSonatypeRepository
publishPluginMavenPublicationToSonatypeRepository
publishAllPluginMarkerMavenPublicationsToSonatypeRepository
-PprojectVersion="${SNAPSHOT_VERSION}"
- name: "Verify docs/examples/snapshot with version ${{ env.SNAPSHOT_VERSION }}."
working-directory: docs/examples/snapshot
if: ${{ env.SNAPSHOT_VERSION != '' }}
run: |
sed -i.bak -re "s/version \"${PROJECT_VERSION}\"/version \"${SNAPSHOT_VERSION}\"/g" build.gradle.kts
sed -i.bak -re "s/version \"${PROJECT_VERSION}\"/version \"${SNAPSHOT_VERSION}\"/g" settings.gradle.kts
./gradlew --no-daemon --no-build-cache --stacktrace assemble check
check:
name: "2 🛠️ ${{ matrix.name }}"
needs: validate
timeout-minutes: 45
permissions:
# actions/checkout
contents: read
# github/codeql-action/upload-sarif
security-events: write
env:
JOB_NAME: '${{ matrix.name }} (${{ matrix.agp }} on ${{ matrix.gradle }})'
# Capture which Gradle version is running the build to use in some steps.
# Value will be written in a later step using `>> "${GITHUB_ENV}"`.
GRADLE_VERSION: '0.0.0'
runs-on: ubuntu-24.04
defaults:
run:
shell: bash
steps:
- name: "Trigger details."
env:
COMPARE_URL: ${{ github.event.compare }}
run: echo "Running in response to a ${GITHUB_EVENT_NAME} event, building ${COMPARE_URL} changes."
- name: "Set up JDK 17."
uses: actions/setup-java@v4
with:
java-version: 17
distribution: zulu
- name: "Set up Android SDK."
uses: android-actions/setup-android@v3
with:
log-accepted-android-sdk-licenses: false
- name: "Install Android SDK components."
env:
CURRENT_BUILD_TOOLS_VERSION: ${{ matrix.build-tools }}
run: |
# AGP's com.android.SdkConstants.CURRENT_BUILD_TOOLS_VERSION
echo sdkmanager --install "build-tools;${CURRENT_BUILD_TOOLS_VERSION}"
sdkmanager --install "build-tools;${CURRENT_BUILD_TOOLS_VERSION}"
# compileSdk for almost all tests.
echo sdkmanager --install "platforms;android-34"
sdkmanager --install "platforms;android-34"
- name: "Set up JDK(s)."
env:
JAVA_VERSION: ${{ matrix.gradle-java }}
run: |
case ${JAVA_VERSION} in
8)
echo "JAVA_HOME=$JAVA_HOME_8_X64" | tee --append "${GITHUB_ENV}"
;;
11)
echo "JAVA_HOME=$JAVA_HOME_11_X64" | tee --append "${GITHUB_ENV}"
;;
17)
echo "JAVA_HOME=$JAVA_HOME_17_X64" | tee --append "${GITHUB_ENV}"
;;
*)
echo "Unrecognized matrix.gradle-java=${JAVA_VERSION}."
exit 1
;;
esac
- name: "Checkout ${{ github.ref }} branch in ${{ github.repository }} repository."
uses: actions/checkout@v4
# TODEL https://github.com/gradle/wrapper-validation-action/issues/69
# Commented out, because action is not stable enough for parallel workflows ^.
# jobs.build would validate it anyway, although with that, the matrix will still execute the bad code.
# To be sure, lifted as "needs" prerequisite at least until there's some response on the issue.
#- name: Validate Gradle Wrapper JARs.
# uses: gradle/wrapper-validation-action@v1
# To prevent "Welcome to Gradle <version>! Here are the highlights of this release:" in build log, use:
#- run: touch ~/.gradle/notifications/5.6.4/release-features.rendered
- name: "Download Gradle running the build."
run: |
# Run a no-op gradlew command in workspace.
./gradlew --no-daemon --version | tee gradle.version.log
# Capture version for later usage.
# Note: the $ is very important no prevent matching the "Welcome to Gradle x.y.z!" line.
grep --color=never --only-matching --perl-regexp '(?<=Gradle )(\d+\.\d+(?:\.\d+)?(?:-(?:rc|milestone)-\d+)?)$' gradle.version.log > gradle.version
echo "GRADLE_VERSION=$(<gradle.version)" | tee --append "${GITHUB_ENV}"
- name: "Download Gradle ${{ env.GRADLE_VERSION }} running the tests."
env:
GRADLE_VERSION: ${{ matrix.gradle }}
run: |
# Create an empty project with wrapper using ${GRADLE_VERSION}.
mkdir "${HOME}/gradle-${GRADLE_VERSION}"
cd "${HOME}/gradle-${GRADLE_VERSION}"
touch settings.gradle
"${GITHUB_WORKSPACE}/gradlew" wrapper --gradle-version "${GRADLE_VERSION}" --distribution-type all --quiet
# Run a no-op gradlew command in an empty project with a specific wrapper version.
./gradlew --no-daemon --version
- name: "Cache Gradle ${{ env.GRADLE_VERSION }} files."
uses: actions/cache@v4
with:
path: |
# Prevent "Downloading https://services.gradle.org/distributions/gradle-${{ env.GRADLE_VERSION }}-all.zip"
# Prevent "Unzipping /home/${{ env.USER }}/.gradle/wrapper/dists/gradle-${{ env.GRADLE_VERSION }}-all/${ gradle-dist-hash }/gradle-${{ env.GRADLE_VERSION }}-all.zip"
# No need to cache this, as it's cached by default, it takes 4-11 seconds only to do it fresh.
#~/.gradle/wrapper/dists/gradle-${{ env.GRADLE_VERSION }}-all/
# Prevent "Download https://repo1.maven.org/maven2/" during build
~/.gradle/caches/modules-2/
# Prevent "Generating JAR file 'gradle-api-${{ env.GRADLE_VERSION }}.jar'" during build.
~/.gradle/caches/${{ env.GRADLE_VERSION }}/generated-gradle-jars/
key: |
${{ runner.os }}-gradle-${{ env.GRADLE_VERSION }}-${{ hashFiles('**/gradle-wrapper.properties', '**/*.gradle*', 'buildSrc/src/**') }}
restore-keys: |
${{ runner.os }}-gradle-${{ env.GRADLE_VERSION }}-
- name: "Cache Gradle Test Kit ${{ matrix.gradle }} files."
uses: actions/cache@v4
with:
path: |
# Prevent "Downloading https://services.gradle.org/distributions/gradle-${{ matrix.gradle }}-all.zip"
# Prevent "Unzipping /home/${{ env.USER }}/.gradle/wrapper/dists/gradle-${{ matrix.gradle }}-all/${ gradle-dist-hash }/gradle-${{ matrix.gradle }}-all.zip"
# No need to cache this, as it's cached by default, it takes 4-11 seconds only to do it fresh.
#~/.gradle/wrapper/dists/gradle-${{ matrix.gradle }}-all/
# Prevent "Download https://repo1.maven.org/maven2/" during test runs.
/tmp/.gradle-test-kit-${{ env.USER }}-*/caches/modules-2/
# Prevent "Generating JAR file 'gradle-api-${{ matrix.gradle }}.jar'" during test runs.
/tmp/.gradle-test-kit-${{ env.USER }}-*/caches/${{ matrix.gradle }}/generated-gradle-jars/
key: |
${{ runner.os }}-gradle-test-kit-${{ matrix.gradle }}-${{ matrix.agp }}
- name: "Check ${{ env.JOB_NAME }}."
env:
MATRIX_AGP: ${{ matrix.agp }}
MATRIX_KOTLIN: ${{ matrix.kotlin }}
MATRIX_GRADLE: ${{ matrix.gradle }}
# To run specific test, replace `${{ matrix.test-task }}` with `:quality:test --tests '*.HtmlReportTaskTest.runs on lints'`
run: >
./gradlew
--no-daemon
--no-build-cache
--no-configuration-cache
--no-watch-fs
--stacktrace
--continue
${{ matrix.test-task }}
-Pnet.twisterrob.gradle.build.verboseReports=true
-Pnet.twisterrob.test.android.pluginVersion="${MATRIX_AGP}"
-Pnet.twisterrob.test.kotlin.pluginVersion="${MATRIX_KOTLIN}"
-Pnet.twisterrob.gradle.runner.gradleVersion="${MATRIX_GRADLE}"
# -Pnet.twisterrob.test.gradle.javaHomeEnv=JAVA_HOME_${{ matrix.gradle-java }}_X64
- name: "Upload '${{ env.JOB_NAME }} Test Results XMLs' artifact."
if: ${{ success() || failure() }}
uses: actions/upload-artifact@v4
with:
name: '${{ env.JOB_NAME }} Test Results XMLs'
if-no-files-found: error
path: |
**/build/test-results/test/TEST-*.xml
- name: "Upload '${{ env.JOB_NAME }} Test Results HTML' artifact."
if: ${{ success() || failure() }}
uses: actions/upload-artifact@v4
with:
name: '${{ env.JOB_NAME }} Test Results HTML'
if-no-files-found: error
path: |
build/reports/tests/all/
- name: "Upload '${{ env.JOB_NAME }} Test Results HTMLs' artifact."
if: ${{ success() || failure() }}
uses: actions/upload-artifact@v4
with:
name: '${{ env.JOB_NAME }} Test Results HTMLs'
if-no-files-found: error
path: |
**/build/reports/tests/test/
- name: "Cleanup Gradle files before caching."
run: |
# Don't cache lock files to prevent breaking future builds
rm -f ~/.gradle/caches/modules-2/modules-2.lock
rm -f ~/.gradle/caches/modules-2/gc.properties
rm -fr ~/.gradle/caches/*/plugin-resolution/
- name: "Cleanup Gradle Test Kit files before caching."
run: |
# Don't cache lock files to prevent breaking future builds
rm -f /tmp/.gradle-test-kit-${USER}-*/caches/modules-2/modules-2.lock
rm -f /tmp/.gradle-test-kit-${USER}-*/caches/modules-2/gc.properties
rm -fr /tmp/.gradle-test-kit-${USER}-*/caches/*/plugin-resolution/
strategy:
fail-fast: false
matrix:
# See https://docs.gradle.org/current/userguide/compatibility.html#kotlin.
# See https://developer.android.com/studio/releases/gradle-plugin#updating-gradle.
#gradle: []
# See https://developer.android.com/studio/releases/gradle-plugin.
#agp: []
# See https://developer.android.com/studio/releases/build-tools#notes.
#build-tools: []
# See https://kotlinlang.org/docs/releases.html.
#kotlin: []
# Potential to run specific test tasks, e.g. :plugin can be run separately.
#test-task: []
include:
- name: "AGP 7.0.x on Gradle 7.0+"
gradle: '7.0.2'
gradle-java: '11'
agp: '7.0.4'
build-tools: '30.0.2'
kotlin: '1.4.32'
test-task: 'testReport :quality:tests'
- name: "AGP 7.0.x on Gradle 7.0+ - plugin"
gradle: '7.0.2'
gradle-java: '11'
agp: '7.0.4'
build-tools: '34.0.0'
kotlin: '1.4.32'
test-task: 'testReport :plugin:tests'
- name: "AGP 7.0.x on Gradle 7.x"
gradle: '7.6.4'
gradle-java: '11'
agp: '7.0.4'
build-tools: '30.0.2'
kotlin: '1.4.32'
test-task: 'testReport :quality:tests'
- name: "AGP 7.0.x on Gradle 7.x - plugin"
gradle: '7.6.4'
gradle-java: '11'
agp: '7.0.4'
build-tools: '34.0.0'
kotlin: '1.4.32'
test-task: 'testReport :plugin:tests'
- name: "AGP 7.1.x on Gradle 7.2+"
gradle: '7.2'
gradle-java: '11'
agp: '7.1.3'
build-tools: '30.0.3'
kotlin: '1.4.32'
test-task: 'testReport :quality:tests'
- name: "AGP 7.1.x on Gradle 7.2+ - plugin"
gradle: '7.2'
gradle-java: '11'
agp: '7.1.3'
build-tools: '34.0.0'
kotlin: '1.4.32'
test-task: 'testReport :plugin:tests'
- name: "AGP 7.1.x on Gradle 7.x"
gradle: '7.6.4'
gradle-java: '11'
agp: '7.1.3'
build-tools: '30.0.3'
kotlin: '1.4.32'
test-task: 'testReport :quality:tests'
- name: "AGP 7.1.x on Gradle 7.x - plugin"
gradle: '7.6.4'
gradle-java: '11'
agp: '7.1.3'
build-tools: '34.0.0'
kotlin: '1.4.32'
test-task: 'testReport :plugin:tests'
- name: "AGP 7.2.x on Gradle 7.3+"
gradle: '7.3.3'
gradle-java: '11'
agp: '7.2.2'
build-tools: '30.0.3'
kotlin: '1.4.32'
test-task: 'testReport :quality:tests'
- name: "AGP 7.2.x on Gradle 7.3+ - plugin"
gradle: '7.3.3'
gradle-java: '11'
agp: '7.2.2'
build-tools: '34.0.0'
kotlin: '1.4.32'
test-task: 'testReport :plugin:tests'
- name: "AGP 7.2.x on Gradle 7.x"
gradle: '7.6.4'
gradle-java: '11'
agp: '7.2.2'
build-tools: '30.0.3'
kotlin: '1.4.32'
test-task: 'testReport :quality:tests'
- name: "AGP 7.2.x on Gradle 7.x - plugin"
gradle: '7.6.4'
gradle-java: '11'
agp: '7.2.2'
build-tools: '34.0.0'
kotlin: '1.4.32'
test-task: 'testReport :plugin:tests'
# See GradlePluginUtils.kt > pluginList: AGP 7.3 requires Kotlin 1.5.20+.
# 1.5.32 would be enough, but have to jump further forward because:
# org.jetbrains.kotlin.gradle.internal.kapt.KaptWithoutKotlincTask.kotlinStdlibClasspath is eagerly initialized.
# jarSearchingUtil.kt > findPotentialModuleJars uses a HashSet
# Sometimes (e.g. always on CI, not on Window locally) the hash ordering prefers
# classpath files('.../plugin/languages/build/classes/java/main')
# over
# classpath files('.../kotlin-stdlib-1.5.32.jar')
# and jarSearchingUtil.kt > hasEntry assumes that all "files" are .jar.
- name: "AGP 7.3.x on Gradle 7.4+"
gradle: '7.4.2'
gradle-java: '11'
agp: '7.3.1'
kotlin: '1.6.21'
build-tools: '30.0.3'
test-task: 'testReport :quality:tests'
- name: "AGP 7.3.x on Gradle 7.4+ - plugin"
gradle: '7.4.2'
gradle-java: '11'
agp: '7.3.1'
kotlin: '1.6.21'
build-tools: '34.0.0'
test-task: 'testReport :plugin:tests'
- name: "AGP 7.3.x on Gradle 7.x"
gradle: '7.6.4'
gradle-java: '11'
agp: '7.3.1'
kotlin: '1.6.21'
build-tools: '30.0.3'
test-task: 'testReport :quality:tests'
- name: "AGP 7.3.x on Gradle 7.x - plugin"
gradle: '7.6.4'
gradle-java: '11'
agp: '7.3.1'
kotlin: '1.6.21'
build-tools: '34.0.0'
test-task: 'testReport :plugin:tests'
- name: "AGP 7.4.x on Gradle 7.5+"
gradle: '7.5.1'
gradle-java: '11'
agp: '7.4.2'
kotlin: '1.6.21'
build-tools: '30.0.3'
test-task: 'testReport :quality:tests'
- name: "AGP 7.4.x on Gradle 7.5+ - plugin"
gradle: '7.5.1'
gradle-java: '11'
agp: '7.4.2'
kotlin: '1.6.21'
build-tools: '34.0.0'
test-task: 'testReport :plugin:tests'
- name: "AGP 7.4.x on Gradle 7.x"
gradle: '7.6.4'
gradle-java: '11'
agp: '7.4.2'
kotlin: '1.6.21'
build-tools: '30.0.3'
test-task: 'testReport :quality:tests'
- name: "AGP 7.4.x on Gradle 7.x - plugin"
gradle: '7.6.4'
gradle-java: '11'
agp: '7.4.2'
kotlin: '1.6.21'
build-tools: '34.0.0'
test-task: 'testReport :plugin:tests'
- name: "AGP 7.4.x on Gradle 8.x"
gradle: '8.7'
gradle-java: '11'
agp: '7.4.2'
kotlin: '1.6.21'
build-tools: '30.0.3'
test-task: 'testReport :quality:tests'
- name: "AGP 7.4.x on Gradle 8.x - plugin"
gradle: '8.7'
gradle-java: '11'
agp: '7.4.2'
kotlin: '1.6.21'
build-tools: '34.0.0'
test-task: 'testReport :plugin:tests'
- name: "AGP 8.0.x on Gradle 8.0+"
gradle: '8.0.2'
gradle-java: '17'
agp: '8.0.2'
kotlin: '1.6.21'
build-tools: '30.0.3'
test-task: 'testReport :quality:tests'
- name: "AGP 8.0.x on Gradle 8.0+ - plugin"
gradle: '8.0.2'
gradle-java: '17'
agp: '8.0.2'
kotlin: '1.6.21'
build-tools: '34.0.0'
test-task: 'testReport :plugin:tests'
- name: "AGP 8.0.x on Gradle 8.x"
gradle: '8.7'
gradle-java: '17'
agp: '8.0.2'
kotlin: '1.6.21'
build-tools: '30.0.3'
test-task: 'testReport :quality:tests'
- name: "AGP 8.0.x on Gradle 8.x - plugin"
gradle: '8.7'
gradle-java: '17'
agp: '8.0.2'
kotlin: '1.6.21'
build-tools: '34.0.0'
test-task: 'testReport :plugin:tests'
- name: "AGP 8.1.x on Gradle 8.0+"
gradle: '8.0.2'
gradle-java: '17'
agp: '8.1.4'
kotlin: '1.6.21'
build-tools: '33.0.1'
test-task: 'testReport :quality:tests'
- name: "AGP 8.1.x on Gradle 8.0+ - plugin"
gradle: '8.0.2'
gradle-java: '17'
agp: '8.1.4'
kotlin: '1.6.21'
build-tools: '34.0.0'
test-task: 'testReport :plugin:tests'
- name: "AGP 8.1.x on Gradle 8.x"
gradle: '8.7'
gradle-java: '17'
agp: '8.1.4'
kotlin: '1.6.21'
build-tools: '33.0.1'
test-task: 'testReport :quality:tests'
- name: "AGP 8.1.x on Gradle 8.x - plugin"
gradle: '8.7'
gradle-java: '17'
agp: '8.1.4'
kotlin: '1.6.21'
build-tools: '34.0.0'
test-task: 'testReport :plugin:tests'
- name: "AGP 8.2.x on Gradle 8.2+"
gradle: '8.2.1'
gradle-java: '17'
agp: '8.2.2'
kotlin: '1.6.21'
build-tools: '34.0.0'
test-task: 'testReport :quality:tests'
- name: "AGP 8.2.x on Gradle 8.2+ - plugin"
gradle: '8.2.1'
gradle-java: '17'
agp: '8.2.2'
kotlin: '1.6.21'
build-tools: '34.0.0'
test-task: 'testReport :plugin:tests'
- name: "AGP 8.2.x on Gradle 8.x"
gradle: '8.7'
gradle-java: '17'
agp: '8.2.2'
kotlin: '1.6.21'
build-tools: '34.0.0'
test-task: 'testReport :quality:tests'
- name: "AGP 8.2.x on Gradle 8.x - plugin"
gradle: '8.7'
gradle-java: '17'
agp: '8.2.2'
kotlin: '1.6.21'
build-tools: '34.0.0'
test-task: 'testReport :plugin:tests'
- name: "AGP 8.3.x on Gradle 8.4+"
gradle: '8.4'
gradle-java: '17'
agp: '8.3.1'
kotlin: '1.6.21'
build-tools: '34.0.0'
test-task: 'testReport :quality:tests'
- name: "AGP 8.3.x on Gradle 8.4+ - plugin"
gradle: '8.4'
gradle-java: '17'
agp: '8.3.1'
kotlin: '1.6.21'
build-tools: '34.0.0'
test-task: 'testReport :plugin:tests'
- name: "AGP 8.3.x on Gradle 8.x"
gradle: '8.7'
gradle-java: '17'
agp: '8.3.1'
kotlin: '1.6.21'
build-tools: '34.0.0'
test-task: 'testReport :quality:tests'
- name: "AGP 8.3.x on Gradle 8.x - plugin"
gradle: '8.7'
gradle-java: '17'
agp: '8.3.1'
kotlin: '1.6.21'
build-tools: '34.0.0'
test-task: 'testReport :plugin:tests'
- name: "AGP 8.4.x on Gradle 8.6+"
gradle: '8.6'
gradle-java: '17'
agp: '8.4.0'
kotlin: '1.6.21'
build-tools: '34.0.0'
test-task: 'testReport :quality:tests'
- name: "AGP 8.4.x on Gradle 8.6+ - plugin"
gradle: '8.6'
gradle-java: '17'
agp: '8.4.0'
kotlin: '1.6.21'
build-tools: '34.0.0'
test-task: 'testReport :plugin:tests'
- name: "AGP 8.4.x on Gradle 8.x"
gradle: '8.7'
gradle-java: '17'
agp: '8.4.0'
kotlin: '1.6.21'
build-tools: '34.0.0'
test-task: 'testReport :quality:tests'
- name: "AGP 8.4.x on Gradle 8.x - plugin"
gradle: '8.7'
gradle-java: '17'
agp: '8.4.0'
kotlin: '1.6.21'
build-tools: '34.0.0'
test-task: 'testReport :plugin:tests'
- name: "AGP stable on Gradle stable"
gradle: '8.7' # https://gradle.org/releases/
gradle-java: '17'
agp: '8.4.0' # https://maven.google.com/web/index.html?q=build#com.android.tools.build:gradle
kotlin: '1.9.23' # https://kotlinlang.org/docs/releases.html#release-details
build-tools: '34.0.0'
test-task: 'testReport :quality:tests'
- name: "AGP stable on Gradle stable - plugin"
gradle: '8.7' # https://gradle.org/releases/
gradle-java: '17'
agp: '8.4.0' # https://maven.google.com/web/index.html?q=build#com.android.tools.build:gradle
kotlin: '1.9.23' # https://kotlinlang.org/docs/releases.html#release-details
build-tools: '34.0.0'
test-task: 'testReport :plugin:tests'
- name: "AGP preview on Gradle preview"
gradle: '8.7' # https://services.gradle.org/distributions/
gradle-java: '17'
agp: '8.4.0' # https://maven.google.com/web/index.html?q=build#com.android.tools.build:gradle
kotlin: '2.0.0-Beta4' # https://kotlinlang.org/docs/eap.html#build-details
build-tools: '34.0.0' # https://dl.google.com/android/repository/repository2-3.xml <remotePackage path="build-tools;
test-task: 'testReport :quality:tests'
- name: "AGP preview on Gradle preview - plugin"
gradle: '8.7' # https://services.gradle.org/distributions/
gradle-java: '17'
agp: '8.4.0' # https://maven.google.com/web/index.html?q=build#com.android.tools.build:gradle
kotlin: '2.0.0-Beta4' # https://kotlinlang.org/docs/eap.html#build-details
build-tools: '34.0.0' # https://dl.google.com/android/repository/repository2-3.xml <remotePackage path="build-tools;
test-task: 'testReport :plugin:tests'
# Separate job for parsing the XML output, since the matrix runs on multiple machines.
publish-test-results:
name: "3 📢 Publish Tests Results"
needs: check
# The dependency job might be skipped, we don't need to run this job then.
if: ${{ success() || failure() }}
# Should finish under 2 minutes on success, so give it a big buffer in case failures take more time.
# It often runs out of time, because 1 of the many artifact downloads takes many minutes.
timeout-minutes: 10
permissions:
# EnricoMi/publish-unit-test-result-action
checks: write
runs-on: ubuntu-24.04
steps:
- name: "Download '... Test Results XMLs' Artifacts."
uses: actions/download-artifact@v4
with:
pattern: '* Test Results XMLs'
path: artifacts
- name: "Publish 'Test Results' check suite."
# Publish as much as possible even if some artifacts are missing (hopefully those jobs have failed separately).
if: ${{ success() || failure() }}
uses: EnricoMi/publish-unit-test-result-action@v2
with:
check_name: '0 🔔 Test Results'
comment_mode: off
report_individual_runs: true
action_fail_on_inconclusive: true
test_changes_limit: 0
junit_files: 'artifacts/* Test Results XMLs/**/*.xml'