File tree Expand file tree Collapse file tree 3 files changed +30
-31
lines changed Expand file tree Collapse file tree 3 files changed +30
-31
lines changed Original file line number Diff line number Diff line change 1+ plugins {
2+ id " com.android.application"
3+ id " kotlin-android"
4+ id " kotlin-kapt"
5+ id " dev.flutter.flutter-gradle-plugin"
6+ }
7+
18def localProperties = new Properties ()
29def localPropertiesFile = rootProject. file(' local.properties' )
310if (localPropertiesFile. exists()) {
@@ -6,11 +13,6 @@ if (localPropertiesFile.exists()) {
613 }
714}
815
9- def flutterRoot = localProperties. getProperty(' flutter.sdk' )
10- if (flutterRoot == null ) {
11- throw new GradleException (" Flutter SDK not found. Define location with flutter.sdk in the local.properties file." )
12- }
13-
1416def flutterVersionCode = localProperties. getProperty(' flutter.versionCode' )
1517if (flutterVersionCode == null ) {
1618 flutterVersionCode = ' 1'
@@ -21,11 +23,6 @@ if (flutterVersionName == null) {
2123 flutterVersionName = ' 1.0'
2224}
2325
24- apply plugin : ' com.android.application'
25- apply plugin : ' kotlin-android'
26- apply plugin : ' kotlin-kapt'
27- apply from : " $flutterRoot /packages/flutter_tools/gradle/flutter.gradle"
28-
2926android {
3027 namespace " com.fluttercandies.wechatCameraPickerExample"
3128
Original file line number Diff line number Diff line change 1- buildscript {
2- ext. kotlin_version = ' 1.9.20'
3- repositories {
4- google()
5- mavenCentral()
6- }
7-
8- dependencies {
9- classpath ' com.android.tools.build:gradle:8.2.2'
10- classpath " org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version "
11- }
12- }
13-
141allprojects {
152 repositories {
163 google()
Original file line number Diff line number Diff line change 22// Use of this source code is governed by a BSD-style license that can be
33// found in the LICENSE file.
44
5- include ' :app'
5+ pluginManagement {
6+ def flutterSdkPath = {
7+ def properties = new Properties ()
8+ file(" local.properties" ). withInputStream { properties. load(it) }
9+ def flutterSdkPath = properties. getProperty(" flutter.sdk" )
10+ assert flutterSdkPath != null , " flutter.sdk not set in local.properties"
11+ return flutterSdkPath
12+ }
13+ settings. ext. flutterSdkPath = flutterSdkPath()
614
7- def localPropertiesFile = new File (rootProject. projectDir, " local.properties" )
8- def properties = new Properties ()
15+ includeBuild(" ${ settings.ext.flutterSdkPath} /packages/flutter_tools/gradle" )
916
10- assert localPropertiesFile. exists()
11- localPropertiesFile. withReader(" UTF-8" ) { reader -> properties. load(reader) }
17+ repositories {
18+ google()
19+ mavenCentral()
20+ gradlePluginPortal()
21+ }
22+ }
1223
13- def flutterSdkPath = properties. getProperty(" flutter.sdk" )
14- assert flutterSdkPath != null , " flutter.sdk not set in local.properties"
15- apply from : " $flutterSdkPath /packages/flutter_tools/gradle/app_plugin_loader.gradle"
24+ plugins {
25+ id " dev.flutter.flutter-plugin-loader" version " 1.0.0"
26+ id " com.android.application" version " 8.2.2" apply false
27+ id " org.jetbrains.kotlin.android" version " 1.9.20" apply false
28+ }
29+
30+ include " :app"
You can’t perform that action at this time.
0 commit comments