David PHAM-VAN

Update android projects

@@ -9,3 +9,5 @@ GeneratedPluginRegistrant.java @@ -9,3 +9,5 @@ GeneratedPluginRegistrant.java
9 # Remember to never publicly share your keystore. 9 # Remember to never publicly share your keystore.
10 # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app 10 # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
11 key.properties 11 key.properties
  12 +**/*.keystore
  13 +**/*.jks
@@ -26,7 +26,16 @@ apply plugin: 'kotlin-android' @@ -26,7 +26,16 @@ apply plugin: 'kotlin-android'
26 apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 26 apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
27 27
28 android { 28 android {
29 - compileSdkVersion 30 29 + compileSdkVersion flutter.compileSdkVersion
  30 +
  31 + compileOptions {
  32 + sourceCompatibility JavaVersion.VERSION_1_8
  33 + targetCompatibility JavaVersion.VERSION_1_8
  34 + }
  35 +
  36 + kotlinOptions {
  37 + jvmTarget = '1.8'
  38 + }
30 39
31 sourceSets { 40 sourceSets {
32 main.java.srcDirs += 'src/main/kotlin' 41 main.java.srcDirs += 'src/main/kotlin'
@@ -35,8 +44,8 @@ android { @@ -35,8 +44,8 @@ android {
35 defaultConfig { 44 defaultConfig {
36 // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 45 // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
37 applicationId "net.nfet.printing_demo" 46 applicationId "net.nfet.printing_demo"
38 - minSdkVersion 16  
39 - targetSdkVersion 30 47 + minSdkVersion flutter.minSdkVersion
  48 + targetSdkVersion flutter.targetSdkVersion
40 versionCode flutterVersionCode.toInteger() 49 versionCode flutterVersionCode.toInteger()
41 versionName flutterVersionName 50 versionName flutterVersionName
42 } 51 }
@@ -2,9 +2,11 @@ @@ -2,9 +2,11 @@
2 package="net.nfet.printing_demo"> 2 package="net.nfet.printing_demo">
3 <application 3 <application
4 android:label="printing_demo" 4 android:label="printing_demo"
  5 + android:name="${applicationName}"
5 android:icon="@mipmap/ic_launcher"> 6 android:icon="@mipmap/ic_launcher">
6 <activity 7 <activity
7 android:name=".MainActivity" 8 android:name=".MainActivity"
  9 + android:exported="true"
8 android:launchMode="singleTop" 10 android:launchMode="singleTop"
9 android:theme="@style/LaunchTheme" 11 android:theme="@style/LaunchTheme"
10 android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" 12 android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
@@ -18,15 +20,6 @@ @@ -18,15 +20,6 @@
18 android:name="io.flutter.embedding.android.NormalTheme" 20 android:name="io.flutter.embedding.android.NormalTheme"
19 android:resource="@style/NormalTheme" 21 android:resource="@style/NormalTheme"
20 /> 22 />
21 - <!-- Displays an Android View that continues showing the launch screen  
22 - Drawable until Flutter paints its first frame, then this splash  
23 - screen fades out. A splash screen is useful to avoid any visual  
24 - gap between the end of Android's launch screen and the painting of  
25 - Flutter's first frame. -->  
26 - <meta-data  
27 - android:name="io.flutter.embedding.android.SplashScreenDrawable"  
28 - android:resource="@drawable/launch_background"  
29 - />  
30 <intent-filter> 23 <intent-filter>
31 <action android:name="android.intent.action.MAIN"/> 24 <action android:name="android.intent.action.MAIN"/>
32 <category android:name="android.intent.category.LAUNCHER"/> 25 <category android:name="android.intent.category.LAUNCHER"/>
@@ -2,7 +2,7 @@ buildscript { @@ -2,7 +2,7 @@ buildscript {
2 ext.kotlin_version = '1.3.50' 2 ext.kotlin_version = '1.3.50'
3 repositories { 3 repositories {
4 google() 4 google()
5 - jcenter() 5 + mavenCentral()
6 } 6 }
7 7
8 dependencies { 8 dependencies {
@@ -14,7 +14,7 @@ buildscript { @@ -14,7 +14,7 @@ buildscript {
14 allprojects { 14 allprojects {
15 repositories { 15 repositories {
16 google() 16 google()
17 - jcenter() 17 + mavenCentral()
18 } 18 }
19 } 19 }
20 20
@@ -11,6 +11,7 @@ @@ -11,6 +11,7 @@
11 - Add a default theme initializer 11 - Add a default theme initializer
12 - Use RENDER_MODE_FOR_DISPLAY on Android 12 - Use RENDER_MODE_FOR_DISPLAY on Android
13 - Enable usage of printer's settings on Windows [Alban Lecuivre] 13 - Enable usage of printer's settings on Windows [Alban Lecuivre]
  14 +- Update android projects (mavenCentral, compileSdkVersion 30, gradle:4.1.0)
14 15
15 ## 5.6.6 16 ## 5.6.6
16 17
1 group 'net.nfet.flutter.printing' 1 group 'net.nfet.flutter.printing'
2 -version '1.0-SNAPSHOT' 2 +version '1.0'
3 3
4 buildscript { 4 buildscript {
5 repositories { 5 repositories {
6 google() 6 google()
7 - jcenter() 7 + mavenCentral()
8 } 8 }
9 9
10 dependencies { 10 dependencies {
11 - classpath 'com.android.tools.build:gradle:3.5.0' 11 + classpath 'com.android.tools.build:gradle:4.1.0'
12 } 12 }
13 } 13 }
14 14
15 rootProject.allprojects { 15 rootProject.allprojects {
16 repositories { 16 repositories {
17 google() 17 google()
18 - jcenter() 18 + mavenCentral()
19 } 19 }
20 } 20 }
21 21
22 apply plugin: 'com.android.library' 22 apply plugin: 'com.android.library'
23 23
24 android { 24 android {
25 - compileSdkVersion 29 25 + compileSdkVersion 30
  26 +
  27 + compileOptions {
  28 + sourceCompatibility JavaVersion.VERSION_1_8
  29 + targetCompatibility JavaVersion.VERSION_1_8
  30 + }
26 31
27 defaultConfig { 32 defaultConfig {
28 minSdkVersion 16 33 minSdkVersion 16
1 -org.gradle.jvmargs=-Xmx1536M  
2 -android.enableJetifier=true  
3 -android.useAndroidX=true