Skip to content

Commit

Permalink
Merge pull request #134 from idyatlov/master
Browse files Browse the repository at this point in the history
Migrated project to AndroidX
  • Loading branch information
idyatlov authored Oct 15, 2020
2 parents a2d9bf6 + cf3abcd commit 2a78303
Show file tree
Hide file tree
Showing 36 changed files with 233 additions and 225 deletions.
10 changes: 4 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@ android:
components:
- platform-tools
- tools
- build-tools-27.0.2
- android-27
- sys-img-armeabi-v7a-android-27
- extra-android-support
- build-tools-30.0.2
- android-30
- sys-img-armeabi-v7a-android-30
- extra-android-m2repository
licenses:
- 'android-sdk-preview-license-.+'
Expand All @@ -21,5 +20,4 @@ android:

before_install:
- chmod +x gradlew
- yes | sdkmanager "platforms;android-26"
- yes | sdkmanager "platforms;android-27"
- yes | sdkmanager "platforms;android-30"
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ abstract class Middleware<Out, In>(
wrapped.applyIfMiddleware { onBind(connection) }
}

override fun accept(element: In) {
wrapped.accept(element)
override fun accept(t: In) {
wrapped.accept(t)
}

open fun onElement(connection: Connection<Out, In>, element: In) {
Expand Down
57 changes: 29 additions & 28 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,34 +8,34 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.2'
classpath 'com.android.tools.build:gradle:4.1.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
classpath "org.jetbrains.dokka:dokka-gradle-plugin:0.9.17"
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
classpath "org.jetbrains.dokka:dokka-gradle-plugin:1.4.0"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

ext {
// Android
androidArchLifecycleVersion = '1.1.1'
androidSupportLibVersion = '28.0.0'
constraintLayoutVersion = '1.1.2'
androidLifecycleVersion = '2.2.0'
androidAppCompatVersion = '1.2.0'
androidMaterialVersion = '1.2.1'
constraintLayoutVersion = '2.0.2'

// Rx
rxJavaVersion = '2.2.10'
rxKotlinVersion = '2.2.0'
rxAndroidVersion = '2.1.1'

// DI
daggerVersion = '2.14.1'
daggerVersion = '2.29.1'

// Utils
debugDrawerVersion = '0.8.0'
timberVersion = '4.7.0'
debugDrawerVersion = '0.9.0'
timberVersion = '4.7.1'
scalpelVersion = '1.1.2'
glideVersion = '4.7.1'
glideVersion = '4.11.0'

// Network
okhttpVersion = '3.10.0'
Expand All @@ -45,18 +45,18 @@ ext {
// Testing
junitVersion = '4.12'
kluentVersion = '1.23'
supportTestVersion = '1.0.2'
supportTestVersion = '1.3.0'
mockitoKotlinVersion = '1.3.0'

depsWithVersion = [
// Kotlin
"org.jetbrains.kotlin:kotlin-stdlib-jdk7" : kotlinVersion,

// Android
"android.arch.lifecycle:common-java8" : androidArchLifecycleVersion,
"com.android.support:appcompat-v7" : androidSupportLibVersion,
"com.android.support.constraint:constraint-layout" : constraintLayoutVersion,
"com.android.support:design" : androidSupportLibVersion,
"androidx.lifecycle:lifecycle-common-java8" : androidLifecycleVersion,
"androidx.appcompat:appcompat" : androidAppCompatVersion,
"androidx.constraintlayout:constraintlayout" : constraintLayoutVersion,
"com.google.android.material:material" : androidMaterialVersion,

// Rx
"io.reactivex.rxjava2:rxjava" : rxJavaVersion,
Expand All @@ -71,16 +71,16 @@ ext {
"com.google.dagger:dagger-android-processor" : daggerVersion,

// DebugDrawer
"io.palaima.debugdrawer:debugdrawer" : debugDrawerVersion,
"io.palaima.debugdrawer:debugdrawer-base" : debugDrawerVersion,
"io.palaima.debugdrawer:debugdrawer-view" : debugDrawerVersion,
"io.palaima.debugdrawer:debugdrawer-no-op" : debugDrawerVersion,
"io.palaima.debugdrawer:debugdrawer-view-no-op" : debugDrawerVersion,
"io.palaima.debugdrawer:debugdrawer-commons" : debugDrawerVersion,
"io.palaima.debugdrawer:debugdrawer-actions" : debugDrawerVersion,
"io.palaima.debugdrawer:debugdrawer-scalpel" : debugDrawerVersion,
"io.palaima.debugdrawer:debugdrawer-timber" : debugDrawerVersion,
"io.palaima.debugdrawer:debugdrawer-network-quality": debugDrawerVersion,
"com.github.lenguyenthanh.debugdrawer:debugdrawer" : debugDrawerVersion,
"com.github.lenguyenthanh.debugdrawer:debugdrawer-base" : debugDrawerVersion,
"com.github.lenguyenthanh.debugdrawer:debugdrawer-view" : debugDrawerVersion,
"com.github.lenguyenthanh.debugdrawer:debugdrawer-no-op" : debugDrawerVersion,
"com.github.lenguyenthanh.debugdrawer:debugdrawer-view-no-op" : debugDrawerVersion,
"com.github.lenguyenthanh.debugdrawer:debugdrawer-commons" : debugDrawerVersion,
"com.github.lenguyenthanh.debugdrawer:debugdrawer-actions" : debugDrawerVersion,
"com.github.lenguyenthanh.debugdrawer:debugdrawer-scalpel" : debugDrawerVersion,
"com.github.lenguyenthanh.debugdrawer:debugdrawer-timber" : debugDrawerVersion,
"com.github.lenguyenthanh.debugdrawer:debugdrawer-network-quality": debugDrawerVersion,

// Utils
"com.jakewharton.timber:timber" : timberVersion,
Expand All @@ -100,9 +100,9 @@ ext {
"org.jetbrains.kotlin:kotlin-test-junit" : kotlinVersion,
"org.amshove.kluent:kluent" : kluentVersion,
"com.nhaarman:mockito-kotlin" : mockitoKotlinVersion,
"com.android.support.test:runner" : supportTestVersion,
"com.android.support.test:orchestrator" : supportTestVersion,
"com.android.support.test:rules" : supportTestVersion,
"androidx.test:runner" : supportTestVersion,
"androidx.test:orchestrator" : supportTestVersion,
"androidx.test:rules" : supportTestVersion,
]

deps = { String key ->
Expand All @@ -116,6 +116,7 @@ allprojects {
repositories {
google()
jcenter()
maven { url 'https://jitpack.io' }
}
}

Expand Down
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx1536m
android.useAndroidX=true

# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
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-5.4.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.6.1-all.zip
111 changes: 68 additions & 43 deletions gradlew
Original file line number Diff line number Diff line change
@@ -1,25 +1,59 @@
#!/usr/bin/env bash
#!/usr/bin/env sh

#
# Copyright 2015 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

##############################################################################
##
## 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='"-Xmx64m" "-Xms64m"'

# 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 +64,7 @@ die ( ) {
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
Expand All @@ -40,28 +75,14 @@ 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.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
Expand All @@ -85,7 +106,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 All @@ -105,10 +126,11 @@ 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
# For Cygwin or MSYS, switch paths to Windows format before running java
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; 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
Expand All @@ -134,27 +156,30 @@ if $cygwin ; then
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
i=`expr $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" ;;
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=("$@")
# 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"

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

0 comments on commit 2a78303

Please sign in to comment.