fix(android): silence JVM + Kotlin annotation-target warnings

Two cleanups around the noise at the top of every CI log:

* CI workflow: JAVA_TOOL_OPTIONS=--enable-native-access=ALL-UNNAMED
  at the workflow env level so both build + release jobs apply it to
  the launcher JVM (not just the daemon). The launcher is the one
  loading native-platform.jar via System.load.

* Kotlin compiler: -Xannotation-default-target=param-property in
  kotlin.compilerOptions.freeCompilerArgs. Opts every @Inject /
  @ApplicationContext / @ApplicationScope constructor-parameter
  annotation into the future Kotlin 2.3 behavior (apply to both
  param AND property), clearing the 11 warnings on AuthController /
  AuthStore / MutationReplayer / SyncController / EventsStream /
  LiveEventsDispatcher / PlayEventsReporter / PlayerController /
  PlayerFactory / ResumeController.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-27 11:51:36 -04:00
parent 7250f1f0e0
commit a42a4df736
2 changed files with 17 additions and 0 deletions
+8
View File
@@ -86,6 +86,14 @@ android {
kotlin {
compilerOptions {
jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17)
// Opt into the future Kotlin behavior: annotations on
// constructor parameters apply to both the param AND the
// generated property/field. Without this flag, Kotlin 2.x
// emits a deprecation warning at every @Inject /
// @ApplicationContext / @ApplicationScope constructor-
// parameter use. Setting it now matches what becomes the
// default in Kotlin 2.3 (KT-73255).
freeCompilerArgs.add("-Xannotation-default-target=param-property")
}
}