Skip to content

Commit 3fd581f

Browse files
authored
Merge pull request #1889 from miguelpruivo/bugfix/enable-auto-compile-sdk-and-upgrade-example-project
fix(android): align `compileSdk` with `flutter.compileSdkVersion
2 parents 9f03a96 + f1c6be5 commit 3fd581f

File tree

14 files changed

+75
-84
lines changed

14 files changed

+75
-84
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
## 10.3.3
2+
### Android
3+
- Updated compileSdk to use flutter.compileSdkVersion. [#1842](https://github.com/miguelpruivo/flutter_file_picker/issues/1842)
4+
5+
### Linux
6+
- Fixed an issue where initialDirectory was not working. [#1878](https://github.com/miguelpruivo/flutter_file_picker/issues/1878)
7+
18
## 10.3.2
29
### Linux
310
- Fixed an issue filtering files by extension on Linux. [#1870](https://github.com/miguelpruivo/flutter_file_picker/pull/1870) [@Decodetalkers](https://github.com/Decodetalkers)

android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ apply plugin: 'com.android.library'
2727
apply plugin: 'org.jetbrains.kotlin.android'
2828

2929
android {
30-
compileSdk 34
30+
compileSdk flutter.compileSdkVersion
3131

3232
defaultConfig {
3333
minSdk 21

android/gradle.properties

Lines changed: 0 additions & 3 deletions
This file was deleted.

example/.metadata

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# This file should be version controlled and should not be manually edited.
55

66
version:
7-
revision: "17025dd88227cd9532c33fa78f5250d548d87e9a"
7+
revision: "a402d9a4376add5bc2d6b1e33e53edaae58c07f8"
88
channel: "stable"
99

1010
project_type: app
@@ -13,23 +13,11 @@ project_type: app
1313
migration:
1414
platforms:
1515
- platform: root
16-
create_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
17-
base_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
16+
create_revision: a402d9a4376add5bc2d6b1e33e53edaae58c07f8
17+
base_revision: a402d9a4376add5bc2d6b1e33e53edaae58c07f8
1818
- platform: android
19-
create_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
20-
base_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
21-
- platform: ios
22-
create_revision: 4b12645012342076800eb701bcdfe18f87da21cf
23-
base_revision: 4b12645012342076800eb701bcdfe18f87da21cf
24-
- platform: linux
25-
create_revision: 4b12645012342076800eb701bcdfe18f87da21cf
26-
base_revision: 4b12645012342076800eb701bcdfe18f87da21cf
27-
- platform: macos
28-
create_revision: 4b12645012342076800eb701bcdfe18f87da21cf
29-
base_revision: 4b12645012342076800eb701bcdfe18f87da21cf
30-
- platform: windows
31-
create_revision: 4b12645012342076800eb701bcdfe18f87da21cf
32-
base_revision: 4b12645012342076800eb701bcdfe18f87da21cf
19+
create_revision: a402d9a4376add5bc2d6b1e33e53edaae58c07f8
20+
base_revision: a402d9a4376add5bc2d6b1e33e53edaae58c07f8
3321

3422
# User provided section
3523

example/android/.settings/org.eclipse.buildship.core.prefs

Whitespace-only changes.
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
plugins {
2-
id "com.android.application"
3-
id "kotlin-android"
2+
id("com.android.application")
3+
id("kotlin-android")
44
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
5-
id "dev.flutter.flutter-gradle-plugin"
5+
id("dev.flutter.flutter-gradle-plugin")
66
}
77

88
android {
99
namespace = "com.mr.flutter.plugin.filepicker.file_picker_example"
1010
compileSdk = flutter.compileSdkVersion
11-
ndkVersion = "27.0.12077973"
11+
ndkVersion = flutter.ndkVersion
1212

1313
compileOptions {
14-
sourceCompatibility = JavaVersion.VERSION_1_8
15-
targetCompatibility = JavaVersion.VERSION_1_8
14+
sourceCompatibility = JavaVersion.VERSION_11
15+
targetCompatibility = JavaVersion.VERSION_11
1616
}
1717

1818
kotlinOptions {
19-
jvmTarget = JavaVersion.VERSION_1_8
19+
jvmTarget = JavaVersion.VERSION_11.toString()
2020
}
2121

2222
defaultConfig {
@@ -34,7 +34,7 @@ android {
3434
release {
3535
// TODO: Add your own signing config for the release build.
3636
// Signing with the debug keys for now, so `flutter run --release` works.
37-
signingConfig = signingConfigs.debug
37+
signingConfig = signingConfigs.getByName("debug")
3838
}
3939
}
4040
}

example/android/app/src/main/kotlin/com/mr/flutter/plugin/filepicker/file_picker_example/MainActivity.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ package com.mr.flutter.plugin.filepicker.file_picker_example
22

33
import io.flutter.embedding.android.FlutterActivity
44

5-
class MainActivity: FlutterActivity()
5+
class MainActivity : FlutterActivity()

example/android/build.gradle

Lines changed: 0 additions & 25 deletions
This file was deleted.

example/android/build.gradle.kts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
allprojects {
2+
repositories {
3+
google()
4+
mavenCentral()
5+
}
6+
}
7+
8+
val newBuildDir: Directory =
9+
rootProject.layout.buildDirectory
10+
.dir("../../build")
11+
.get()
12+
rootProject.layout.buildDirectory.value(newBuildDir)
13+
14+
subprojects {
15+
val newSubprojectBuildDir: Directory = newBuildDir.dir(project.name)
16+
project.layout.buildDirectory.value(newSubprojectBuildDir)
17+
}
18+
subprojects {
19+
project.evaluationDependsOn(":app")
20+
}
21+
22+
tasks.register<Delete>("clean") {
23+
delete(rootProject.layout.buildDirectory)
24+
}

example/android/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError
1+
org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError
22
android.useAndroidX=true
33
android.enableJetifier=true

0 commit comments

Comments
 (0)