fix: Non FCM Android builds crash on start

This commit is contained in:
Christian Pauly 2022-07-09 13:08:36 +02:00
parent 4e73e6d9f4
commit 038f0c879d
12 changed files with 40 additions and 38 deletions

View File

@ -4,7 +4,7 @@
# This file should be version controlled. # This file should be version controlled.
version: version:
revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851 revision: 85684f9300908116a78138ea4c6036c35c9a1236
channel: stable channel: stable
project_type: app project_type: app
@ -13,26 +13,26 @@ project_type: app
migration: migration:
platforms: platforms:
- platform: root - platform: root
create_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851 create_revision: 85684f9300908116a78138ea4c6036c35c9a1236
base_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851 base_revision: 85684f9300908116a78138ea4c6036c35c9a1236
- platform: android - platform: android
create_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851 create_revision: 85684f9300908116a78138ea4c6036c35c9a1236
base_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851 base_revision: 85684f9300908116a78138ea4c6036c35c9a1236
- platform: ios - platform: ios
create_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851 create_revision: 85684f9300908116a78138ea4c6036c35c9a1236
base_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851 base_revision: 85684f9300908116a78138ea4c6036c35c9a1236
- platform: linux - platform: linux
create_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851 create_revision: 85684f9300908116a78138ea4c6036c35c9a1236
base_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851 base_revision: 85684f9300908116a78138ea4c6036c35c9a1236
- platform: macos - platform: macos
create_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851 create_revision: 85684f9300908116a78138ea4c6036c35c9a1236
base_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851 base_revision: 85684f9300908116a78138ea4c6036c35c9a1236
- platform: web - platform: web
create_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851 create_revision: 85684f9300908116a78138ea4c6036c35c9a1236
base_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851 base_revision: 85684f9300908116a78138ea4c6036c35c9a1236
- platform: windows - platform: windows
create_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851 create_revision: 85684f9300908116a78138ea4c6036c35c9a1236
base_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851 base_revision: 85684f9300908116a78138ea4c6036c35c9a1236
# User provided section # User provided section

6
android/.gitignore vendored
View File

@ -5,3 +5,9 @@ gradle-wrapper.jar
/gradlew.bat /gradlew.bat
/local.properties /local.properties
GeneratedPluginRegistrant.java GeneratedPluginRegistrant.java
# Remember to never publicly share your keystore.
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
key.properties
**/*.keystore
**/*.jks

View File

@ -1,6 +1,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="chat.fluffy.fluffychat"> package="chat.fluffy.fluffychat">
<!-- Flutter needs it to communicate with the running application <!-- The INTERNET permission is required for development. Specifically,
the Flutter tool needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc. to allow setting breakpoints, to provide hot reload, etc.
--> -->
<uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.INTERNET"/>

View File

@ -1,6 +1,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="chat.fluffy.fluffychat"> package="chat.fluffy.fluffychat">
<!-- Flutter needs it to communicate with the running application <!-- The INTERNET permission is required for development. Specifically,
the Flutter tool needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc. to allow setting breakpoints, to provide hot reload, etc.
--> -->
<uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.INTERNET"/>

View File

@ -2,11 +2,11 @@ buildscript {
ext.kotlin_version = '1.6.10' ext.kotlin_version = '1.6.10'
repositories { repositories {
google() google()
jcenter() mavenCentral()
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:4.2.1' classpath 'com.android.tools.build:gradle:7.1.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
//classpath 'com.google.gms:google-services:4.3.8' //classpath 'com.google.gms:google-services:4.3.8'
} }
@ -15,7 +15,7 @@ buildscript {
allprojects { allprojects {
repositories { repositories {
google() google()
jcenter() mavenCentral()
} }
} }

View File

@ -1,5 +1,3 @@
org.gradle.jvmargs=-Xmx1536M org.gradle.jvmargs=-Xmx1536M
android.enableR8=true
android.useAndroidX=true android.useAndroidX=true
android.enableJetifier=true android.enableJetifier=true
android.enableR8.fullMode=true

View File

@ -1,5 +1,6 @@
#Fri Jun 23 08:50:38 CEST 2017
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip

View File

@ -1,15 +1,11 @@
include ':app' include ':app'
def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
def properties = new Properties()
def plugins = new Properties() assert localPropertiesFile.exists()
def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
if (pluginsFile.exists()) {
pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
}
plugins.each { name, path -> def flutterSdkPath = properties.getProperty("flutter.sdk")
def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
include ":$name" apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
project(":$name").projectDir = pluginDirectory
}

View File

@ -1 +0,0 @@
include ':app'

View File

@ -1884,7 +1884,7 @@ packages:
name: video_compress name: video_compress
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "3.1.0" version: "3.1.1"
video_player: video_player:
dependency: "direct main" dependency: "direct main"
description: description:

View File

@ -82,7 +82,7 @@ dependencies:
unifiedpush: ^4.0.0 unifiedpush: ^4.0.0
universal_html: ^2.0.8 universal_html: ^2.0.8
url_launcher: ^6.0.20 url_launcher: ^6.0.20
video_compress: ^3.1.0 video_compress: ^3.1.1
video_player: ^2.2.18 video_player: ^2.2.18
vrouter: ^1.2.0+21 vrouter: ^1.2.0+21
wakelock: ^0.6.1+1 wakelock: ^0.6.1+1

View File

@ -124,7 +124,7 @@ index 85aa8647..3b7e09e7 100644
+++ b/android/build.gradle +++ b/android/build.gradle
@@ -8,7 +8,7 @@ buildscript { @@ -8,7 +8,7 @@ buildscript {
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:4.2.1' classpath 'com.android.tools.build:gradle:7.1.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
- //classpath 'com.google.gms:google-services:4.3.8' - //classpath 'com.google.gms:google-services:4.3.8'
+ classpath 'com.google.gms:google-services:4.3.8' + classpath 'com.google.gms:google-services:4.3.8'