Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 支持Flutter 3.x #386

Open
wants to merge 1 commit into
base: dev-2.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Fri Jul 26 11:14:36 CST 2019
#Fri Dec 16 19:53:02 CST 2022
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
zipStoreBase=GRADLE_USER_HOME
2 changes: 1 addition & 1 deletion example/.flutter-plugins-dependencies
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"jmessage_flutter","path":"D:\\\\Workspace\\\\android\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.flutter-io.cn\\\\jmessage_flutter-2.0.7\\\\","dependencies":[]},{"name":"jpush_flutter","path":"D:\\\\Workspace\\\\flutter\\\\jpush-flutter-plugin\\\\","dependencies":[]}],"android":[{"name":"jmessage_flutter","path":"D:\\\\Workspace\\\\android\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.flutter-io.cn\\\\jmessage_flutter-2.0.7\\\\","dependencies":[]},{"name":"jpush_flutter","path":"D:\\\\Workspace\\\\flutter\\\\jpush-flutter-plugin\\\\","dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"jmessage_flutter","dependencies":[]},{"name":"jpush_flutter","dependencies":[]}],"date_created":"2021-05-25 15:47:27.235993","version":"2.2.0"}
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"jmessage_flutter","path":"E:\\\\tools\\\\flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.flutter-io.cn\\\\jmessage_flutter-2.0.7\\\\","native_build":true,"dependencies":[]},{"name":"jpush_flutter","path":"H:\\\\workspace\\\\dev\\\\jpush_github\\\\jpush-flutter-plugin\\\\","native_build":true,"dependencies":[]}],"android":[{"name":"jmessage_flutter","path":"E:\\\\tools\\\\flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.flutter-io.cn\\\\jmessage_flutter-2.0.7\\\\","native_build":true,"dependencies":[]},{"name":"jpush_flutter","path":"H:\\\\workspace\\\\dev\\\\jpush_github\\\\jpush-flutter-plugin\\\\","native_build":true,"dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"jmessage_flutter","dependencies":[]},{"name":"jpush_flutter","dependencies":[]}],"date_created":"2022-12-16 20:13:02.612072","version":"3.3.5"}
10 changes: 5 additions & 5 deletions example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def keystoreProperties = new Properties()
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))

android {
compileSdkVersion 28
compileSdkVersion 31
lintOptions {
disable 'InvalidPackage'
}
Expand All @@ -41,10 +41,10 @@ android {
applicationId "com.shikk.testJpush" //JPush 上注册的包名.

minSdkVersion 17
targetSdkVersion 28
targetSdkVersion 31
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'



Expand Down Expand Up @@ -91,6 +91,6 @@ flutter {

dependencies {
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
}
30 changes: 20 additions & 10 deletions example/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.jiguang.jpushexample">
xmlns:tools="http://schemas.android.com/tools"
package="com.jiguang.jpushexample">

<!-- The INTERNET permission is required for development. Specifically,
flutter needs it to communicate with the running application
Expand All @@ -13,16 +14,16 @@
additional functionality it is fine to subclass or reimplement
FlutterApplication and put your custom class here. -->
<application
android:name="io.flutter.app.FlutterApplication"
android:label="jpush_example"
android:icon="@mipmap/ic_launcher">
<activity
android:name=".MainActivity"
android:launchMode="singleTask"
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
android:name="io.flutter.embedding.android.FlutterActivity"
android:launchMode="singleTask"
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density"
android:hardwareAccelerated="true"
android:exported="true"
android:windowSoftInputMode="adjustResize">
<!-- This keeps the window background of the activity showing
until Flutter renders its first frame. It can be removed if
there is no splash screen (such as the default splash screen
Expand All @@ -48,7 +49,16 @@
<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<meta-data
android:name="flutterEmbedding"
android:value="2" />
android:name="flutterEmbedding"
android:value="2"/>

<service android:name="com.jiguang.jmessageflutter.PushService"
tools:node="replace"
android:exported="true"
android:process=":pushcore">
<intent-filter>
<action android:name="cn.jiguang.user.service.action"/>
</intent-filter>
</service>
</application>
</manifest>

This file was deleted.

3 changes: 2 additions & 1 deletion example/android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ org.gradle.jvmargs=-Xmx1536M
#systemProp.https.proxyHost=127.0.0.1
#systemProp.http.proxyPort=1086
android.enableR8=true
android.useAndroidX=true
android.useAndroidX=true
android.enableJetifier=true
9 changes: 4 additions & 5 deletions example/ios/Flutter/flutter_export_environment.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
#!/bin/sh
# This is a generated file; do not edit or check into version control.
export "FLUTTER_ROOT=D:\Workspace\android\flutter"
export "FLUTTER_APPLICATION_PATH=D:\Workspace\flutter\jpush-flutter-plugin\example"
export "FLUTTER_ROOT=E:\tools\flutter\flutter"
export "FLUTTER_APPLICATION_PATH=H:\workspace\dev\jpush_github\jpush-flutter-plugin\example"
export "COCOAPODS_PARALLEL_CODE_SIGN=true"
export "FLUTTER_TARGET=lib\main.dart"
export "FLUTTER_BUILD_DIR=build"
export "SYMROOT=${SOURCE_ROOT}/../build\ios"
export "FLUTTER_BUILD_NAME=1.0.0"
export "FLUTTER_BUILD_NUMBER=1"
export "DART_OBFUSCATION=false"
export "TRACK_WIDGET_CREATION=false"
export "TRACK_WIDGET_CREATION=true"
export "TREE_SHAKE_ICONS=false"
export "PACKAGE_CONFIG=.packages"
export "PACKAGE_CONFIG=.dart_tool/package_config.json"
61 changes: 34 additions & 27 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ packages:
name: _fe_analyzer_shared
url: "https://pub.flutter-io.cn"
source: hosted
version: "21.0.0"
version: "47.0.0"
analyzer:
dependency: transitive
description:
name: analyzer
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.5.0"
version: "4.7.0"
args:
dependency: transitive
description:
Expand All @@ -28,7 +28,7 @@ packages:
name: async
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.6.1"
version: "2.9.0"
boolean_selector:
dependency: transitive
description:
Expand All @@ -42,35 +42,28 @@ packages:
name: characters
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.0"
version: "1.2.1"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.2.0"
cli_util:
dependency: transitive
description:
name: cli_util
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.3.0"
clock:
dependency: transitive
description:
name: clock
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.0"
version: "1.1.1"
collection:
dependency: transitive
description:
name: collection
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.15.0"
version: "1.16.0"
convert:
dependency: transitive
description:
Expand Down Expand Up @@ -105,7 +98,7 @@ packages:
name: fake_async
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.2.0"
version: "1.3.1"
file:
dependency: transitive
description:
Expand All @@ -123,6 +116,13 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
frontend_server_client:
dependency: transitive
description:
name: frontend_server_client
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.3"
glob:
dependency: transitive
description:
Expand Down Expand Up @@ -164,7 +164,7 @@ packages:
path: ".."
relative: true
source: path
version: "2.1.2"
version: "2.4.0"
js:
dependency: transitive
description:
Expand All @@ -185,14 +185,21 @@ packages:
name: matcher
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.12.10"
version: "0.12.12"
material_color_utilities:
dependency: transitive
description:
name: material_color_utilities
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.1.5"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.3.0"
version: "1.8.0"
mime:
dependency: transitive
description:
Expand Down Expand Up @@ -227,7 +234,7 @@ packages:
name: path
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.8.0"
version: "1.8.2"
pedantic:
dependency: transitive
description:
Expand All @@ -241,7 +248,7 @@ packages:
name: platform
url: "https://pub.flutter-io.cn"
source: hosted
version: "3.0.0"
version: "3.1.0"
pool:
dependency: transitive
description:
Expand Down Expand Up @@ -309,7 +316,7 @@ packages:
name: source_span
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.8.1"
version: "1.9.0"
stack_trace:
dependency: transitive
description:
Expand All @@ -330,35 +337,35 @@ packages:
name: string_scanner
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.0"
version: "1.1.1"
term_glyph:
dependency: transitive
description:
name: term_glyph
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.2.0"
version: "1.2.1"
test:
dependency: "direct dev"
description:
name: test
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.16.8"
version: "1.21.4"
test_api:
dependency: transitive
description:
name: test_api
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.3.0"
version: "0.4.12"
test_core:
dependency: transitive
description:
name: test_core
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.3.19"
version: "0.4.16"
typed_data:
dependency: transitive
description:
Expand All @@ -372,7 +379,7 @@ packages:
name: vector_math
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.0"
version: "2.1.2"
vm_service:
dependency: transitive
description:
Expand Down Expand Up @@ -409,5 +416,5 @@ packages:
source: hosted
version: "3.1.0"
sdks:
dart: ">=2.12.0 <3.0.0"
dart: ">=2.17.0 <3.0.0"
flutter: ">=1.20.0"
Loading