fix:升级 Flutter 3.44.9级相关插件
This commit is contained in:
1 parent
d364c6d908
commit
a1819348d5
26 files changed
+305
-318
No files matched your search
@@ -2,8 +2,7 @@ import java.util.Properties
|
||||
|
||||
plugins {
|
||||
id("com.android.application")
|
||||
id("kotlin-android")
|
||||
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
|
||||
// The Flutter Gradle Plugin must be applied after the Android plugin.
|
||||
id("dev.flutter.flutter-gradle-plugin")
|
||||
}
|
||||
|
||||
@@ -34,7 +33,8 @@ fun requireSigningProperty(name: String): String {
|
||||
|
||||
android {
|
||||
namespace = "com.jinzhi.butler"
|
||||
compileSdk = flutter.compileSdkVersion
|
||||
// permission_handler and the current Android plugin set require API 37.
|
||||
compileSdk = 37
|
||||
ndkVersion = flutter.ndkVersion
|
||||
|
||||
signingConfigs {
|
||||
@@ -47,12 +47,8 @@ android {
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility = JavaVersion.VERSION_11
|
||||
targetCompatibility = JavaVersion.VERSION_11
|
||||
}
|
||||
|
||||
kotlinOptions {
|
||||
jvmTarget = JavaVersion.VERSION_11.toString()
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
@@ -105,6 +101,12 @@ android {
|
||||
}
|
||||
}
|
||||
|
||||
kotlin {
|
||||
compilerOptions {
|
||||
jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17
|
||||
}
|
||||
}
|
||||
|
||||
flutter {
|
||||
source = "../.."
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
|
||||
@@ -13,7 +14,8 @@
|
||||
android:name=".JinzhiApplication"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:usesCleartextTraffic="false">
|
||||
android:usesCleartextTraffic="false"
|
||||
tools:replace="android:usesCleartextTraffic">
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:exported="true"
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import com.android.build.api.dsl.LibraryExtension
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
google()
|
||||
@@ -5,7 +7,7 @@ allprojects {
|
||||
maven("https://maven.aliyun.com/repository/public")
|
||||
maven("https://maven.aliyun.com/repository/gradle-plugin")
|
||||
maven("https://maven.aliyun.com/repository/google")
|
||||
maven("https://maven.aliyun.com/repository/jcenter")
|
||||
maven("https://developer.huawei.com/repo/")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,6 +25,24 @@ subprojects {
|
||||
project.evaluationDependsOn(":app")
|
||||
}
|
||||
|
||||
// Partial shrinking is needed for the obfuscated one-key-login SDK. UMeng Push
|
||||
// also runs an intermediate library shrinker with minSdk 14, which is not
|
||||
// supported by partial shrinking. Let the app module remain the sole release
|
||||
// shrinker (its minSdk is 24) and skip the redundant library minification.
|
||||
subprojects {
|
||||
if (name == "umeng_push_sdk") {
|
||||
afterEvaluate {
|
||||
extensions.configure<LibraryExtension> {
|
||||
buildTypes {
|
||||
getByName("release") {
|
||||
isMinifyEnabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// The Gitea U-Verify plugin still targets an older Android Gradle Plugin and
|
||||
// declares only the manifest package. AGP 8 requires an explicit namespace;
|
||||
// keep the dependency as a Git package and supply its published namespace here.
|
||||
|
||||
@@ -1,3 +1,15 @@
|
||||
org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError
|
||||
android.useAndroidX=true
|
||||
android.enableJetifier=true
|
||||
# This builtInKotlin flag was added automatically by Flutter migrator
|
||||
android.builtInKotlin=false
|
||||
# This newDsl flag was added automatically by Flutter migrator
|
||||
android.newDsl=false
|
||||
# AGP 9.0.1 predates API 37 but builds against it correctly; suppress its
|
||||
# informational compatibility warning until Flutter ships a newer AGP template.
|
||||
android.suppressUnsupportedCompileSdk=37,37.0
|
||||
# U-Verify ships obfuscated verification bytecode that AGP 9/R8 cannot fully
|
||||
# analyse. Keep app shrinking enabled, but route this vendor SDK family through
|
||||
# D8 just as the verified reference project does.
|
||||
systemProp.com.android.tools.r8.experimentalPartialShrinkingIncludePatterns=**
|
||||
systemProp.com.android.tools.r8.experimentalPartialShrinkingExcludePatterns=com.mobile.auth.**,com.nirvana.**,com.cmic.**,com.umeng.umverify.**,com.unicom.**,com.a.a.**
|
||||
+1
-1
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-all.zip
|
||||
@@ -19,8 +19,8 @@ pluginManagement {
|
||||
|
||||
plugins {
|
||||
id("dev.flutter.flutter-plugin-loader") version "1.0.0"
|
||||
id("com.android.application") version "8.9.1" apply false
|
||||
id("org.jetbrains.kotlin.android") version "2.1.0" apply false
|
||||
id("com.android.application") version "9.0.1" apply false
|
||||
id("org.jetbrains.kotlin.android") version "2.3.20" apply false
|
||||
}
|
||||
|
||||
include(":app")
|
||||
Reference in new issue
Block a user