From 19e1c26f04f2498cc69c07666353d23c51f4522a Mon Sep 17 00:00:00 2001 From: PJ Date: Mon, 8 Jun 2026 20:00:01 +0530 Subject: [PATCH] build(sidecar): strip iOS runner bundles and classes from the fat jar --- Makefile | 2 +- sidecar/build.gradle.kts | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index c61f0e2..a474602 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,7 @@ COMPANION_PREPARE := internal/driver/ioscompanion/companionassets/prepare.sh RUNNER_EMBED := internal/driver/ioscompanion/runnerassets/assets/runner-1.0.0.tar.gz RUNNER_PREPARE := companion/prepare.sh RUNNER_SRC := $(shell find companion/Sources -type f -name '*.swift' 2>/dev/null) companion/project.yml -SIDECAR_SRC := $(shell find sidecar/src -type f \( -name '*.kt' -o -name '*.kts' \) 2>/dev/null) build.gradle.kts settings.gradle.kts +SIDECAR_SRC := $(shell find sidecar/src -type f \( -name '*.kt' -o -name '*.kts' \) 2>/dev/null) sidecar/build.gradle.kts build.gradle.kts settings.gradle.kts SANDERLING_BIN := bin/sanderling DOCS_SRC := $(shell find docs -type f -name '*.md' -not -path 'docs/_*') diff --git a/sidecar/build.gradle.kts b/sidecar/build.gradle.kts index bb7d1ac..022cc14 100644 --- a/sidecar/build.gradle.kts +++ b/sidecar/build.gradle.kts @@ -98,6 +98,12 @@ application { tasks.named("shadowJar") { archiveFileName.set("sidecar-all.jar") exclude("META-INF/*.SF", "META-INF/*.DSA", "META-INF/*.RSA") + // The iOS driving modules arrive transitively through maestro-client but + // the sidecar only drives Android, so strip the iOS UITest runner bundles + // and iOS-only classes from the fat JAR. Compilation keeps the full + // classpath; only the packaged artifact drops these. + exclude("driver-iphoneos/**", "driver-iPhoneSimulator/**") + exclude("ios/**", "xcuitest/**", "hierarchy/**") } // JUnit 4 (vintage) for the gRPC GrpcCleanupRule + JUnit 5 (jupiter)