platform upgrades
This commit is contained in:
+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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user