Skip to content

Commit f259b6e

Browse files
Update Gradle plugin and wrapper
- Gradle wrapper 4.10.2 - Android Gradle plugin 3.2.1
1 parent 56bd605 commit f259b6e

9 files changed

+154
-155
lines changed

app/build.gradle

+2-4
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ apply plugin: 'com.android.application'
2121

2222
android {
2323
compileSdkVersion 28
24-
buildToolsVersion '28.0.3'
2524
defaultConfig {
2625
applicationId "com.sample"
2726
minSdkVersion 15
@@ -43,14 +42,13 @@ android {
4342
}
4443

4544
dependencies {
46-
implementation fileTree(dir: 'libs', include: ['*.jar'])
4745
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
4846
exclude group: 'com.android.support', module: 'support-annotations'
4947
})
5048
implementation 'com.android.support:appcompat-v7:28.0.0'
5149
testImplementation 'junit:junit:4.12'
5250
implementation 'net.zetetic:android-database-sqlcipher:3.5.7@aar'
53-
implementation "android.arch.persistence.room:runtime:1.1.1"
54-
annotationProcessor "android.arch.persistence.room:compiler:1.1.1"
51+
implementation 'android.arch.persistence.room:runtime:1.1.1'
52+
annotationProcessor 'android.arch.persistence.room:compiler:1.1.1'
5553
debugImplementation project(':debug-db')
5654
}

app/proguard-rules.pro

+10-6
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
11
# Add project specific ProGuard rules here.
2-
# By default, the flags in this file are appended to flags specified
3-
# in /Users/amitshekhar/Library/Android/sdk/tools/proguard/proguard-android.txt
4-
# You can edit the include path and order by changing the proguardFiles
5-
# directive in build.gradle.
2+
# You can control the set of applied configuration files using the
3+
# proguardFiles setting in build.gradle.
64
#
75
# For more details, see
86
# http://developer.android.com/guide/developing/tools/proguard.html
97

10-
# Add any project specific keep options here:
11-
128
# If your project uses WebView with JS, uncomment the following
139
# and specify the fully qualified class name to the JavaScript interface
1410
# class:
1511
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
1612
# public *;
1713
#}
14+
15+
# Uncomment this to preserve the line number information for
16+
# debugging stack traces.
17+
#-keepattributes SourceFile,LineNumberTable
18+
19+
# If you keep the line number information, uncomment this to
20+
# hide the original source file name.
21+
#-renamesourcefileattribute SourceFile

build.gradle

+2-7
Original file line numberDiff line numberDiff line change
@@ -17,27 +17,22 @@
1717
*
1818
*/
1919

20-
// Top-level build file where you can add configuration options common to all sub-projects/modules.
21-
2220
buildscript {
2321
repositories {
24-
jcenter()
2522
google()
23+
jcenter()
2624
}
2725
dependencies {
2826
classpath 'com.android.tools.build:gradle:3.2.1'
2927
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.4'
3028
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1'
31-
32-
// NOTE: Do not place your application dependencies here; they belong
33-
// in the individual module build.gradle files
3429
}
3530
}
3631

3732
allprojects {
3833
repositories {
39-
jcenter()
4034
google()
35+
jcenter()
4136
}
4237
}
4338

debug-db/build.gradle

+2-8
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,14 @@ apply plugin: 'com.android.library'
2121

2222
android {
2323
compileSdkVersion 28
24-
buildToolsVersion '28.0.3'
25-
2624
defaultConfig {
2725
minSdkVersion 14
2826
targetSdkVersion 28
2927
versionCode 1
3028
versionName "1.0"
31-
3229
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
33-
3430
resValue("string", "PORT_NUMBER", "8080")
3531
}
36-
3732
buildTypes {
3833
release {
3934
minifyEnabled false
@@ -43,15 +38,14 @@ android {
4338
}
4439

4540
dependencies {
46-
implementation fileTree(dir: 'libs', include: ['*.jar'])
4741
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
4842
exclude group: 'com.android.support', module: 'support-annotations'
4943
})
5044
testImplementation 'junit:junit:4.12'
5145
implementation 'com.google.code.gson:gson:2.8.5'
5246
implementation 'net.zetetic:android-database-sqlcipher:3.5.7@aar'
53-
implementation "android.arch.persistence.room:runtime:1.1.1"
47+
implementation 'android.arch.persistence.room:runtime:1.1.1'
5448
implementation 'com.android.support:appcompat-v7:28.0.0'
5549
}
5650

57-
//apply from: 'debug-db-upload.gradle'
51+
//apply from: 'debug-db-upload.gradle'

debug-db/proguard-rules.pro

+11-8
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,27 @@
11
# Add project specific ProGuard rules here.
2-
# By default, the flags in this file are appended to flags specified
3-
# in /Users/amitshekhar/Library/Android/sdk/tools/proguard/proguard-android.txt
4-
# You can edit the include path and order by changing the proguardFiles
5-
# directive in build.gradle.
2+
# You can control the set of applied configuration files using the
3+
# proguardFiles setting in build.gradle.
64
#
75
# For more details, see
86
# http://developer.android.com/guide/developing/tools/proguard.html
97

10-
# Add any project specific keep options here:
11-
128
# If your project uses WebView with JS, uncomment the following
139
# and specify the fully qualified class name to the JavaScript interface
1410
# class:
1511
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
1612
# public *;
1713
#}
1814

19-
-keepparameternames
15+
# Uncomment this to preserve the line number information for
16+
# debugging stack traces.
17+
-keepattributes SourceFile,LineNumberTable
18+
19+
# If you keep the line number information, uncomment this to
20+
# hide the original source file name.
2021
-renamesourcefileattribute SourceFile
21-
-keepattributes Exceptions,InnerClasses,Signature,Deprecated,SourceFile,LineNumberTable,EnclosingMethod
22+
23+
-keepparameternames
24+
-keepattributes Exceptions,InnerClasses,Signature,Deprecated,EnclosingMethod
2225

2326
# Preserve all annotations.
2427

gradle/wrapper/gradle-wrapper.jar

2.48 KB
Binary file not shown.
+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
#Fri Jan 18 16:59:40 IST 2019
21
distributionBase=GRADLE_USER_HOME
32
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip

gradlew

+42-30
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,43 @@
1-
#!/usr/bin/env bash
1+
#!/usr/bin/env sh
22

33
##############################################################################
44
##
55
## Gradle start up script for UN*X
66
##
77
##############################################################################
88

9-
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10-
DEFAULT_JVM_OPTS=""
9+
# Attempt to set APP_HOME
10+
# Resolve links: $0 may be a link
11+
PRG="$0"
12+
# Need this for relative symlinks.
13+
while [ -h "$PRG" ] ; do
14+
ls=`ls -ld "$PRG"`
15+
link=`expr "$ls" : '.*-> \(.*\)$'`
16+
if expr "$link" : '/.*' > /dev/null; then
17+
PRG="$link"
18+
else
19+
PRG=`dirname "$PRG"`"/$link"
20+
fi
21+
done
22+
SAVED="`pwd`"
23+
cd "`dirname \"$PRG\"`/" >/dev/null
24+
APP_HOME="`pwd -P`"
25+
cd "$SAVED" >/dev/null
1126

1227
APP_NAME="Gradle"
1328
APP_BASE_NAME=`basename "$0"`
1429

30+
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
31+
DEFAULT_JVM_OPTS=""
32+
1533
# Use the maximum available, or set MAX_FD != -1 to use that value.
1634
MAX_FD="maximum"
1735

18-
warn ( ) {
36+
warn () {
1937
echo "$*"
2038
}
2139

22-
die ( ) {
40+
die () {
2341
echo
2442
echo "$*"
2543
echo
@@ -30,6 +48,7 @@ die ( ) {
3048
cygwin=false
3149
msys=false
3250
darwin=false
51+
nonstop=false
3352
case "`uname`" in
3453
CYGWIN* )
3554
cygwin=true
@@ -40,26 +59,11 @@ case "`uname`" in
4059
MINGW* )
4160
msys=true
4261
;;
62+
NONSTOP* )
63+
nonstop=true
64+
;;
4365
esac
4466

45-
# Attempt to set APP_HOME
46-
# Resolve links: $0 may be a link
47-
PRG="$0"
48-
# Need this for relative symlinks.
49-
while [ -h "$PRG" ] ; do
50-
ls=`ls -ld "$PRG"`
51-
link=`expr "$ls" : '.*-> \(.*\)$'`
52-
if expr "$link" : '/.*' > /dev/null; then
53-
PRG="$link"
54-
else
55-
PRG=`dirname "$PRG"`"/$link"
56-
fi
57-
done
58-
SAVED="`pwd`"
59-
cd "`dirname \"$PRG\"`/" >/dev/null
60-
APP_HOME="`pwd -P`"
61-
cd "$SAVED" >/dev/null
62-
6367
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
6468

6569
# Determine the Java command to use to start the JVM.
@@ -85,7 +89,7 @@ location of your Java installation."
8589
fi
8690

8791
# Increase the maximum file descriptors if we can.
88-
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
92+
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
8993
MAX_FD_LIMIT=`ulimit -H -n`
9094
if [ $? -eq 0 ] ; then
9195
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
@@ -150,11 +154,19 @@ if $cygwin ; then
150154
esac
151155
fi
152156

153-
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
154-
function splitJvmOpts() {
155-
JVM_OPTS=("$@")
157+
# Escape application args
158+
save () {
159+
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
160+
echo " "
156161
}
157-
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
158-
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
162+
APP_ARGS=$(save "$@")
163+
164+
# Collect all arguments for the java command, following the shell quoting and substitution rules
165+
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
166+
167+
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
168+
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
169+
cd "$(dirname "$0")"
170+
fi
159171

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

0 commit comments

Comments
 (0)