Skip to content
Permalink
Browse files

release 0.0.1

  • Loading branch information...
shikk committed Apr 19, 2019
0 parents commit 42c8e4d9e7701365560af1cd5dd50c24b196cf60
Showing with 3,932 additions and 0 deletions.
  1. +9 −0 .gitignore
  2. +3 −0 CHANGELOG.md
  3. +21 −0 LICENSE
  4. +50 −0 README.md
  5. +8 −0 android/.gitignore
  6. +44 −0 android/build.gradle
  7. +1 −0 android/gradle.properties
  8. BIN android/gradle/wrapper/gradle-wrapper.jar
  9. +6 −0 android/gradle/wrapper/gradle-wrapper.properties
  10. +160 −0 android/gradlew
  11. +90 −0 android/gradlew.bat
  12. BIN android/libs/flutter.jar
  13. +1 −0 android/settings.gradle
  14. +3 −0 android/src/main/AndroidManifest.xml
  15. +302 −0 android/src/main/java/com/jiguang/jverify/JverifyPlugin.java
  16. +193 −0 documents/APIs.md
  17. +70 −0 example/.gitignore
  18. +16 −0 example/README.md
  19. +73 −0 example/android/app/build.gradle
  20. +7 −0 example/android/app/src/debug/AndroidManifest.xml
  21. +33 −0 example/android/app/src/main/AndroidManifest.xml
  22. +13 −0 example/android/app/src/main/java/com/jiguang/jverify_example/MainActivity.java
  23. BIN example/android/app/src/main/res/drawable-xhdpi/logo.png
  24. +12 −0 example/android/app/src/main/res/drawable/launch_background.xml
  25. BIN example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
  26. BIN example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
  27. BIN example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
  28. BIN example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
  29. BIN example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
  30. +8 −0 example/android/app/src/main/res/values/styles.xml
  31. +7 −0 example/android/app/src/profile/AndroidManifest.xml
  32. +29 −0 example/android/build.gradle
  33. +1 −0 example/android/gradle.properties
  34. +6 −0 example/android/gradle/wrapper/gradle-wrapper.properties
  35. +15 −0 example/android/settings.gradle
  36. +26 −0 example/ios/Flutter/AppFrameworkInfo.plist
  37. +2 −0 example/ios/Flutter/Debug.xcconfig
  38. +2 −0 example/ios/Flutter/Release.xcconfig
  39. +69 −0 example/ios/Podfile
  40. +33 −0 example/ios/Podfile.lock
  41. +610 −0 example/ios/Runner.xcodeproj/project.pbxproj
  42. +7 −0 example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
  43. +97 −0 example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
  44. +10 −0 example/ios/Runner.xcworkspace/contents.xcworkspacedata
  45. +8 −0 example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
  46. +8 −0 example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
  47. +6 −0 example/ios/Runner/AppDelegate.h
  48. +13 −0 example/ios/Runner/AppDelegate.m
  49. +122 −0 example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
  50. BIN example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
  51. BIN example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
  52. BIN example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
  53. BIN example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
  54. BIN example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
  55. BIN example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
  56. BIN example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
  57. BIN example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
  58. BIN example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
  59. BIN example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
  60. BIN example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
  61. BIN example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
  62. BIN example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
  63. BIN example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
  64. BIN example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
  65. +6 −0 example/ios/Runner/Assets.xcassets/Contents.json
  66. +23 −0 example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
  67. BIN example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
  68. BIN example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
  69. BIN example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
  70. +5 −0 example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
  71. +21 −0 example/ios/Runner/Assets.xcassets/check_image.imageset/Contents.json
  72. BIN example/ios/Runner/Assets.xcassets/check_image.imageset/umcsdk_check_image.png
  73. +21 −0 example/ios/Runner/Assets.xcassets/load_complete_w.imageset/Contents.json
  74. BIN example/ios/Runner/Assets.xcassets/load_complete_w.imageset/umcsdk_load_complete_w.png
  75. +21 −0 example/ios/Runner/Assets.xcassets/load_dot_white.imageset/Contents.json
  76. BIN example/ios/Runner/Assets.xcassets/load_dot_white.imageset/umcsdk_load_dot_white.png
  77. +21 −0 example/ios/Runner/Assets.xcassets/login_btn_normal.imageset/Contents.json
  78. BIN example/ios/Runner/Assets.xcassets/login_btn_normal.imageset/umcsdk_login_btn_normal.png
  79. +21 −0 example/ios/Runner/Assets.xcassets/login_btn_press.imageset/Contents.json
  80. BIN example/ios/Runner/Assets.xcassets/login_btn_press.imageset/umcsdk_login_btn_press.png
  81. +21 −0 example/ios/Runner/Assets.xcassets/login_btn_unable.imageset/Contents.json
  82. BIN example/ios/Runner/Assets.xcassets/login_btn_unable.imageset/umcsdk_login_btn_unable.png
  83. +21 −0 example/ios/Runner/Assets.xcassets/logo.imageset/Contents.json
  84. BIN example/ios/Runner/Assets.xcassets/logo.imageset/logo_cm.png
  85. +21 −0 example/ios/Runner/Assets.xcassets/mobile_logo.imageset/Contents.json
  86. BIN example/ios/Runner/Assets.xcassets/mobile_logo.imageset/umcsdk_mobile_logo.png
  87. +21 −0 example/ios/Runner/Assets.xcassets/return_bg.imageset/Contents.json
  88. BIN example/ios/Runner/Assets.xcassets/return_bg.imageset/umcsdk_return_bg.png
  89. +21 −0 example/ios/Runner/Assets.xcassets/shape_input.imageset/Contents.json
  90. BIN example/ios/Runner/Assets.xcassets/shape_input.imageset/umcsdk_shape_input.png
  91. +21 −0 example/ios/Runner/Assets.xcassets/toast_bg.imageset/Contents.json
  92. BIN example/ios/Runner/Assets.xcassets/toast_bg.imageset/umcsdk_toast_bg.png
  93. +21 −0 example/ios/Runner/Assets.xcassets/uncheck_image.imageset/Contents.json
  94. BIN example/ios/Runner/Assets.xcassets/uncheck_image.imageset/umcsdk_uncheck_image.png
  95. +37 −0 example/ios/Runner/Base.lproj/LaunchScreen.storyboard
  96. +26 −0 example/ios/Runner/Base.lproj/Main.storyboard
  97. +50 −0 example/ios/Runner/Info.plist
  98. +9 −0 example/ios/Runner/main.m
  99. +225 −0 example/lib/main.dart
  100. +167 −0 example/pubspec.lock
  101. +64 −0 example/pubspec.yaml
  102. +27 −0 example/test/widget_test.dart
  103. +36 −0 ios/.gitignore
  104. 0 ios/Assets/.gitkeep
  105. +4 −0 ios/Classes/JverifyPlugin.h
  106. +285 −0 ios/Classes/JverifyPlugin.m
  107. +23 −0 ios/jverify.podspec
  108. +153 −0 jverify.iml
  109. +117 −0 lib/jverify.dart
  110. +146 −0 pubspec.lock
  111. +63 −0 pubspec.yaml
  112. +20 −0 test/jverify_test.dart
@@ -0,0 +1,9 @@
.DS_Store
.dart_tool/

.packages
.pub/

build/
.idea
.metadata
@@ -0,0 +1,3 @@
## 0.0.1

official release.
21 LICENSE
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2019 极光开发者

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
@@ -0,0 +1,50 @@
[![QQ Group](https://img.shields.io/badge/QQ%20Group-862401307-red.svg)]()
# JVerify Flutter Plugin

### 安装

在工程 pubspec.yaml 中加入 dependencies

```yaml
dependencies:
jverify: 0.0.1
```

### 配置

##### Android:

`/android/app/build.gradle` 中添加下列代码:

```groovy
android: {
....
defaultConfig {
applicationId "替换成自己应用 ID"
...
ndk {
//选择要添加的对应 cpu 类型的 .so 库。
abiFilters 'armeabi', 'armeabi-v7a', 'x86', 'x86_64', 'mips', 'mips64', 'arm64-v8a',
}
manifestPlaceholders = [
JPUSH_PKGNAME : applicationId,
JPUSH_APPKEY : "appkey", // NOTE: JPush 上注册的包名对应的 Appkey.
JPUSH_CHANNEL : "developer-default", //暂时填写默认值即可.
]
}
}
```

### 使用

```dart
import 'package:jverify/jverify.dart';
```

### APIs

**注意** : 需要先调用 Jverify.setup 来初始化插件,才能保证其他功能正常工作。

[参考](./documents/APIs.md)

@@ -0,0 +1,8 @@
*.iml
.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
/build
/captures
@@ -0,0 +1,44 @@
group 'com.jiguang.jverify'
version '1.0-SNAPSHOT'

buildscript {
repositories {
google()
jcenter()
}

dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
}
}

rootProject.allprojects {
repositories {
google()
jcenter()
}
}

apply plugin: 'com.android.library'

android {
compileSdkVersion 28

defaultConfig {
minSdkVersion 16
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"


}
lintOptions {
disable 'InvalidPackage'
}


}

dependencies {
compileOnly files('libs/flutter.jar')
implementation 'cn.jiguang.sdk:jverification:2.1.0' // 此处以JPush 3.1.6 版本为例。
implementation 'cn.jiguang.sdk:jcore:1.2.6' // 此处以JCore 1.2.5 版本为例。
}
@@ -0,0 +1 @@
org.gradle.jvmargs=-Xmx1536M
Binary file not shown.
@@ -0,0 +1,6 @@
#Wed Apr 10 16:20:01 CST 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip
@@ -0,0 +1,160 @@
#!/usr/bin/env bash

##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""

APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"

warn ( ) {
echo "$*"
}

die ( ) {
echo
echo "$*"
echo
exit 1
}

# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
esac

# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null

CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar

# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi

# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi

# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi

# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`

# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option

if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi

# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
function splitJvmOpts() {
JVM_OPTS=("$@")
}
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"

exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"

0 comments on commit 42c8e4d

Please sign in to comment.
You can’t perform that action at this time.