File tree Expand file tree Collapse file tree 2 files changed +20
-33
lines changed
Expand file tree Collapse file tree 2 files changed +20
-33
lines changed Original file line number Diff line number Diff line change 11plugins {
2- id " com.android.application"
3- id " kotlin-android"
4- id " kotlin-parcelize"
5- id " kotlin-kapt"
6- id " dev.flutter.flutter-gradle-plugin"
2+ id ' com.android.application'
3+ id ' org.jetbrains.kotlin.android'
4+ id ' kotlin-parcelize'
5+ id ' kotlin-kapt'
6+ id ' org.jetbrains.kotlin.plugin.serialization'
7+ id ' dev.flutter.flutter-gradle-plugin'
78}
89
9- apply plugin : ' kotlinx-serialization'
10-
1110def pro = new Properties ()
1211def localPropertiesFile = rootProject. file(' local.properties' )
1312if (localPropertiesFile. exists()) {
@@ -116,6 +115,7 @@ android {
116115 }
117116}
118117
118+ // 使用 AGP 8 推荐方式重写变体输出命名
119119androidComponents {
120120 onVariants { variant ->
121121 variant. outputs. forEach { output ->
@@ -134,15 +134,10 @@ androidComponents {
134134flutter {
135135 source ' ../..'
136136}
137- // //获取flutter的sdk路径
138- // def flutterRoot = localProperties.getProperty('flutter.sdk')
139- // if (flutterRoot == null) {
140- // throw new Exception("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
141- // }
137+
142138dependencies {
143139 implementation fileTree(include : [' *.jar' , ' *.aar' ], dir : ' libs' )
144140
145- // compileOnly files("$flutterRoot/bin/cache/artifacts/engine/android-arm/flutter.jar")
146141 implementation project(" :utils" )
147142 // noinspection GradleDependency
148143 implementation ' androidx.localbroadcastmanager:localbroadcastmanager:1.0.0'
Original file line number Diff line number Diff line change 1- buildscript {
2- ext{
3- kotlin_version = ' 1.9.21'
4- agp_version = ' 8.11.1'
5- room_version = ' 2.6.1'
6- ksp_version = ' 1.9.21-1.0.16'
7- }
8-
9-
10- repositories {
11- google()
12- mavenCentral()
13- }
14-
15- dependencies {
16- classpath " com.android.tools.build:gradle:$agp_version "
17- classpath " org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version "
18- classpath " org.jetbrains.kotlin:kotlin-serialization:$kotlin_version "
19- }
1+ plugins {
2+ id ' com.android.application' version ' 8.11.1' apply false
3+ id ' com.android.library' version ' 8.11.1' apply false
4+ id ' org.jetbrains.kotlin.android' version ' 1.9.21' apply false
5+ id ' org.jetbrains.kotlin.plugin.serialization' version ' 1.9.21' apply false
206}
217
8+ ext {
9+ kotlin_version = ' 1.9.21'
10+ agp_version = ' 8.11.1'
11+ room_version = ' 2.6.1'
12+ ksp_version = ' 1.9.21-1.0.16'
13+ }
2214
2315allprojects {
2416 repositories {
@@ -38,4 +30,4 @@ subprojects {
3830
3931tasks. register(" clean" , Delete ) {
4032 delete rootProject. buildDir
41- }
33+ }
You can’t perform that action at this time.
0 commit comments