Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .github/workflows/debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,15 @@ jobs:
- name: Assemble Universal APK
run: |
echo "gradle_time_start=$(date +%s)" >> $GITHUB_ENV
flox activate -d flox/base -- ./gradlew :app:assembleV8Debug --no-daemon
set -o pipefail
flox activate -d flox/base -- ./gradlew :app:assembleV8Debug --no-daemon 2>&1 | tee "$RUNNER_TEMP/assemble.log"
echo "gradle_time_end=$(date +%s)" >> $GITHUB_ENV
# D8 logs this (non-fatal) once per class when the pinned R8 is older than the Kotlin
# metadata version, burying every real diagnostic. See the `r8` pin in libs.versions.toml.
if grep -q "Unexpected error during rewriting of Kotlin metadata" "$RUNNER_TEMP/assemble.log"; then
echo "::error::D8 could not rewrite Kotlin metadata. Most likely the R8 pinned in gradle/libs.versions.toml is older than the Kotlin metadata version (bump 'r8'), or the pin no longer takes effect on the build classpath. See ADFA-6822."
exit 1
fi


- name: Find APK file
Expand Down
2 changes: 2 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ jacoco {

buildscript {
dependencies {
// Must stay first: pins a D8/R8 that understands the Kotlin metadata version (ADFA-6822).
classpath(libs.android.r8)
classpath(libs.kotlin.gradle.plugin)
classpath(libs.nav.safe.args.gradle.plugin)
}
Expand Down
5 changes: 5 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ gson = "2.10.1"
junit-jupiter = "5.10.2"
anroidx-test-core = "2.2.0"
koinAndroid = "4.1.1"
# A Kotlin minor bump may need a newer `r8` (see its entry below, ADFA-6822).
kotlin = "2.3.0"
kotlin-coroutines = "1.9.0"
kotlinxCoroutinesCore = "1.10.2"
Expand All @@ -37,6 +38,9 @@ ksp = "2.3.6"
antlr4 = "4.13.1"
androidx-work = "2.10.0"
androidx-espresso = "3.5.1"
# Pinned ahead of AGP on the root buildscript classpath: AGP 8.8.2's bundled D8 8.8.34 cannot rewrite
# Kotlin 2.3 metadata. Bump with `kotlin`; remove once AGP is upgraded (ADFA-6837).
r8 = "8.13.25"
retrofit = "2.11.0"
markwon = "4.6.2"
maven-publish-plugin = "0.27.0"
Expand Down Expand Up @@ -324,6 +328,7 @@ tooling-slf4j = { module = "org.slf4j:slf4j-api", version = "2.0.17" }
snakeyaml-engine = { module = "org.snakeyaml:snakeyaml-engine", version = "2.10" }

# Classpaths
android-r8 = { module = "com.android.tools:r8", version.ref = "r8" }
android-gradle-plugin = { module = "com.android.tools.build:gradle", version.ref = "agp" }
kotlin-gradle-plugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
nav-safe-args-gradle-plugin = { module = "androidx.navigation:navigation-safe-args-gradle-plugin", version.ref = "androidx-navigation" }
Expand Down
Loading