This is an automated email from the ASF dual-hosted git repository.
garydgregory pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/commons-secure-xml.git
The following commit(s) were added to refs/heads/main by this push:
new 304b436 Bump com.android.library from 8.6.1 to 9.4.0 in
/android-tests (#90)
304b436 is described below
commit 304b436966226d84ec9e0b21742afc0797663577
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
AuthorDate: Sun Sep 13 18:12:03 2026 -0400
Bump com.android.library from 8.6.1 to 9.4.0 in /android-tests (#90)
* Bump com.android.library from 8.6.1 to 9.4.0 in /android-tests
Bumps com.android.library from 8.6.1 to 9.4.0.
---
updated-dependencies:
- dependency-name: com.android.library
dependency-version: 9.4.0
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <[email protected]>
* Migrate the Android tests to the AGP 9 DSL.
AGP 9 removed testOptions.managedDevices.devices, so the managed device is
declared through the typed localDevices container instead.
The JUnit 5 plugin passes an empty configurationParameters instrumentation
argument, which am instrument mis-parses into a component name, so no tests
run and the JaCoCo report task fails on the empty execution data. Giving the
argument a value keeps the command line well formed.
The migration is not finished: AGP 9 records JUnit 5 assumption aborts as
failures where AGP 8.6.1 reports them as skips, which turns this suite's 87
platform-dependent skips red.
Assisted-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01AaDyR9HjZLWkFn42x7kje3
* Correct the note on the AGP 9 test reporting.
The assumption aborts do not fail the build: connectedDebugAndroidTest
succeeds under AGP 9 as it does under AGP 8.6.1. Only the aggregated test
XML differs, recording the aborts as failures rather than skips, so the
reports the CI job uploads misstate them.
Assisted-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01AaDyR9HjZLWkFn42x7kje3
* Set the JUnit 5 parameter through the plugin's own DSL.
The workaround for the empty configurationParameters argument moves from a
hand-set instrumentation runner argument to the junitPlatform block, where
the plugin builds that argument from a map, and joins the note about the
RunnerBuilder that makes AndroidJUnitRunner discover Jupiter tests.
The value is inert: it restates the JUnit Platform default. What the empty
argument breaks is the shape of the am instrument command line, since the
value reaches it unquoted and the following -e is taken in its place.
Assisted-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01AaDyR9HjZLWkFn42x7kje3
* No tabs.
* fix: add reviewer to due-to
---------
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot]
<49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Piotr P. Karwasz <[email protected]>
Co-authored-by: Gary Gregory <[email protected]>
---
android-tests/build.gradle.kts | 20 +++++++++++++++-----
src/changes/changes.xml | 1 +
2 files changed, 16 insertions(+), 5 deletions(-)
diff --git a/android-tests/build.gradle.kts b/android-tests/build.gradle.kts
index 796bbd5..9ef2ac1 100644
--- a/android-tests/build.gradle.kts
+++ b/android-tests/build.gradle.kts
@@ -15,7 +15,6 @@
* limitations under the License.
*/
-import com.android.build.api.dsl.ManagedVirtualDevice
import org.apache.commons.xml.secure.SecureDocumentBuilderFactory
import org.apache.commons.xml.secure.SecureXPathFactory
import org.gradle.api.tasks.compile.JavaCompile
@@ -30,8 +29,10 @@ buildscript {
}
}
+// AGP 9 records this suite's JUnit 5 assumption aborts as failures in its
aggregated test XML, where AGP 8.6.1 reported them as skips.
+// The build passes either way; only the uploaded report misstates them.
plugins {
- id("com.android.library") version "8.6.1"
+ id("com.android.library") version "9.4.0"
id("de.mannodermaus.android-junit5") version "2.0.1"
}
@@ -59,7 +60,7 @@ android {
defaultConfig {
// java.lang.invoke, used by the newDefault* and newNS* lookups,
exists from API level 26.
minSdk = 26
- // androidx.test runner; Mannodermaus's android-junit5 plugin slots a
JUnit 5 RunnerBuilder under it so AndroidJUnitRunner picks up Jupiter tests.
+ // androidx.test runner; what makes it run Jupiter tests is in the
junitPlatform block below.
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
@@ -89,10 +90,10 @@ android {
@Suppress("UnstableApiUsage")
testOptions {
managedDevices {
- devices {
+ localDevices {
// API 33 is the first AOSP release shipping libexpat >= 2.4,
which has the built-in billion-laughs check.
// Earlier images (e.g. API 31 with libexpat 2.3.0) carry no
native amplification protection.
- maybeCreate<ManagedVirtualDevice>("api33").apply {
+ create("api33") {
device = "Pixel 6a"
apiLevel = 33
systemImageSource = "aosp"
@@ -109,6 +110,15 @@ tasks.withType<JavaCompile>().configureEach {
// Skip JAXP groups whose factories Android does not ship
junitPlatform {
+ // The plugin slots a RunnerBuilder under AndroidJUnitRunner, which is how
Jupiter tests are discovered on the device, and always passes a
+ // configurationParameters argument alongside it, empty unless this block
fills it:
+ //
+ // am instrument ... -e configurationParameters -e
de.mannodermaus.junit.unsupported.behavior fail ...
+ //
+ // Left empty, the device-side activity manager takes the next -e for that
value, so the key after it lands where the component belongs:
+ //
+ // No instrumentation found for: de.mannodermaus.junit.unsupported.behavior
+ configurationParameters(mapOf("junit.jupiter.execution.parallel.enabled"
to "false"))
filters {
// Pass single tag expression
includeTags("dom | sax | schema | trax")
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index cbe6d71..3c8af33 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -40,6 +40,7 @@ The <action> type attribute can be add, update, fix, or
remove.
<!-- ADD -->
<!-- UPDATE -->
<action dev="ggregory" type="update" due-to="Gary Gregory">Bump
org.apache.commons:commons-parent from 104 to 105.</action>
+ <action dev="pkarwasz" type="update" due-to="Piotr P. Karwasz, Gary
Gregory">Bump com.android.library from 8.6.1 to 9.4.0 in
/android-tests.</action>
</release>
<release version="1.0.0" date="2026-09-02" description="First release,
requires Java 8 or above.">
<!-- SPECIAL -->