platform upgrades
This commit is contained in:
@@ -11,3 +11,4 @@ GeneratedPluginRegistrant.java
|
||||
key.properties
|
||||
**/*.keystore
|
||||
**/*.jks
|
||||
.kotlin/
|
||||
|
||||
@@ -33,10 +33,6 @@ android {
|
||||
coreLibraryDesugaringEnabled true
|
||||
}
|
||||
|
||||
kotlinOptions {
|
||||
jvmTarget = '17'
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
main.java.srcDirs += 'src/main/kotlin'
|
||||
}
|
||||
@@ -47,7 +43,6 @@ android {
|
||||
targetSdkVersion flutter.targetSdkVersion
|
||||
versionCode flutterVersionCode.toInteger()
|
||||
versionName flutterVersionName
|
||||
multiDexEnabled true
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
@@ -59,12 +54,17 @@ android {
|
||||
}
|
||||
}
|
||||
|
||||
kotlin {
|
||||
compilerOptions {
|
||||
jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17
|
||||
}
|
||||
}
|
||||
|
||||
flutter {
|
||||
source '../..'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'com.android.support:multidex:2.0.1'
|
||||
// Same version as workmanager_android pins — needed to enqueue its
|
||||
// BackgroundWorker from native widget code (the plugin uses
|
||||
// `implementation`, so androidx.work is not exposed transitively).
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
// Generated file.
|
||||
//
|
||||
// If you wish to remove Flutter's multidex support, delete this entire file.
|
||||
//
|
||||
// Modifications to this file should be done in a copy under a different name
|
||||
// as this file may be regenerated.
|
||||
|
||||
package io.flutter.app;
|
||||
|
||||
import android.app.Application;
|
||||
import android.content.Context;
|
||||
import androidx.annotation.CallSuper;
|
||||
import androidx.multidex.MultiDex;
|
||||
|
||||
/**
|
||||
* Extension of {@link android.app.Application}, adding multidex support.
|
||||
*/
|
||||
public class FlutterMultiDexApplication extends Application {
|
||||
@Override
|
||||
@CallSuper
|
||||
protected void attachBaseContext(Context base) {
|
||||
super.attachBaseContext(base);
|
||||
MultiDex.install(this);
|
||||
}
|
||||
}
|
||||
+18
-3
@@ -5,10 +5,25 @@ allprojects {
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.buildDir = '../build'
|
||||
rootProject.layout.buildDirectory = file('../build')
|
||||
subprojects {
|
||||
project.buildDir = "${rootProject.buildDir}/${project.name}"
|
||||
project.layout.buildDirectory = rootProject.layout.buildDirectory.dir(project.name)
|
||||
}
|
||||
// AGP 9 enables built-in Kotlin, but Flutter's migrator pins
|
||||
// android.builtInKotlin=false while the plugin ecosystem catches up. Most
|
||||
// plugins honour that flag and fall back to KGP themselves; file_picker and
|
||||
// background_downloader only check the AGP major version and silently skip
|
||||
// applying KGP, which leaves their Kotlin sources uncompiled (missing
|
||||
// FilePickerPlugin/BackgroundDownloaderPlugin at link time). Apply KGP for
|
||||
// them as soon as AGP is on the project, i.e. before their android {} block
|
||||
// runs. Drop this once both plugins ship a builtInKotlin-aware build script.
|
||||
gradle.beforeProject { sub ->
|
||||
if (!(sub.name in ['file_picker', 'background_downloader'])) return
|
||||
sub.plugins.withId('com.android.library') {
|
||||
sub.pluginManager.apply('org.jetbrains.kotlin.android')
|
||||
}
|
||||
}
|
||||
|
||||
// Pin every Android subproject to JVM 17 so plugins that ship Kotlin sources
|
||||
// compiled with a higher target (e.g. receive_sharing_intent at 21) or stale
|
||||
// Java compatibility (e.g. home_widget at 1.8) don't break the build under
|
||||
@@ -42,5 +57,5 @@ subprojects {
|
||||
}
|
||||
|
||||
tasks.register("clean", Delete) {
|
||||
delete rootProject.buildDir
|
||||
delete rootProject.layout.buildDirectory
|
||||
}
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
org.gradle.jvmargs=-Xmx4G
|
||||
android.useAndroidX=true
|
||||
android.enableJetifier=true
|
||||
android.defaults.buildfeatures.buildconfig=true
|
||||
android.nonTransitiveRClass=false
|
||||
android.nonFinalResIds=false
|
||||
# This builtInKotlin flag was added automatically by Flutter migrator
|
||||
android.builtInKotlin=false
|
||||
# This newDsl flag was added automatically by Flutter migrator
|
||||
android.newDsl=false
|
||||
# This builtInKotlin flag was added automatically by Flutter migrator
|
||||
android.builtInKotlin=false
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.1-all.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
@@ -19,9 +19,9 @@ pluginManagement {
|
||||
|
||||
plugins {
|
||||
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
|
||||
id "com.android.application" version '8.13.2' apply false
|
||||
id "com.android.library" version '8.13.2' apply false
|
||||
id "org.jetbrains.kotlin.android" version "2.2.20" apply false
|
||||
id "com.android.application" version '9.1.0' apply false
|
||||
id "com.android.library" version '9.1.0' apply false
|
||||
id "org.jetbrains.kotlin.android" version "2.4.0" apply false
|
||||
id 'org.gradle.toolchains.foojay-resolver-convention' version '0.10.0'
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user