Repository navigation
Fix Android Gradle and on_device_tts build warnings - #1697
Merged
Merged
Conversation
kevmo314
had a problem deploying
to
android-internal
October 24, 2026 05:12 — with
GitHub Actions
Failure
kevmo314
temporarily deployed
to
android-internal
October 24, 2026 05:41 — with
GitHub Actions
Inactive
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the Android build warnings that come from our own build files and the on_device_tts plugin.
Merge order: merge this after the AudioService foreground-service PR.
AudioService.ktimportsandroidx.multidex.BuildConfig, which only resolves because of the multidex dependency removed here. Without that PR,:app:compileDebugKotlinfails withUnresolved reference 'BuildConfig'. Note for that PR: the app's owncom.rtirl.chat.BuildConfigisn't generated either, because AGP turnsbuildFeatures.buildConfigoff by default. So the fix there needs a string literal orbuildFeatures { buildConfig = true }.android/gradle.propertiesandroid.enableJetifier=true.:app:dependenciesshows nocom.android.supportorandroid.archartifacts in the debug or release runtime classpaths.org.gradle.caching=true.android.builtInKotlin=falseandandroid.newDsl=falsebecause the build fails without them:newDsl=false, the Flutter Gradle plugin (3.47.7) fails to apply because it casts to the legacyAbstractAppExtension.builtInKotlin=false,flutter_web_auth_2(and the firebase_* / cloud_functions plugins) still applykotlin-android, and AGP 9 refuses that.builtInKotlin=falseis set, the Flutter Gradle plugin applieskotlin-androidto:appitself. So the "Deprecated 'org.jetbrains.kotlin.android' plugin usage" warning for:appand thekotlin-androidentry insettings.gradleboth have to stay until those upstream plugins migrate.android/app/build.gradlemultiDexEnabled true. The Flutter default minSdk is 24.namespace.propName valueassignments topropName = value(Gradle 10 removes the old form).compileSdkVersion,minSdkVersionandtargetSdkVersionbecomecompileSdk,minSdkandtargetSdk.packages/on_device_ttsbuild.gradle.kts:android {}becomesconfigure<com.android.build.api.dsl.LibraryExtension> {}, andsrcDirs(...)becomesdirectories.add(...). These were the last 3 script-compile warnings.SystemTtsPlugin.kt: removed 2 unnecessary!!. The plugin already usesAudioFocusRequeston API 26+. Because minSdk is 24, the pre-26 fallback stays, with a scoped@Suppress("DEPRECATION").Warning counts, from
./gradlew assembleDebug --warning-mode all --rerun-tasksbefore and after. AudioService's import was patched locally for the "after" run and is not part of this PR.WARNING:linesbuild.gradle.ktsscript warningsNothing that remains comes from our own files. It's all from the Flutter Gradle plugin and third-party plugins in the pub cache:
kotlin-androiddeprecationsProject.getPropertiesChecked (with the AudioService import patched locally):
flutter build apk --debug./gradlew assembleDebug./gradlew :on_device_tts:testDebugUnitTestflutter analyze(no issues)flutter test(467 passed)flutter testin packages/on_device_tts (95 passed)