Skip to content
This repository was archived by the owner on May 30, 2024. It is now read-only.

Commit 28708d2

Browse files
committed
bumped gradle version, exclude gson from shading
1 parent dc7184a commit 28708d2

File tree

5 files changed

+49
-29
lines changed

5 files changed

+49
-29
lines changed

build.gradle

Lines changed: 31 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,35 @@ allprojects {
2525
targetCompatibility = 1.7
2626
}
2727

28+
ext.libraries = [:]
29+
30+
libraries.shaded = [
31+
"commons-codec:commons-codec:1.10",
32+
"com.google.guava:guava:19.0",
33+
"joda-time:joda-time:2.9.3",
34+
"com.launchdarkly:okhttp-eventsource:1.5.0",
35+
"redis.clients:jedis:2.9.0"
36+
]
37+
38+
libraries.unshaded = [
39+
"com.google.code.gson:gson:2.7",
40+
"org.slf4j:slf4j-api:1.7.21"
41+
]
42+
43+
libraries.testCompile = [
44+
"org.easymock:easymock:3.4",
45+
"junit:junit:4.12"
46+
]
47+
48+
libraries.testRuntime = [
49+
"ch.qos.logback:logback-classic:1.1.7"
50+
]
51+
2852
dependencies {
29-
compile "commons-codec:commons-codec:1.10"
30-
compile "com.google.code.gson:gson:2.7"
31-
compile "com.google.guava:guava:19.0"
32-
compile "joda-time:joda-time:2.9.3"
33-
compile "org.slf4j:slf4j-api:1.7.21"
34-
compile group: "com.launchdarkly", name: "okhttp-eventsource", version: "1.5.0", changing: true
35-
compile "redis.clients:jedis:2.9.0"
36-
testCompile "org.easymock:easymock:3.4"
37-
testCompile 'junit:junit:4.12'
38-
testRuntime "ch.qos.logback:logback-classic:1.1.7"
53+
compile libraries.shaded, libraries.unshaded
54+
testCompile libraries.testCompile
55+
testRuntime libraries.testRuntime
56+
shadow libraries.unshaded
3957
}
4058

4159
jar {
@@ -49,7 +67,7 @@ jar {
4967
}
5068

5169
task wrapper(type: Wrapper) {
52-
gradleVersion = '2.14-rc-3'
70+
gradleVersion = '4.2.1'
5371
}
5472

5573
buildscript {
@@ -60,7 +78,7 @@ buildscript {
6078
}
6179
dependencies {
6280
classpath 'org.ajoberstar:gradle-git:1.5.0-rc.1'
63-
classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.3'
81+
classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.1'
6482
classpath "io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.8.0"
6583
}
6684
}
@@ -100,6 +118,7 @@ shadowJar {
100118
// Don't shade or include slf4j
101119
dependencies{
102120
exclude(dependency('org.slf4j:.*:.*'))
121+
exclude(dependency('com.google.code.gson:.*:.*'))
103122
}
104123

105124
// Shade all jars except for launchdarkly

gradle/wrapper/gradle-wrapper.jar

1.35 KB
Binary file not shown.
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
#Tue Jun 07 10:02:02 PDT 2016
21
distributionBase=GRADLE_USER_HOME
32
distributionPath=wrapper/dists
43
zipStoreBase=GRADLE_USER_HOME
54
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14-rc-3-all.zip
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.2.1-bin.zip

gradlew

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env bash
1+
#!/usr/bin/env sh
22

33
##############################################################################
44
##
@@ -33,11 +33,11 @@ DEFAULT_JVM_OPTS=""
3333
# Use the maximum available, or set MAX_FD != -1 to use that value.
3434
MAX_FD="maximum"
3535

36-
warn ( ) {
36+
warn () {
3737
echo "$*"
3838
}
3939

40-
die ( ) {
40+
die () {
4141
echo
4242
echo "$*"
4343
echo
@@ -154,11 +154,19 @@ if $cygwin ; then
154154
esac
155155
fi
156156

157-
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
158-
function splitJvmOpts() {
159-
JVM_OPTS=("$@")
157+
# Escape application args
158+
save () {
159+
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
160+
echo " "
160161
}
161-
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
162-
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
162+
APP_ARGS=$(save "$@")
163163

164-
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
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
171+
172+
exec "$JAVACMD" "$@"

gradlew.bat

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ goto fail
4949
@rem Get command-line arguments, handling Windows variants
5050

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

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

6261
set CMD_LINE_ARGS=%*
63-
goto execute
64-
65-
:4NT_args
66-
@rem Get arguments from the 4NT Shell from JP Software
67-
set CMD_LINE_ARGS=%$
6862

6963
:execute
7064
@rem Setup the command line

0 commit comments

Comments
 (0)