Skip to content

Commit c5eaf3b

Browse files
committed
chore: update example project gradle config
1 parent 8715a7c commit c5eaf3b

File tree

3 files changed

+32
-15
lines changed

3 files changed

+32
-15
lines changed

example/android/app/build.gradle

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
plugins {
2+
id "com.android.application"
3+
id "kotlin-android"
4+
id "dev.flutter.flutter-gradle-plugin"
5+
}
16
def localProperties = new Properties()
27
def localPropertiesFile = rootProject.file('local.properties')
38
if (localPropertiesFile.exists()) {
@@ -21,14 +26,10 @@ if (flutterVersionName == null) {
2126
flutterVersionName = '1.0'
2227
}
2328

24-
apply plugin: 'com.android.application'
25-
apply plugin: 'kotlin-android'
26-
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
27-
2829
android {
2930
namespace "io.agora.agora_rtc_ng_example"
3031

31-
compileSdkVersion 34
32+
compileSdkVersion 35
3233

3334
compileOptions {
3435
sourceCompatibility JavaVersion.VERSION_1_8
@@ -47,7 +48,7 @@ android {
4748
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
4849
applicationId "io.agora.agora_rtc_ng_example"
4950
minSdkVersion 21
50-
targetSdkVersion flutter.targetSdkVersion
51+
targetSdkVersion 35
5152
versionCode flutterVersionCode.toInteger()
5253
versionName flutterVersionName
5354
}

example/android/settings.gradle

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,27 @@
1-
include ':app'
1+
pluginManagement {
2+
def flutterSdkPath = {
3+
def properties = new Properties()
4+
file("local.properties").withInputStream { properties.load(it) }
5+
def flutterSdkPath = properties.getProperty("flutter.sdk")
6+
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
7+
return flutterSdkPath
8+
}
9+
settings.ext.flutterSdkPath = flutterSdkPath()
10+
11+
includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle")
212

3-
def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
4-
def properties = new Properties()
13+
repositories {
14+
google()
15+
mavenCentral()
16+
gradlePluginPortal()
17+
}
18+
}
519

6-
assert localPropertiesFile.exists()
7-
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
20+
plugins {
21+
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
22+
id "com.android.application" version "8.3.0" apply false
23+
id "org.jetbrains.kotlin.android" version "1.7.10" apply false
24+
}
25+
26+
include ':app'
827

9-
def flutterSdkPath = properties.getProperty("flutter.sdk")
10-
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
11-
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"

example/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ dependencies:
3030
# Use with the CupertinoIcons class for iOS style icons.
3131
cupertino_icons: ^1.0.2
3232

33-
permission_handler: ^10.2.0
33+
permission_handler: ^11.3.0
3434
path_provider: ^2.0.8
3535

3636
dev_dependencies:

0 commit comments

Comments
 (0)