From d4696768922d6eb630837d7fbba637974a913c26 Mon Sep 17 00:00:00 2001 From: Haitham Alhad Hyder <22187034+Inventrohyder@users.noreply.github.com> Date: Thu, 14 Apr 2022 23:40:04 +0300 Subject: [PATCH 1/5] =?UTF-8?q?=E2=AC=86=EF=B8=8F=20chore:=20update=20base?= =?UTF-8?q?=20gradle?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- android/build.gradle | 6 +++--- android/gradle/wrapper/gradle-wrapper.properties | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index ef13912..4391027 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -4,18 +4,18 @@ version '1.0-SNAPSHOT' buildscript { repositories { google() - jcenter() + mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:3.3.1' + classpath 'com.android.tools.build:gradle:7.1.3' } } rootProject.allprojects { repositories { google() - jcenter() + mavenCentral() } } diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index e5b23dd..4deb8c8 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Tue Jan 28 22:04:38 CET 2020 +#Thu Apr 14 23:39:33 EAT 2022 distributionBase=GRADLE_USER_HOME +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip +zipStoreBase=GRADLE_USER_HOME From 28e5cb8bb72cc4e5e9c08d7c0226908d4b7822bc Mon Sep 17 00:00:00 2001 From: Haitham Alhad Hyder <22187034+Inventrohyder@users.noreply.github.com> Date: Thu, 14 Apr 2022 23:55:37 +0300 Subject: [PATCH 2/5] =?UTF-8?q?=E2=AC=86=EF=B8=8F=20chore:=20upgrade=20gra?= =?UTF-8?q?dle=20for=20example=20app?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- android/build.gradle | 2 +- example/android/app/build.gradle | 10 +++++----- example/android/build.gradle | 6 +++--- example/android/gradle.properties | 1 - .../android/gradle/wrapper/gradle-wrapper.properties | 6 +++--- example/android/gradlew | 0 6 files changed, 12 insertions(+), 13 deletions(-) mode change 100644 => 100755 example/android/gradlew diff --git a/android/build.gradle b/android/build.gradle index 4391027..307d6b7 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -22,7 +22,7 @@ rootProject.allprojects { apply plugin: 'com.android.library' android { - compileSdkVersion 28 + compileSdkVersion 31 defaultConfig { minSdkVersion 16 diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index 7989682..0dacc71 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -15,7 +15,7 @@ apply plugin: 'com.android.application' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { - compileSdkVersion 28 + compileSdkVersion 31 lintOptions { disable 'InvalidPackage' @@ -25,7 +25,7 @@ android { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). applicationId "com.example.flutternativeimageexample" minSdkVersion 16 - targetSdkVersion 27 + targetSdkVersion 31 versionCode 1 versionName "1.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" @@ -45,7 +45,7 @@ flutter { } dependencies { - testImplementation 'junit:junit:4.12' - androidTestImplementation 'androidx.test:runner:1.1.0' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0' + testImplementation 'junit:junit:4.13.2' + androidTestImplementation 'androidx.test:runner:1.4.0' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' } diff --git a/example/android/build.gradle b/example/android/build.gradle index 6de3728..d91aa29 100644 --- a/example/android/build.gradle +++ b/example/android/build.gradle @@ -1,18 +1,18 @@ buildscript { repositories { google() - jcenter() + mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:3.5.3' + classpath 'com.android.tools.build:gradle:7.1.3' } } allprojects { repositories { google() - jcenter() + mavenCentral() } } diff --git a/example/android/gradle.properties b/example/android/gradle.properties index a673820..94adc3a 100644 --- a/example/android/gradle.properties +++ b/example/android/gradle.properties @@ -1,4 +1,3 @@ org.gradle.jvmargs=-Xmx1536M android.useAndroidX=true android.enableJetifier=true -android.enableR8=true diff --git a/example/android/gradle/wrapper/gradle-wrapper.properties b/example/android/gradle/wrapper/gradle-wrapper.properties index 63ab3ae..8b2e3a0 100644 --- a/example/android/gradle/wrapper/gradle-wrapper.properties +++ b/example/android/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Fri Jun 23 08:50:38 CEST 2017 +#Thu Apr 14 23:51:21 EAT 2022 distributionBase=GRADLE_USER_HOME +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip +zipStoreBase=GRADLE_USER_HOME diff --git a/example/android/gradlew b/example/android/gradlew old mode 100644 new mode 100755 From c78aa942cf6c54f37f073b31376353e08ddc5421 Mon Sep 17 00:00:00 2001 From: Haitham Alhad Hyder <22187034+Inventrohyder@users.noreply.github.com> Date: Thu, 14 Apr 2022 23:56:02 +0300 Subject: [PATCH 3/5] =?UTF-8?q?=F0=9F=91=BD=20chore:=20ensure=20android=20?= =?UTF-8?q?exported=20is=20set?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- example/android/app/src/main/AndroidManifest.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/example/android/app/src/main/AndroidManifest.xml b/example/android/app/src/main/AndroidManifest.xml index 8710423..b30fbab 100644 --- a/example/android/app/src/main/AndroidManifest.xml +++ b/example/android/app/src/main/AndroidManifest.xml @@ -22,6 +22,7 @@ android:theme="@style/LaunchTheme" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale" android:hardwareAccelerated="true" + android:exported="true" android:windowSoftInputMode="adjustResize"> - + android:name="${applicationName}" + android:icon="@mipmap/ic_launcher" + android:label="flutter_native_image_example"> - - + - - + + + + + + + + diff --git a/example/android/app/src/main/java/com/example/flutternativeimageexample/MainActivity.java b/example/android/app/src/main/java/com/example/flutternativeimageexample/MainActivity.java index 27bb389..04627de 100644 --- a/example/android/app/src/main/java/com/example/flutternativeimageexample/MainActivity.java +++ b/example/android/app/src/main/java/com/example/flutternativeimageexample/MainActivity.java @@ -1,14 +1,6 @@ package com.example.flutternativeimageexample; -import android.os.Bundle; - -import io.flutter.app.FlutterActivity; -import io.flutter.plugins.GeneratedPluginRegistrant; +import io.flutter.embedding.android.FlutterActivity; public class MainActivity extends FlutterActivity { - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - GeneratedPluginRegistrant.registerWith(this); - } } diff --git a/example/android/app/src/main/res/values/styles.xml b/example/android/app/src/main/res/values/styles.xml index 00fa441..7110920 100644 --- a/example/android/app/src/main/res/values/styles.xml +++ b/example/android/app/src/main/res/values/styles.xml @@ -1,8 +1,11 @@ + + +