Feature/19 upgrade - #29
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
resolves issue #19