File tree Expand file tree Collapse file tree 6 files changed +12
-13
lines changed
src/main/java/io/flutter/plugins/share Expand file tree Collapse file tree 6 files changed +12
-13
lines changed Original file line number Diff line number Diff line change 1+ ## 0.6.5+3
2+
3+ * Replace deprecated ` Environment.getExternalStorageDirectory() ` call on Android.
4+ * Upgrade to Android Gradle plugin 3.5.0 & target API level 29.
5+
16## 0.6.5+2
27
38* Keep handling deprecated Android v1 classes for backward compatibility.
Original file line number Diff line number Diff line change 11group ' io.flutter.plugins.share'
22version ' 1.0-SNAPSHOT'
3- def args = [" -Xlint:deprecation" ," -Xlint:unchecked" ," -Werror" ]
43
54buildscript {
65 repositories {
@@ -9,7 +8,7 @@ buildscript {
98 }
109
1110 dependencies {
12- classpath ' com.android.tools.build:gradle:3.3 .0'
11+ classpath ' com.android.tools.build:gradle:3.5 .0'
1312 }
1413}
1514
@@ -20,14 +19,10 @@ rootProject.allprojects {
2019 }
2120}
2221
23- project. getTasks(). withType(JavaCompile ){
24- options. compilerArgs. addAll(args)
25- }
26-
2722apply plugin : ' com.android.library'
2823
2924android {
30- compileSdkVersion 28
25+ compileSdkVersion 29
3126
3227 defaultConfig {
3328 minSdkVersion 16
Original file line number Diff line number Diff line change 1010import android .content .pm .PackageManager ;
1111import android .content .pm .ResolveInfo ;
1212import android .net .Uri ;
13- import android .os .Environment ;
1413import androidx .annotation .NonNull ;
1514import androidx .core .content .FileProvider ;
1615import java .io .File ;
@@ -166,7 +165,7 @@ private String getMimeTypeBase(String mimeType) {
166165 private boolean fileIsOnExternal (File file ) {
167166 try {
168167 String filePath = file .getCanonicalPath ();
169- File externalDir = Environment . getExternalStorageDirectory ( );
168+ File externalDir = context . getExternalFilesDir ( null );
170169 return externalDir != null && filePath .startsWith (externalDir .getCanonicalPath ());
171170 } catch (IOException e ) {
172171 return false ;
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ apply plugin: 'com.android.application'
2525apply from : " $flutterRoot /packages/flutter_tools/gradle/flutter.gradle"
2626
2727android {
28- compileSdkVersion 28
28+ compileSdkVersion 29
2929
3030 lintOptions {
3131 disable ' InvalidPackage'
@@ -34,7 +34,7 @@ android {
3434 defaultConfig {
3535 applicationId " io.flutter.plugins.shareexample"
3636 minSdkVersion 16
37- targetSdkVersion 28
37+ targetSdkVersion 29
3838 versionCode flutterVersionCode. toInteger()
3939 versionName flutterVersionName
4040 testInstrumentationRunner " androidx.test.runner.AndroidJUnitRunner"
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ buildscript {
55 }
66
77 dependencies {
8- classpath ' com.android.tools.build:gradle:3.3 .0'
8+ classpath ' com.android.tools.build:gradle:3.5 .0'
99 }
1010}
1111
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ homepage: https://github.com/flutter/plugins/tree/master/packages/share
55# 0.6.y+z is compatible with 1.0.0, if you land a breaking change bump
66# the version to 2.0.0.
77# See more details: https://github.com/flutter/flutter/wiki/Package-migration-to-1.0.0
8- version : 0.6.5+2
8+ version : 0.6.5+3
99
1010flutter :
1111 plugin :
You can’t perform that action at this time.
0 commit comments