-
-
Save TheFlipside/e1457406d6d6ab0f1f9332ef6feedbc2 to your computer and use it in GitHub Desktop.
Flutter Android 16KB Setup Gist
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
| // app/build.gradle | |
| plugins { | |
| id 'com.android.application' | |
| // Use modern Kotlin Android plugin ID aligned with settings.gradle | |
| id 'org.jetbrains.kotlin.android' | |
| id 'dev.flutter.flutter-gradle-plugin' | |
| } | |
| ... | |
| android { | |
| // Use build tools 36.0.0 alongside compileSdk 36 | |
| compileSdkVersion 36 | |
| buildToolsVersion "36.0.0" | |
| // Updated to NDK r28 (16KB memory pages compatible) | |
| ndkVersion "28.0.12433566" | |
| compileOptions { | |
| sourceCompatibility = JavaVersion.VERSION_21 | |
| targetCompatibility = JavaVersion.VERSION_21 | |
| } | |
| kotlinOptions { | |
| // Match Kotlin JVM target to Java 21 | |
| jvmTarget = JavaVersion.VERSION_21.toString() | |
| } | |
| ... | |
| } | |
| ... |
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
| buildscript { | |
| // Align Kotlin to 2.1.0 for toolchain consistency with Java 21 | |
| ext.kotlin_version = "2.1.0" | |
| repositories { | |
| google() | |
| mavenCentral() | |
| } | |
| dependencies { | |
| // Android Gradle Plugin 8.12.0 for SDK 36 and 16KB page support | |
| classpath "com.android.tools.build:gradle:8.12.0" | |
| classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" | |
| } | |
| } | |
| ... |
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
| distributionBase=GRADLE_USER_HOME | |
| distributionPath=wrapper/dists | |
| zipStoreBase=GRADLE_USER_HOME | |
| zipStorePath=wrapper/dists | |
| # Gradle wrapper bumped for AGP 8.12.x compatibility and Java 21 | |
| distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-all.zip |
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
| plugins { | |
| // Upgraded for Android 16KB pages + latest SDKs | |
| // AGP 8.12.0, Kotlin 2.1.0 (ensure Flutter Gradle plugin supports these) | |
| id "dev.flutter.flutter-plugin-loader" version "1.0.0" | |
| id "com.android.application" version "8.12.0" apply false | |
| id "org.jetbrains.kotlin.android" version "2.1.0" apply false | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment