Skip to content

Commit 9d70399

Browse files
committedFeb 25, 2020
android x migration and code updates for android
1 parent 393f355 commit 9d70399

7 files changed

+22
-11
lines changed
 

‎.flutter-plugins-dependencies

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"_info":"// This is a generated file; do not edit or check into version control.","dependencyGraph":[{"name":"camera","dependencies":[]},{"name":"tflite","dependencies":[]}]}

‎android/app/build.gradle

+12-6
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,20 @@ apply plugin: 'com.android.application'
2525
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
2626

2727
android {
28-
compileSdkVersion 27
28+
compileSdkVersion 29
2929

3030
lintOptions {
3131
disable 'InvalidPackage'
3232
}
33-
33+
3434
defaultConfig {
3535
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
3636
applicationId "com.example.examplerealtime"
3737
minSdkVersion 21
38-
targetSdkVersion 27
38+
targetSdkVersion 29
3939
versionCode flutterVersionCode.toInteger()
4040
versionName flutterVersionName
41-
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
41+
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
4242
}
4343

4444
buildTypes {
@@ -51,7 +51,13 @@ android {
5151

5252
aaptOptions {
5353
noCompress 'tflite'
54+
noCompress 'lite'
55+
}
56+
compileOptions {
57+
sourceCompatibility = 1.8
58+
targetCompatibility = 1.8
5459
}
60+
buildToolsVersion = '28.0.3'
5561
}
5662

5763
flutter {
@@ -60,6 +66,6 @@ flutter {
6066

6167
dependencies {
6268
testImplementation 'junit:junit:4.12'
63-
androidTestImplementation 'com.android.support.test:runner:1.0.2'
64-
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
69+
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
70+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
6571
}

‎android/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ buildscript {
55
}
66

77
dependencies {
8-
classpath 'com.android.tools.build:gradle:3.2.1'
8+
classpath 'com.android.tools.build:gradle:3.5.3'
99
}
1010
}
1111

‎android/gradle.properties

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
org.gradle.jvmargs=-Xmx1536M
2-
target-platform=android-arm64
2+
target-platform=android-arm64
3+
android.enableR8=true
4+
android.useAndroidX=true
5+
android.enableJetifier=true
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Fri Jun 23 08:50:38 CEST 2017
1+
#Mon Feb 24 22:54:24 EST 2020
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip

‎lib/main.dart

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import 'home.dart';
66
List<CameraDescription> cameras;
77

88
Future<Null> main() async {
9+
WidgetsFlutterBinding.ensureInitialized();
910
try {
1011
cameras = await availableCameras();
1112
} on CameraException catch (e) {

‎pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ dev_dependencies:
2424
flutter_test:
2525
sdk: flutter
2626

27-
camera: 0.4.0
27+
camera: 0.5.7+4
2828

2929
tflite: 1.0.4
3030

0 commit comments

Comments
 (0)
Please sign in to comment.