Skip to content
This repository has been archived by the owner on Sep 11, 2020. It is now read-only.

Commit

Permalink
Better gradle file
Browse files Browse the repository at this point in the history
  • Loading branch information
rememberYou committed Jan 11, 2018
1 parent 9571a0f commit 9d85983
Show file tree
Hide file tree
Showing 28 changed files with 74 additions and 54 deletions.
2 changes: 1 addition & 1 deletion PLCMonitor.iml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7" inherit-compiler-output="true">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.gradle" />
Expand Down
12 changes: 9 additions & 3 deletions app/app.iml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
<output url="file://$MODULE_DIR$/build/intermediates/classes/debug" />
<output-test url="file://$MODULE_DIR$/build/intermediates/classes/test/debug" />
<exclude-output />
Expand Down Expand Up @@ -105,14 +105,12 @@
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/split-apk" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/splits-support" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/tmp" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/transforms" />
<excludeFolder url="file://$MODULE_DIR$/build/outputs" />
<excludeFolder url="file://$MODULE_DIR$/build/tmp" />
</content>
<orderEntry type="jdk" jdkName="Android API 26 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="javax.annotation:javax.annotation-api:1.3.1@jar" level="project" />
<orderEntry type="library" name="com.android.support:animated-vector-drawable-27.0.1" level="project" />
<orderEntry type="library" name="com.android.support:preference-v7-26.1.0" level="project" />
<orderEntry type="library" name="com.android.support:appcompat-v7-27.0.1" level="project" />
Expand All @@ -127,21 +125,28 @@
<orderEntry type="library" scope="TEST" name="com.squareup:javawriter:2.1.1@jar" level="project" />
<orderEntry type="library" name="android.arch.lifecycle:runtime-1.0.0" level="project" />
<orderEntry type="library" name="com.android.support:recyclerview-v7-27.0.1" level="project" />
<orderEntry type="library" name="net.zetetic:android-database-sqlcipher-3.5.9" level="project" />
<orderEntry type="library" name="com.github.stephanenicolas.ormgap:ormgap-ormlite-extension:1.0.13@jar" level="project" />
<orderEntry type="library" name="com.android.support:support-annotations:27.0.1@jar" level="project" />
<orderEntry type="library" name="org.reactivestreams:reactive-streams:1.0.1@jar" level="project" />
<orderEntry type="library" name="com.afollestad.material-dialogs:core-0.9.6.0" level="project" />
<orderEntry type="library" name="me.zhanghai.android.materialprogressbar:library-1.4.2" level="project" />
<orderEntry type="library" scope="TEST" name="com.android.support.test:runner-1.0.1" level="project" />
<orderEntry type="library" scope="TEST" name="com.android.support.test:rules-1.0.1" level="project" />
<orderEntry type="library" name="com.j256.ormlite.cipher:ormlite-sqlcipher-1.1" level="project" />
<orderEntry type="library" scope="TEST" name="com.google.code.findbugs:jsr305:2.0.1@jar" level="project" />
<orderEntry type="library" name="com.android.support:support-vector-drawable-27.0.1" level="project" />
<orderEntry type="library" name="io.reactivex.rxjava2:rxjava:2.1.7@jar" level="project" />
<orderEntry type="library" name="org.apache.commons:commons-text:1.2@jar" level="project" />
<orderEntry type="library" scope="TEST" name="com.android.support.test.espresso:espresso-idling-resource-3.0.1" level="project" />
<orderEntry type="library" scope="TEST" name="org.hamcrest:hamcrest-core:1.3@jar" level="project" />
<orderEntry type="library" name="io.reactivex.rxjava2:rxandroid-2.0.1" level="project" />
<orderEntry type="library" name="android.arch.core:common:1.0.0@jar" level="project" />
<orderEntry type="library" name="com.android.support:support-compat-27.0.1" level="project" />
<orderEntry type="library" scope="TEST" name="org.hamcrest:hamcrest-library:1.3@jar" level="project" />
<orderEntry type="library" name="com.android.support:support-core-ui-27.0.1" level="project" />
<orderEntry type="library" scope="TEST" name="org.hamcrest:hamcrest-integration:1.3@jar" level="project" />
<orderEntry type="library" name="org.apache.commons:commons-lang3:3.7@jar" level="project" />
<orderEntry type="library" name="com.takisoft.fix:preference-v7-25.3.0.0" level="project" />
<orderEntry type="library" name="com.android.support:support-v4-26.1.0" level="project" />
<orderEntry type="library" name="com.j256.ormlite:ormlite-android:5.0@jar" level="project" />
Expand All @@ -150,5 +155,6 @@
<orderEntry type="library" name="com.android.support:support-fragment-27.0.1" level="project" />
<orderEntry type="library" name="com.android.support:design-26.1.0" level="project" />
<orderEntry type="library" name="com.android.support:transition-26.1.0" level="project" />
<orderEntry type="library" name="com.android.support:cardview-v7-26.1.0" level="project" />
</component>
</module>
13 changes: 11 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
targetCompatibility 1.8
sourceCompatibility 1.8
}
}

dependencies {
Expand All @@ -28,14 +32,19 @@ dependencies {
compile group: 'com.android.support', name: 'recyclerview-v7', version: '26.1.0'
compile group: 'com.j256.ormlite', name: 'ormlite-android', version: '5.0'
compile group: 'com.j256.ormlite', name: 'ormlite-core', version: '5.0'
compile group: 'com.j256.ormlite.cipher', name: 'ormlite-sqlcipher', version: '1.1', ext: 'aar'
compile group: 'com.google.dagger', name: 'dagger', version: '2.13'
compile group: 'com.takisoft.fix', name: 'preference-v7', version: '25.3.0.0'
compile group: 'io.reactivex.rxjava2', name: 'rxandroid', version: '2.0.1'
compile group: 'io.reactivex.rxjava2', name: 'rxjava', version: '2.1.7'
compile group: 'net.zetetic', name: 'android-database-sqlcipher', version: '3.5.9', ext: 'aar'
compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.6'
compile group: 'org.apache.commons', name: 'commons-text', version: '1.2'
compile 'com.android.support:preference-v7:26.1.0'
compile 'com.android.support:preference-v14:26.1.0'
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support:design:26.1.0'
compile 'com.android.support:preference-v7:26.1.0'
compile 'com.android.support:preference-v14:26.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
Expand Down
2 changes: 1 addition & 1 deletion app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
#-renamesourcefileattribute SourceFile
1 change: 1 addition & 0 deletions build/android-profile/profile-2018-01-11-05-59-12-046.json

Large diffs are not rendered by default.

Binary file not shown.
1 change: 1 addition & 0 deletions build/android-profile/profile-2018-01-11-05-59-41-845.json

Large diffs are not rendered by default.

Binary file not shown.
1 change: 1 addition & 0 deletions build/android-profile/profile-2018-01-11-06-05-32-604.json

Large diffs are not rendered by default.

Binary file not shown.
1 change: 1 addition & 0 deletions build/android-profile/profile-2018-01-11-07-21-16-553.json

Large diffs are not rendered by default.

Binary file not shown.
1 change: 1 addition & 0 deletions build/android-profile/profile-2018-01-11-07-25-13-581.json

Large diffs are not rendered by default.

Binary file not shown.
1 change: 1 addition & 0 deletions build/android-profile/profile-2018-01-11-07-26-01-590.json

Large diffs are not rendered by default.

Binary file not shown.
1 change: 1 addition & 0 deletions build/android-profile/profile-2018-01-11-07-28-14-102.json

Large diffs are not rendered by default.

Binary file not shown.
1 change: 1 addition & 0 deletions build/android-profile/profile-2018-01-11-07-31-45-753.json

Large diffs are not rendered by default.

Binary file not shown.
1 change: 1 addition & 0 deletions build/android-profile/profile-2018-01-11-07-33-26-666.json

Large diffs are not rendered by default.

Binary file not shown.
1 change: 1 addition & 0 deletions build/android-profile/profile-2018-01-11-07-35-53-528.json

Large diffs are not rendered by default.

Binary file not shown.
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#Mon Nov 20 08:27:06 CET 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.3.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
72 changes: 30 additions & 42 deletions gradlew
Original file line number Diff line number Diff line change
@@ -1,43 +1,25 @@
#!/usr/bin/env sh
#!/usr/bin/env bash

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

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

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

# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
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
Expand Down Expand Up @@ -154,19 +150,11 @@ if $cygwin ; then
esac
fi

# Escape application args
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
function splitJvmOpts() {
JVM_OPTS=("$@")
}
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
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"

exec "$JAVACMD" "$@"
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
14 changes: 10 additions & 4 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=

set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=

@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome

Expand Down Expand Up @@ -46,9 +46,10 @@ echo location of your Java installation.
goto fail

:init
@rem Get command-line arguments, handling Windows variants
@rem Get command-line arguments, handling Windowz variants

if not "%OS%" == "Windows_NT" goto win9xME_args
if "%@eval[2+2]" == "4" goto 4NT_args

:win9xME_args
@rem Slurp the command line arguments.
Expand All @@ -59,6 +60,11 @@ set _SKIP=2
if "x%~1" == "x" goto execute

set CMD_LINE_ARGS=%*
goto execute

:4NT_args
@rem Get arguments from the 4NT Shell from JP Software
set CMD_LINE_ARGS=%$

:execute
@rem Setup the command line
Expand Down

0 comments on commit 9d85983

Please sign in to comment.