Skip to content

Feature/19 upgrade - #29

Merged
arburk merged 6 commits into
mainfrom
feature/19-upgrade
Aug 1, 2026
Merged

Feature/19 upgrade#29
arburk merged 6 commits into
mainfrom
feature/19-upgrade

Conversation

@arburk

@arburk arburk commented Jul 30, 2026

Copy link
Copy Markdown
Owner

resolves issue #19

arburk added 6 commits July 30, 2026 22:25
The instrumented-test workflow still ran on JDK 17 and on the previous
major of every action, while android_ci.yml had already moved on.

- connected_check_on_pr.yml: JDK 17 -> 21, checkout@v4 -> v7,
  setup-java@v4 -> v5, cache@v4 -> v6, upload-artifact@v4 -> v7
- replace the archived gradle/gradle-build-action@v3 step, which only set
  Gradle up and never built anything, with an explicit
  "./gradlew assembleDebug assembleDebugAndroidTest" so a compile error
  fails the job before the emulator matrix boots
- android_ci.yml: add timeout-minutes and upload the reports with
  if: always(), so they are also available when the build fails
…evices

Managed devices only existed for API 27, 28, 30 and 33, so the gaps up to
the current compileSdk were untestable. Devices are now defined for every
level from 27 to 37; the supportedSdks group still runs 28 only, the rest
stay commented out as before.

Image sources differ per level: API 29 has no ATD image (plain aosp), and
API 37 ships neither an AOSP nor an ATD image, so it uses google_apis.
API 37 also gets pageAlignment = FORCE_4KB_PAGES, because AGP cannot
derive the page size for that level yet and warns on every build - the
app has no native code, so the 4 kb image it would pick anyway is fine.

Raising targetSdk from 33 to 35 requires a foreground service type: from
API 34 on, startForeground() without one throws
MissingForegroundServiceTypeException and lint fails the build.
TimerService is declared as specialUse - it keeps a timer ticking and
plays short cues rather than doing media playback - together with the
FOREGROUND_SERVICE_SPECIAL_USE permission and the subtype property that
Google Play requires as justification.

The instrumented-test matrix is extended to 37 accordingly, with the
emulator target resolution limited to aosp_atd for API 30-36.
JAVA_TOOL_OPTIONS applied the 4 GB heap to every JVM spawned by the job
(Gradle launcher, daemon, Kotlin daemon, sdkmanager, test workers) on top
of the 2.5 GB the emulator reserves. The API 35 run died silently during
:app:mergeLibDexDebug with no BUILD FAILED line. Heap now comes solely
from org.gradle.jvmargs.

continue-on-error on the emulator step turned that kill into a green job
and let the Sonar step run without instrumented coverage, so it is gone.

Also drop the two properties AGP 9 complains about:
- android.newDsl=false is deprecated and disappears in AGP 10
- allowOldApiLevelDevices predates AGP dropping the hard error for API
  <= 26; the lowest managed device is API 27

And rename the logcat output to match the API level it belongs to.
The problems report listed 11 deprecations, 8 of them ours. Fixed:

- junitJupiterVersion moved from the root project's ext block to
  gradle.properties. Resolving it implicitly from the parent project is
  deprecated and becomes a hard error in Gradle 10.
- Groovy space assignment replaced with '=' at the five spots Gradle
  flagged: the jitpack repository url, namespace, enableUnitTestCoverage,
  enableAndroidTestCoverage and viewBinding.

That leaves 3 warnings, all raised by com.android.internal.application
itself and not fixable from here.

Coverage never reached SonarCloud intact, for three separate reasons:

- The scanner looked for the report at the location the Sonar plugin
  guesses; the custom jacocoTestReport task writes somewhere else.
  sonar.coverage.jacoco.xmlReportPaths now names it outright.
- Listing jacocoTestReport and sonar on one command line does not order
  them, so the scanner could read a stale or missing report. The sonar
  task now depends on the report task.
- The execution data glob for connectedCheck was commented out, so every
  instrumented run's coverage was discarded.

Note that SonarCloud silently drops CI scanner results while Automatic
Analysis is enabled for the project; that switch still has to be turned
off in the project administration.
The JUnit 6 instrumentation runner checks Build.VERSION.SDK_INT >= 35 and
fails everything below with "JUnit Framework is not supported on this
device", which broke the API 27-34 matrix jobs. JUnit 6 needs a Java 17
runtime, the plain JUnit 5 runner only API 26. Unit tests keep Jupiter
6.1.2, androidTest moves to 5.14.1 via a separate property; the manually
pinned -junit6 artifacts are dropped so the android-junit5 plugin can add
the variant matching the classpath.

API 37 SDK packages are published minor-versioned only
(platforms;android-37.0, system-images;android-37.0;google_apis), so the
emulator-runner could not find 'platforms;android-37'. The matrix now
carries api-level and target per row, uses '37.0', and marks that row
non-blocking. ManagedVirtualDevice has no minor-version field, so
pixel6api37 stays out of the supportedSdks group, which otherwise covers
27-36 again.
@arburk
arburk merged commit d7d1f08 into main Aug 1, 2026
11 of 12 checks passed
@arburk
arburk deleted the feature/19-upgrade branch August 1, 2026 11:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant