├── .drone.yml
├── .gitattributes
├── .github
└── workflows
│ ├── issue.yml
│ └── pull_request.yml
├── .gitignore
├── .gitlab-ci.yml
├── .metadata
├── .vscode
├── launch.json
└── settings.json
├── CHANGELOG.md
├── LICENSE
├── README.md
├── android
├── .classpath
├── .gitignore
├── .settings
│ └── org.eclipse.buildship.core.prefs
├── build.gradle
├── build.gradle.tpl
├── gradle.properties
├── gradle
│ └── wrapper
│ │ └── gradle-wrapper.properties
├── proguard-android.txt
├── proguard-rules.pro
├── settings.gradle
└── src
│ └── main
│ ├── AndroidManifest.xml
│ └── java
│ └── com
│ └── finogeeks
│ └── mop
│ ├── MopEventStream.java
│ ├── MopPlugin.java
│ ├── MopPluginDelegate.java
│ ├── api
│ ├── AbsApi.java
│ ├── ApisManager.java
│ ├── BaseApi.java
│ ├── EmptyApi.java
│ └── mop
│ │ ├── AppletHandlerModule.java
│ │ ├── AppletManageModule.java
│ │ ├── AppletModule.java
│ │ ├── BaseModule.java
│ │ ├── ExtensionApiModule.java
│ │ ├── InitSDKModule.java
│ │ ├── SmSignModule.java
│ │ ├── VersionModule.java
│ │ ├── WXQrCodeModule.java
│ │ └── util
│ │ └── InitUtils.java
│ ├── constants
│ └── Constants.java
│ ├── impls
│ └── MyUserProfileHandler.java
│ ├── interfaces
│ ├── Event.java
│ ├── FlutterInterface.java
│ ├── IApi.java
│ ├── ICallback.java
│ └── ILifecycle.java
│ ├── service
│ └── MopPluginService.java
│ └── utils
│ ├── AppletUtils.java
│ └── GsonUtil.java
├── bundle.sh
├── example
├── .gitignore
├── .metadata
├── README.md
├── analysis_options.yaml
├── android
│ ├── .gitignore
│ ├── .project
│ ├── .settings
│ │ └── org.eclipse.buildship.core.prefs
│ ├── app
│ │ ├── .classpath
│ │ ├── .project
│ │ ├── .settings
│ │ │ └── org.eclipse.buildship.core.prefs
│ │ ├── build.gradle
│ │ └── src
│ │ │ ├── debug
│ │ │ └── AndroidManifest.xml
│ │ │ ├── main
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── java
│ │ │ │ └── com
│ │ │ │ │ └── finogeeks
│ │ │ │ │ └── mop_example
│ │ │ │ │ ├── CustomLoadingPage.java
│ │ │ │ │ ├── MainActivity.java
│ │ │ │ │ └── MainApplication.java
│ │ │ └── res
│ │ │ │ ├── drawable-v21
│ │ │ │ └── launch_background.xml
│ │ │ │ ├── drawable
│ │ │ │ └── launch_background.xml
│ │ │ │ ├── layout
│ │ │ │ ├── layout_custom_loading_page.xml
│ │ │ │ └── layout_custom_loading_page_failure.xml
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── values-night
│ │ │ │ └── styles.xml
│ │ │ │ └── values
│ │ │ │ └── styles.xml
│ │ │ └── profile
│ │ │ └── AndroidManifest.xml
│ ├── build.gradle
│ ├── gradle.properties
│ ├── gradle
│ │ └── wrapper
│ │ │ └── gradle-wrapper.properties
│ └── settings.gradle
├── ios
│ ├── .gitignore
│ ├── Flutter
│ │ ├── AppFrameworkInfo.plist
│ │ ├── Debug.xcconfig
│ │ └── Release.xcconfig
│ ├── Podfile
│ ├── Podfile.lock
│ ├── Runner.xcodeproj
│ │ ├── project.pbxproj
│ │ ├── project.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata
│ │ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ │ └── WorkspaceSettings.xcsettings
│ │ └── xcshareddata
│ │ │ └── xcschemes
│ │ │ └── Runner.xcscheme
│ ├── Runner.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ └── WorkspaceSettings.xcsettings
│ └── Runner
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ ├── Contents.json
│ │ │ ├── Icon-App-1024x1024@1x.png
│ │ │ ├── Icon-App-20x20@1x.png
│ │ │ ├── Icon-App-20x20@2x.png
│ │ │ ├── Icon-App-20x20@3x.png
│ │ │ ├── Icon-App-29x29@1x.png
│ │ │ ├── Icon-App-29x29@2x.png
│ │ │ ├── Icon-App-29x29@3x.png
│ │ │ ├── Icon-App-40x40@1x.png
│ │ │ ├── Icon-App-40x40@2x.png
│ │ │ ├── Icon-App-40x40@3x.png
│ │ │ ├── Icon-App-60x60@2x.png
│ │ │ ├── Icon-App-60x60@3x.png
│ │ │ ├── Icon-App-76x76@1x.png
│ │ │ ├── Icon-App-76x76@2x.png
│ │ │ └── Icon-App-83.5x83.5@2x.png
│ │ ├── Contents.json
│ │ ├── LaunchImage.imageset
│ │ │ ├── Contents.json
│ │ │ ├── LaunchImage.png
│ │ │ ├── LaunchImage@2x.png
│ │ │ ├── LaunchImage@3x.png
│ │ │ └── README.md
│ │ ├── minipro_list_collect.imageset
│ │ │ ├── Contents.json
│ │ │ ├── minipro_list_collect@2x.png
│ │ │ └── minipro_list_collect@3x.png
│ │ └── minipro_list_service.imageset
│ │ │ ├── Contents.json
│ │ │ ├── minipro_list_service@2x.png
│ │ │ └── minipro_list_service@3x.png
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── FlutterMethodChannelHandler.h
│ │ ├── FlutterMethodChannelHandler.m
│ │ ├── Info.plist
│ │ ├── LoadingView.h
│ │ ├── LoadingView.m
│ │ └── Runner-Bridging-Header.h
├── lib
│ ├── main.dart
│ └── test_page.dart
├── pubspec.lock
├── pubspec.yaml
└── test
│ └── widget_test.dart
├── ios
├── .gitignore
├── Assets
│ └── .gitkeep
├── Classes
│ ├── Api
│ │ ├── MOPAppletDelegate.h
│ │ ├── MOPAppletDelegate.m
│ │ ├── MOPButtonOpenTypeDelegate.h
│ │ ├── MOPButtonOpenTypeDelegate.m
│ │ ├── MOP_addWebExtentionApi.h
│ │ ├── MOP_addWebExtentionApi.m
│ │ ├── MOP_callJS.h
│ │ ├── MOP_callJS.m
│ │ ├── MOP_changeUserId.h
│ │ ├── MOP_changeUserId.m
│ │ ├── MOP_clearApplets.h
│ │ ├── MOP_clearApplets.m
│ │ ├── MOP_closeAllApplets.h
│ │ ├── MOP_closeAllApplets.m
│ │ ├── MOP_closeApplet.h
│ │ ├── MOP_closeApplet.m
│ │ ├── MOP_currentApplet.h
│ │ ├── MOP_currentApplet.m
│ │ ├── MOP_finishRunningApplet.h
│ │ ├── MOP_finishRunningApplet.m
│ │ ├── MOP_initSDK.h
│ │ ├── MOP_initSDK.m
│ │ ├── MOP_initialize.h
│ │ ├── MOP_initialize.m
│ │ ├── MOP_openApplet.h
│ │ ├── MOP_openApplet.m
│ │ ├── MOP_parseAppletInfoFromWXQrCode.h
│ │ ├── MOP_parseAppletInfoFromWXQrCode.m
│ │ ├── MOP_qrcodeOpenApplet.h
│ │ ├── MOP_qrcodeOpenApplet.m
│ │ ├── MOP_registerAppletHandler.h
│ │ ├── MOP_registerAppletHandler.m
│ │ ├── MOP_registerExtensionApi.h
│ │ ├── MOP_registerExtensionApi.m
│ │ ├── MOP_removeAllUsedApplets.h
│ │ ├── MOP_removeAllUsedApplets.m
│ │ ├── MOP_removeApplet.h
│ │ ├── MOP_removeApplet.m
│ │ ├── MOP_removeUsedApplet.h
│ │ ├── MOP_removeUsedApplet.m
│ │ ├── MOP_scanOpenApplet.h
│ │ ├── MOP_scanOpenApplet.m
│ │ ├── MOP_sdkVersion.h
│ │ ├── MOP_sdkVersion.m
│ │ ├── MOP_sendCustomEvent.h
│ │ ├── MOP_sendCustomEvent.m
│ │ ├── MOP_setFinStoreConfigs.h
│ │ ├── MOP_setFinStoreConfigs.m
│ │ ├── MOP_showBotomSheetModel.h
│ │ ├── MOP_showBotomSheetModel.m
│ │ ├── MOP_smsign.h
│ │ ├── MOP_smsign.m
│ │ ├── MOP_startApplet.h
│ │ ├── MOP_startApplet.m
│ │ ├── MOP_webViewBounces.h
│ │ └── MOP_webViewBounces.m
│ ├── Model
│ │ ├── MopCustomMenuModel.h
│ │ └── MopCustomMenuModel.m
│ ├── MopPlugin.h
│ ├── MopPlugin.m
│ └── Utils
│ │ ├── MOPApiConverter.h
│ │ ├── MOPApiConverter.m
│ │ ├── MOPApiRequest.h
│ │ ├── MOPApiRequest.m
│ │ ├── MOPBaseApi.h
│ │ ├── MOPBaseApi.m
│ │ ├── MOPTools.h
│ │ ├── MOPTools.m
│ │ ├── MopShareView.h
│ │ ├── MopShareView.m
│ │ ├── UIView+MOPFATToast.h
│ │ └── UIView+MOPFATToast.m
├── mop.podspec
└── mop.podspec.tpl
├── lib
├── api.dart
└── mop.dart
├── publish.sh
├── pubspec.lock
├── pubspec.tpl.yaml
├── pubspec.yaml
├── tag.sh
├── test
└── mop_test.dart
├── trigger.sh
└── update_version.sh
/.drone.yml:
--------------------------------------------------------------------------------
1 | clone:
2 | git:
3 | image: plugins/git
4 | tags: true
5 | pipeline:
6 | build:
7 | image: docker.finogeeks.club/build/ubuntu-scp
8 | pull: true
9 | commands:
10 | - bash trigger.sh
11 | when:
12 | event: tag
13 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | *.* linguist-language=dart
2 |
--------------------------------------------------------------------------------
/.github/workflows/issue.yml:
--------------------------------------------------------------------------------
1 | name: Notify
2 | on:
3 | issues:
4 | types: [opened]
5 | issue_comment:
6 | types: [created]
7 | jobs:
8 | build:
9 | runs-on: ubuntu-latest
10 | steps:
11 | - uses: actions/checkout@v2
12 | - name: Notify
13 | run: curl --location --request POST 'https://api.finogeeks.club/api/v1/finstore/webhooks/61b331d79b3dad0001f72fa2/postreceive?nonce=jhd2QyrArsc' --header "Content-Type:application/json" --data-raw '{"msg":"仓库 ${{github.repository}} 有新的 issue"}'
14 |
--------------------------------------------------------------------------------
/.github/workflows/pull_request.yml:
--------------------------------------------------------------------------------
1 | name: Notify
2 | on:
3 | pull_request:
4 | branches: [ master ]
5 | jobs:
6 | build:
7 | runs-on: ubuntu-latest
8 | steps:
9 | - uses: actions/checkout@v2
10 | - name: Notify
11 | run: curl --location --request POST 'https://api.finogeeks.club/api/v1/finstore/webhooks/61b331d79b3dad0001f72fa2/postreceive?nonce=jhd2QyrArsc' --header "Content-Type:application/json" --data-raw '{"msg":"仓库 ${{github.repository}} 有新的 PR ${{ github.event.pull_request._links.html.href }}"}'
12 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .idea
2 | .DS_Store
3 | .dart_tool/
4 |
5 | .packages
6 | .pub/
7 |
8 | # Files and directories created by pub
9 | .dart_tool/
10 | .packages
11 | # If you're building an application, you may want to check-in your pubspec.lock
12 | #pubspec.lock
13 |
14 | # Directory created by dartdoc
15 | # If you don't generate documentation locally you can remove this line.
16 | doc/api/
17 |
18 | # Avoid committing generated Javascript files:
19 | *.dart.js
20 | *.info.json # Produced by the --dump-info flag.
21 | *.js # When generated by dart2js. Don't specify *.js if your
22 | # project includes source files written in JavaScript.
23 | *.js_
24 | *.js.deps
25 | *.js.map
26 | **/*.lock
27 |
28 | *.iml
29 | .gradle
30 | /local.properties
31 | /.idea/workspace.xml
32 | /.idea/libraries
33 | .DS_Store
34 | /build
35 | /captures
36 | example/ios/Podfile.lock
37 | example/pubspec.lock
38 | pubspec.lock
39 |
40 |
41 | android/bin/
42 | android/.project
43 |
--------------------------------------------------------------------------------
/.gitlab-ci.yml:
--------------------------------------------------------------------------------
1 | stages:
2 | - build
3 | variables:
4 | LC_ALL: "en_US.UTF-8"
5 | LANG: "en_US.UTF-8"
6 | GITLAB_VERSION: $GITLAB_VERSION
7 | GITLAB_IOS_VERSION: $GITLAB_IOS_VERSION
8 | GITLAB_ANDROID_VERSION: $GITLAB_ANDROID_VERSION
9 |
10 | workflow:
11 | rules:
12 | - if: '$GITLAB_VERSION != null && $GITLAB_VERSION != ""'
13 | - when: never
14 |
15 | build:
16 | stage: build
17 | script:
18 | - |
19 | echo "检查变量值:"
20 | echo "Version: $GITLAB_VERSION"
21 | echo "iOS Version: $GITLAB_IOS_VERSION"
22 | echo "Android Version: $GITLAB_ANDROID_VERSION"
23 |
24 | sh bundle.sh $GITLAB_VERSION $GITLAB_IOS_VERSION $GITLAB_ANDROID_VERSION $CI_COMMIT_REF_NAME
25 | tags:
26 | - mac-studio
27 | only:
28 | - web
29 | - api
30 | - pipelines
31 |
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/.metadata:
--------------------------------------------------------------------------------
1 | # This file tracks properties of this Flutter project.
2 | # Used by Flutter tool to assess capabilities and perform upgrades etc.
3 | #
4 | # This file should be version controlled and should not be manually edited.
5 |
6 | version:
7 | revision: 1aedbb1835bd6eb44550293d57d4d124f19901f0
8 | channel: stable
9 |
10 | project_type: plugin
11 |
--------------------------------------------------------------------------------
/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | {
2 | // Use IntelliSense to learn about possible attributes.
3 | // Hover to view descriptions of existing attributes.
4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5 | "version": "0.2.0",
6 | "configurations": [
7 | {
8 | "name": "Flutter",
9 | "request": "launch",
10 | "type": "dart",
11 | "cwd": "${workspaceFolder}/example"
12 | }
13 | ]
14 | }
15 |
--------------------------------------------------------------------------------
/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "java.configuration.updateBuildConfiguration": "interactive"
3 | }
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | ## 2.35.7
2 | Release
3 | ## 2.22.4
4 | Release
5 | ## 2.22.2
6 | Release
7 | ## 2.22.1
8 | Release
9 | ## 2.21.1
10 | Release
11 | ## 2.21.1
12 | Release
13 | ##
14 | Release
15 | ## 2.20.17
16 | Release
17 | ## 1.1.0
18 | Release
19 | ## 1.0.8
20 | Release
21 | ## 1.0.0
22 | Release
23 | ## 0.7.1
24 | 升级版本
25 | ## 0.7.0
26 | 适配运行时新接口
27 | ## 0.6.1
28 | 适配运行时新接口
29 | ## 0.6.0
30 | 增加api接口
31 | ## 0.5.0
32 | ## 0.4.0
33 | 支持小程序最新依赖
34 | ## 0.3.0
35 | ## 0.2.0
36 |
37 | ## 0.1.1
38 |
39 | ## 0.1.0
40 |
41 | * TODO: Describe initial release.
42 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2020 finogeeks
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/android/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/android/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/workspace.xml
5 | /.idea/libraries
6 | .DS_Store
7 | /build
8 | /captures
9 |
--------------------------------------------------------------------------------
/android/.settings/org.eclipse.buildship.core.prefs:
--------------------------------------------------------------------------------
1 | arguments=--init-script /var/folders/tx/98mydjws12b717spn4mx1wd80000gn/T/db3b08fc4a9ef609cb16b96b200fa13e563f396e9bb1ed0905fdab7bc3bc513b.gradle --init-script /var/folders/tx/98mydjws12b717spn4mx1wd80000gn/T/52cde0cfcf3e28b8b7510e992210d9614505e0911af0c190bd590d7158574963.gradle
2 | auto.sync=false
3 | build.scans.enabled=false
4 | connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER)
5 | connection.project.dir=
6 | eclipse.preferences.version=1
7 | gradle.user.home=
8 | java.home=/Library/Java/JavaVirtualMachines/jdk-1.8.jdk/Contents/Home
9 | jvm.arguments=
10 | offline.mode=false
11 | override.workspace.settings=true
12 | show.console.view=true
13 | show.executions.view=true
14 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 |
2 | apply plugin: 'com.android.library'
3 |
4 | apply plugin: 'kotlin-android'
5 | apply plugin: 'kotlin-kapt'
6 | apply plugin: 'kotlin-android-extensions'
7 |
8 | group 'com.finogeeks.mop'
9 | version '1.0'
10 |
11 | buildscript {
12 | repositories {
13 | google()
14 | jcenter()
15 | maven {
16 | url "https://gradle.finogeeks.club/repository/finogeeks/"
17 | credentials {
18 | username "finclip"
19 | password "Abcd@@1234"
20 | }
21 | }
22 | maven {
23 | url "https://gradle.finogeeks.club/repository/applet/"
24 | credentials {
25 | username "finclip"
26 | password "Abcd@@1234"
27 | }
28 | }
29 | maven { url "https://jitpack.io" }
30 |
31 | }
32 |
33 | dependencies {
34 | classpath 'com.android.tools.build:gradle:3.5.3'
35 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.61"
36 |
37 | }
38 | }
39 |
40 | rootProject.allprojects {
41 | repositories {
42 | google()
43 | jcenter()
44 | maven {
45 | url "https://gradle.finogeeks.club/repository/finogeeks/"
46 | credentials {
47 | username "finclip"
48 | password "Abcd@@1234"
49 | }
50 | }
51 | maven {
52 | url "https://gradle.finogeeks.club/repository/applet/"
53 | credentials {
54 | username "finclip"
55 | password "Abcd@@1234"
56 | }
57 | }
58 | maven { url "https://jitpack.io" }
59 |
60 | }
61 | }
62 |
63 |
64 | android {
65 | compileSdkVersion 28
66 |
67 | defaultConfig {
68 | minSdkVersion 21
69 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
70 | }
71 | buildTypes {
72 | release {
73 | minifyEnabled false
74 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
75 | }
76 | }
77 |
78 | compileOptions {
79 | sourceCompatibility JavaVersion.VERSION_1_8
80 | targetCompatibility JavaVersion.VERSION_1_8
81 | }
82 | lintOptions {
83 | disable 'InvalidPackage'
84 | }
85 | }
86 |
87 | kapt {
88 | arguments {
89 | arg("moduleName", project.getName())
90 | }
91 | }
92 | dependencies {
93 | implementation fileTree(include: ['*.jar'], dir: 'libs')
94 | implementation 'com.finogeeks.lib:finapplet:2.48.7'
95 | implementation 'com.finogeeks.mop:plugins:2.48.7'
96 | }
--------------------------------------------------------------------------------
/android/build.gradle.tpl:
--------------------------------------------------------------------------------
1 |
2 | apply plugin: 'com.android.library'
3 |
4 | apply plugin: 'kotlin-android'
5 | apply plugin: 'kotlin-kapt'
6 | apply plugin: 'kotlin-android-extensions'
7 |
8 | group 'com.finogeeks.mop'
9 | version '1.0'
10 |
11 | buildscript {
12 | repositories {
13 | google()
14 | jcenter()
15 | maven {
16 | url "https://gradle.finogeeks.club/repository/finogeeks/"
17 | credentials {
18 | username "finclip"
19 | password "Abcd@@1234"
20 | }
21 | }
22 | maven {
23 | url "https://gradle.finogeeks.club/repository/applet/"
24 | credentials {
25 | username "finclip"
26 | password "Abcd@@1234"
27 | }
28 | }
29 | maven { url "https://jitpack.io" }
30 |
31 | }
32 |
33 | dependencies {
34 | classpath 'com.android.tools.build:gradle:3.5.3'
35 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.61"
36 |
37 | }
38 | }
39 |
40 | rootProject.allprojects {
41 | repositories {
42 | google()
43 | jcenter()
44 | maven {
45 | url "https://gradle.finogeeks.club/repository/finogeeks/"
46 | credentials {
47 | username "finclip"
48 | password "Abcd@@1234"
49 | }
50 | }
51 | maven {
52 | url "https://gradle.finogeeks.club/repository/applet/"
53 | credentials {
54 | username "finclip"
55 | password "Abcd@@1234"
56 | }
57 | }
58 | maven { url "https://jitpack.io" }
59 |
60 | }
61 | }
62 |
63 |
64 | android {
65 | compileSdkVersion 28
66 |
67 | defaultConfig {
68 | minSdkVersion 21
69 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
70 | }
71 | buildTypes {
72 | release {
73 | minifyEnabled false
74 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
75 | }
76 | }
77 |
78 | compileOptions {
79 | sourceCompatibility JavaVersion.VERSION_1_8
80 | targetCompatibility JavaVersion.VERSION_1_8
81 | }
82 | lintOptions {
83 | disable 'InvalidPackage'
84 | }
85 | }
86 |
87 | kapt {
88 | arguments {
89 | arg("moduleName", project.getName())
90 | }
91 | }
92 | dependencies {
93 | implementation fileTree(include: ['*.jar'], dir: 'libs')
94 | implementation 'com.finogeeks.lib:finapplet:__finapplet_version__'
95 | implementation 'com.finogeeks.mop:plugins:__finapplet_version__'
96 | }
--------------------------------------------------------------------------------
/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 | android.useAndroidX=true
3 | android.enableJetifier=true
4 |
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | zipStoreBase=GRADLE_USER_HOME
4 | zipStorePath=wrapper/dists
5 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
6 |
--------------------------------------------------------------------------------
/android/proguard-android.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/finogeeks/mop-flutter-sdk/135505fc16269edfa622ba9b4aec1d9e5c028084/android/proguard-android.txt
--------------------------------------------------------------------------------
/android/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | -keep class com.finogeeks.** {*;}
2 |
3 | # tbs
4 | -keep class com.tencent.smtt.** {*;}
5 | -keep class com.tencent.tbs.** {*;}
--------------------------------------------------------------------------------
/android/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'mop'
2 |
--------------------------------------------------------------------------------
/android/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
--------------------------------------------------------------------------------
/android/src/main/java/com/finogeeks/mop/MopEventStream.java:
--------------------------------------------------------------------------------
1 | package com.finogeeks.mop;
2 |
3 | import java.util.HashMap;
4 | import java.util.Map;
5 |
6 | import io.flutter.plugin.common.EventChannel;
7 |
8 | public class MopEventStream implements EventChannel.StreamHandler {
9 | EventChannel.EventSink mEventSlink;
10 |
11 | @Override
12 | public void onListen(Object o, EventChannel.EventSink eventSink) {
13 | mEventSlink = eventSink;
14 | }
15 |
16 | @Override
17 | public void onCancel(Object o) {
18 | mEventSlink = null;
19 | }
20 |
21 | public void send(String channel, String event, Object body) {
22 | if (mEventSlink != null) {
23 | Map map = new HashMap<>();
24 | map.put("channel", channel);
25 | map.put("event", event);
26 | map.put("body", body);
27 | mEventSlink.success(map);
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/android/src/main/java/com/finogeeks/mop/MopPlugin.java:
--------------------------------------------------------------------------------
1 | package com.finogeeks.mop;
2 |
3 | import android.app.Activity;
4 | import android.content.Intent;
5 | import android.util.Log;
6 | import androidx.lifecycle.Lifecycle;
7 |
8 | import com.finogeeks.mop.interfaces.Event;
9 | import com.finogeeks.mop.interfaces.FlutterInterface;
10 | import com.finogeeks.mop.interfaces.ICallback;
11 | import com.finogeeks.mop.service.MopPluginService;
12 |
13 | import java.util.HashMap;
14 | import java.util.Map;
15 |
16 | import io.flutter.embedding.engine.plugins.FlutterPlugin;
17 | import io.flutter.embedding.engine.plugins.activity.ActivityAware;
18 | import io.flutter.embedding.engine.plugins.activity.ActivityPluginBinding;
19 | import io.flutter.embedding.engine.plugins.lifecycle.FlutterLifecycleAdapter;
20 | import io.flutter.plugin.common.EventChannel;
21 | import io.flutter.plugin.common.MethodCall;
22 | import io.flutter.plugin.common.MethodChannel;
23 | import io.flutter.plugin.common.MethodChannel.MethodCallHandler;
24 | import io.flutter.plugin.common.MethodChannel.Result;
25 | import io.flutter.plugin.common.PluginRegistry;
26 | import io.flutter.plugin.common.PluginRegistry.Registrar;
27 |
28 | /**
29 | * MopPlugin
30 | */
31 | public class MopPlugin implements FlutterPlugin, MethodCallHandler, ActivityAware {
32 | private static final String LOG_TAG = MopPlugin.class.getSimpleName();
33 |
34 | private static final String CHANNEL = "mop";
35 | private static final String EVENT_CHANNEL = "plugins.mop.finogeeks.com/mop_event";
36 |
37 | private final FlutterInterface flutterInterface = new FlutterInterface();
38 | private final MopPluginDelegate delegate = new MopPluginDelegate();
39 | private final MopEventStream mopEventStream = new MopEventStream();
40 |
41 | // These are null when not using v2 embedding.
42 | private FlutterPluginBinding flutterPluginBinding;
43 | private MethodChannel channel;
44 | private EventChannel eventChannel;
45 | private Lifecycle lifecycle;
46 |
47 | /**
48 | * Plugin registration.
49 | */
50 | @SuppressWarnings("deprecation")
51 | public static void registerWith(Registrar registrar) {
52 | MethodChannel channel = new MethodChannel(registrar.messenger(), CHANNEL);
53 | MopPluginDelegate delegate = new MopPluginDelegate();
54 | final MopPlugin plugin = new MopPlugin();
55 | channel.setMethodCallHandler(plugin);
56 | registrar.addActivityResultListener(delegate);
57 |
58 | EventChannel eventChannel = new EventChannel(registrar.messenger(), EVENT_CHANNEL);
59 | final MopEventStream mopEventStream = new MopEventStream();
60 | eventChannel.setStreamHandler(mopEventStream);
61 | MopPluginService.getInstance().initialize(registrar.activity(), mopEventStream, channel);
62 | }
63 |
64 | @Override
65 | public void onMethodCall(MethodCall call, final Result result) {
66 | ICallback callback = new ICallback