mirror of
https://github.com/priyanshujain/sanderling.git
synced 2026-10-02 19:17:10 +00:00
* feat(hierarchy): add Node tree + path query support Preserve parent-child relationships in a Node tree at parse time. Extend Find/FindAll with " > " path operator for scoped queries, e.g. id:LoginScreen > desc:EmailInput. Flat Elements slice and all public signatures unchanged. * test(hierarchy): add path query tests Cover single-level, multi-level, mixed-type, not-found, wrong-subtree, and FindAll across multiple roots. * feat(folio): add modifier param to Screen composable * feat(folio): testTag LoginScreen * feat(folio): testTag HomeScreen * feat(folio): testTag AddAccountScreen * feat(folio): testTag LedgerScreen * feat(folio): testTag AddTransactionScreen * feat(folio): scope spec selectors to screen testTags via path queries * fix(sidecar): align grpc-netty/grpc-okhttp with grpc-core version Maestro 1.40.0 brings grpc-netty:1.50.2 which compiled against AbstractManagedChannelImplBuilder, removed in grpc-core 1.64+. Gradle was upgrading grpc-core to 1.68.0 while leaving grpc-netty at 1.50.2, causing NoClassDefFoundError at startup. Force grpc-netty and grpc-okhttp to match grpcVersion so all gRPC artifacts are binary-compatible. * fix(sidecar): use ephemeral host port for AndroidDriver Hard-coded port 7001 caused TcpForwarder.start() to fail with TimeoutException when a previous sidecar process held the port open. Pick a free port via ServerSocket(0) instead. * chore(sidecar): bump maestro to 2.4.0, exclude graalvm from fat JAR Maestro 2.4.0 still ships grpc-netty:1.50.2 so the grpc transport resolution strategy is kept. GraalVM JS is excluded: unused by our sidecar and causes shadow JAR expansion errors (pom treated as zip). * fix(sidecar): update AndroidDriver calls for Maestro 2.4.0 API launchApp no longer accepts a UUID argument. Third constructor param changed from hostname to emulatorName so drop the "localhost" value.
110 lines
3.3 KiB
Kotlin
110 lines
3.3 KiB
Kotlin
import com.google.protobuf.gradle.id
|
|
|
|
plugins {
|
|
kotlin("jvm") version "2.1.21"
|
|
application
|
|
id("com.gradleup.shadow") version "9.0.0-rc2"
|
|
id("com.google.protobuf") version "0.9.5"
|
|
}
|
|
|
|
version = findProperty("sanderling.version") as String? ?: "0.0.0-dev"
|
|
|
|
java {
|
|
toolchain {
|
|
languageVersion.set(JavaLanguageVersion.of(17))
|
|
}
|
|
}
|
|
|
|
kotlin {
|
|
jvmToolchain(17)
|
|
}
|
|
|
|
val grpcVersion = "1.68.0"
|
|
val protobufVersion = "3.25.5"
|
|
val maestroVersion = "2.4.0"
|
|
|
|
// Maestro 2.4.0 still declares grpc-netty:1.50.2 and grpc-okhttp:1.50.2 which
|
|
// were compiled against AbstractManagedChannelImplBuilder removed in grpc-core 1.64+.
|
|
// Force them to the version we pin so they stay binary-compatible.
|
|
// Also exclude GraalVM JS — not used by our sidecar and causes shadow JAR expansion errors.
|
|
configurations.all {
|
|
resolutionStrategy.eachDependency {
|
|
if (requested.group == "io.grpc" &&
|
|
(requested.name == "grpc-netty" || requested.name == "grpc-okhttp")) {
|
|
useVersion(grpcVersion)
|
|
because("align grpc transport with grpc-core version")
|
|
}
|
|
}
|
|
exclude(group = "org.graalvm.js")
|
|
exclude(group = "org.graalvm.sdk")
|
|
exclude(group = "org.graalvm.regex")
|
|
exclude(group = "org.graalvm.truffle")
|
|
}
|
|
|
|
dependencies {
|
|
implementation("dev.mobile:maestro-client:$maestroVersion")
|
|
implementation("dev.mobile:maestro-utils:$maestroVersion")
|
|
implementation("dev.mobile:maestro-ios:$maestroVersion")
|
|
implementation("dev.mobile:maestro-ios-driver:$maestroVersion")
|
|
|
|
implementation("io.grpc:grpc-netty-shaded:$grpcVersion")
|
|
implementation("io.grpc:grpc-protobuf:$grpcVersion")
|
|
implementation("io.grpc:grpc-stub:$grpcVersion")
|
|
implementation("com.google.protobuf:protobuf-java:$protobufVersion")
|
|
implementation("javax.annotation:javax.annotation-api:1.3.2")
|
|
|
|
implementation("org.slf4j:slf4j-simple:2.0.16")
|
|
|
|
testImplementation(kotlin("test"))
|
|
testImplementation("io.grpc:grpc-testing:$grpcVersion")
|
|
testImplementation("io.grpc:grpc-inprocess:$grpcVersion")
|
|
testImplementation("junit:junit:4.13.2")
|
|
testImplementation("org.junit.jupiter:junit-jupiter:5.11.3")
|
|
testRuntimeOnly("org.junit.vintage:junit-vintage-engine:5.11.3")
|
|
testRuntimeOnly("org.junit.platform:junit-platform-launcher:1.11.3")
|
|
}
|
|
|
|
protobuf {
|
|
protoc {
|
|
artifact = "com.google.protobuf:protoc:$protobufVersion"
|
|
}
|
|
plugins {
|
|
id("grpc") {
|
|
artifact = "io.grpc:protoc-gen-grpc-java:$grpcVersion"
|
|
}
|
|
}
|
|
generateProtoTasks {
|
|
all().forEach { task ->
|
|
task.plugins {
|
|
id("grpc")
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
sourceSets {
|
|
main {
|
|
proto {
|
|
srcDir(rootProject.file("proto"))
|
|
}
|
|
}
|
|
}
|
|
|
|
application {
|
|
mainClass.set("dev.sanderling.sidecar.MainKt")
|
|
}
|
|
|
|
// The Go binary embeds this fat JAR by fixed path (internal/sidecar/assets/
|
|
// sidecar-all.jar). Pin the shadow output name so the embed step doesn't
|
|
// depend on `version`.
|
|
tasks.named<com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar>("shadowJar") {
|
|
archiveFileName.set("sidecar-all.jar")
|
|
exclude("META-INF/*.SF", "META-INF/*.DSA", "META-INF/*.RSA")
|
|
}
|
|
|
|
// JUnit 4 (vintage) for the gRPC GrpcCleanupRule + JUnit 5 (jupiter)
|
|
// for the rest. UseJUnitPlatform with the vintage engine handles both.
|
|
tasks.test {
|
|
useJUnitPlatform()
|
|
}
|