From 0d36f70c964c54878d464f8fad4d28feda4fd884 Mon Sep 17 00:00:00 2001 From: Valere Date: Tue, 22 Sep 2026 21:04:03 +0200 Subject: [PATCH] Resolve element-call-android from its GitHub releases The component and the matrix-rust-rtc core publish as GitHub release assets rather than to Maven, so two filtered ivy repositories resolve them; both become plain coordinates the day they reach Maven Central. Co-Authored-By: Claude Opus 5 (1M context) --- gradle/libs.versions.toml | 15 +++++++++++++- settings.gradle.kts | 42 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 1788edd14e..905db875ae 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -64,6 +64,8 @@ detekt_compose_rules = "0.4.28" ktlint = "1.8.0" androidx-test-ext-junit = "1.3.0" kover = "0.9.9" +# The native MatrixRTC call component, https://github.com/element-hq/element-call-android +element_call = "0.1.0-rc.2" [libraries] # Project @@ -182,7 +184,11 @@ test_detekt_test = { module = "io.gitlab.arturbosch.detekt:detekt-test", version # https://github.com/matrix-org/matrix-rust-components-kotlin/commits/main/sdk/sdk-android/src/main/kotlin/org/matrix/rustcomponents/sdk/matrix_sdk_ffi.kt # All new features should not be implemented in the pull request that upgrades the version, developers should # only fix API breaks and may add some TODOs. -matrix_sdk = "org.matrix.rustcomponents:sdk-android:26.09.28" +# `strictly` because element-call-matrix is a published AAR compiled against one SDK version and declares +# it as a plain `require`: without this, a library built against a newer SDK would silently drag this app +# onto it. With it, this pin always wins, and a library that needs something newer fails at configuration +# time naming both versions instead of at runtime with NoSuchMethodError. +matrix_sdk = { module = "org.matrix.rustcomponents:sdk-android", version = { strictly = "26.09.28" } } rustls_platform_verifier = "org.rustls:rustls-platform-verifier:0.2.0" # Others @@ -236,6 +242,13 @@ metro_runtime = { module = "dev.zacsweers.metro:runtime", version.ref = "metro" # Element Call element_call_embedded = "io.element.android:element-call-embedded:0.26.0" +# The native MatrixRTC call component. Versions come from the BOM, so every artifact moves together. +element_call_bom = { module = "io.element.android:element-call-bom", version.ref = "element_call" } +element_call_api = { module = "io.element.android:element-call-api" } +element_call_impl = { module = "io.element.android:element-call" } +element_call_ui = { module = "io.element.android:element-call-ui" } +element_call_matrix = { module = "io.element.android:element-call-matrix" } +element_call_test = { module = "io.element.android:element-call-test" } # Auto services google_autoservice = { module = "com.google.auto.service:auto-service", version.ref = "autoservice" } diff --git a/settings.gradle.kts b/settings.gradle.kts index e46d80f4f2..db3aa099a4 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -57,6 +57,48 @@ dependencyResolutionManagement { flatDir { dirs("libraries/matrix/libs") } + // Temporary: the native call component and the matrix-rust-rtc core publish as GitHub release + // assets, which carry full Maven metadata. Both blocks go once they reach Maven Central. + ivy { + url = uri("https://github.com/element-hq/element-call-android/releases/download") + patternLayout { artifact("v[revision]/[artifact]-[revision](-[classifier])(.[ext])") } + metadataSources { gradleMetadata() } + content { + // Per module: `element-call.*` would also catch element-call-embedded, the WebView call. + includeModule("io.element.android", "element-call-bom") + includeModule("io.element.android", "element-call-api") + includeModule("io.element.android", "element-call") + includeModule("io.element.android", "element-call-ui") + includeModule("io.element.android", "element-call-matrix") + includeModule("io.element.android", "element-call-test") + } + } + ivy { + url = uri("https://github.com/element-hq/matrix-rust-rtc/releases/download") + patternLayout { artifact("v[revision]/[artifact]-[revision](-[classifier])(.[ext])") } + // The core ships an AAR and nothing else; element-call's module metadata names it with an + // explicit aar artifact selector, so it needs no POM. + metadataSources { artifact() } + content { includeModule("io.element.android", "matrix-rtc-android") } + } + // Also temporary: testing an unreleased element-call-android build. Publish it there with + // `publishToMavenLocal -PVERSION_NAME=0.1.0-local`, then build here with + // `-PelementCallLocalVersion=0.1.0-local`. Absent without the property, so that everything + // resolves for a contributor who has never built the library. + providers.gradleProperty("elementCallLocalVersion").orNull?.let { elementCallVersion -> + logger.lifecycle("Note: resolving io.element.android:element-call-* $elementCallVersion from mavenLocal") + mavenLocal { + content { + // Per module: compound-android and element-call-embedded stay on Maven Central. + includeModule("io.element.android", "element-call-bom") + includeModule("io.element.android", "element-call-api") + includeModule("io.element.android", "element-call") + includeModule("io.element.android", "element-call-ui") + includeModule("io.element.android", "element-call-matrix") + includeModule("io.element.android", "element-call-test") + } + } + } } }