Skip to content

Commit

Permalink
Update to 1.0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
JantHsueh committed Jun 4, 2020
1 parent 44f2d2d commit 95b1496
Show file tree
Hide file tree
Showing 7 changed files with 59 additions and 43 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,23 +42,23 @@ The first demo shows the basic usage of the library. The second one shows the wa

<img src="/gif/stack.png" width="150px"/> <img src="/gif/log.png" width="300px"/>       <img src="/gif/SwipeBack.png" width="150px"/>

## How do I use Fragmentation?
# How do I use Fragmentation?

## [文档](https://github.com/JantHsueh/Fragmentation/wiki)
## [使用文档](https://github.com/JantHsueh/Fragmentation/wiki)

### Note: This is the use of androidx, if you are using the android.support, [click here `branch:master`](https://github.com/JantHsueh/Fragmentation/blob/master/README.md)
**1、build.gradle**
````gradle
// This is the use of androidx, if you are using the android.support: fragmentationx -> fragmentation
implementation 'me.xuexuan:fragmentationx:1.0.5'
implementation 'me.xuexuan:fragmentationx:1.0.6'
// If you don't want to extends SupportActivity/Fragment and would like to customize your own support, just rely on fragmentation-core
// implementation 'me.xuexuan:fragmentationx-core:1.0.5'
// implementation 'me.xuexuan:fragmentationx-core:1.0.6'
// To get SwipeBack feature, rely on both fragmentation & fragmentation-swipeback
implementation 'me.xuexuan:fragmentationx:1.0.5'
implementation 'me.xuexuan:fragmentationx:1.0.6'
// Swipeback is based on fragmentation. Refer to SwipeBackActivity/Fragment for your Customized SupportActivity/Fragment
implementation 'me.xuexuan:fragmentationx-swipeback:1.0.5'
implementation 'me.xuexuan:fragmentationx-swipeback:1.0.6'
// To simplify the communication between Fragments.
implementation 'me.yokeyword:eventbus-activity-scope:1.1.0'
Expand Down
6 changes: 3 additions & 3 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,15 @@ A powerful library that manage Fragment for Android!

````gradle
// 以下为androidx的使用方式,如果使用的是android.support包,fragmentationx -> fragmentation 即可
implementation 'me.xuexuan:fragmentationx:1.0.5'
implementation 'me.xuexuan:fragmentationx:1.0.6'
// 如果不想继承SupportActivity/Fragment,自己定制Support,可仅依赖:
// implementation 'me.xuexuan:fragmentationx-core:1.0.5'
// implementation 'me.xuexuan:fragmentationx-core:1.0.6'
// 如果想使用SwipeBack 滑动边缘退出Fragment/Activity功能,完整的添加规则如下:
implementation 'me.xuexuan:fragmentationx:1.0.5'
// swipeback基于fragmentation, 如果是自定制SupportActivity/Fragment,则参照SwipeBackActivity/Fragment实现即可
implementation 'me.xuexuan:fragmentationx-swipeback:1.0.5'
implementation 'me.xuexuan:fragmentationx-swipeback:1.0.6'
// Activity作用域的EventBus,通信更安全
implementation 'me.yokeyword:eventbus-activity-scope:1.1.0'
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.0.0'
classpath 'com.android.tools.build:gradle:3.5.2'
// classpath 'com.novoda:bintray-release:0.9.2'
}
}
Expand Down
7 changes: 5 additions & 2 deletions demo/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,11 @@ dependencies {
implementation 'com.google.android.material:material:1.1.0-alpha02'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0-alpha01'
api project(':fragmentation')
api project(':fragmentation_swipeback')
// api project(':fragmentation')
// api project(':fragmentation_swipeback')

api 'me.xuexuan:fragmentationx:1.0.6'
api 'me.xuexuan:fragmentationx-swipeback:1.0.6'
// EventBus
api project(':eventbus_activity_scope')
implementation 'org.greenrobot:eventbus:3.0.0'
Expand Down
1 change: 1 addition & 0 deletions fragmentation/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ android {
dependencies {
compileOnly "androidx.appcompat:appcompat:$rootProject.appCompatVersion"
api project(':fragmentation_core')
// api 'me.xuexuan:fragmentationx-core:1.0.6'
}


Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-bin.zip
72 changes: 42 additions & 30 deletions gradlew
Original file line number Diff line number Diff line change
@@ -1,25 +1,43 @@
#!/usr/bin/env bash
#!/usr/bin/env sh

##############################################################################
##
## 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=""
# 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

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

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

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

warn ( ) {
warn () {
echo "$*"
}

die ( ) {
die () {
echo
echo "$*"
echo
Expand All @@ -30,6 +48,7 @@ die ( ) {
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
Expand All @@ -40,26 +59,11 @@ case "`uname`" in
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=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.
Expand All @@ -85,7 +89,7 @@ location of your Java installation."
fi

# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
Expand Down Expand Up @@ -150,11 +154,19 @@ if $cygwin ; then
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=("$@")
# Escape application args
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
APP_ARGS=$(save "$@")

# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"

# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
cd "$(dirname "$0")"
fi

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

0 comments on commit 95b1496

Please sign in to comment.