Skip to content

Commit 842f603

Browse files
author
Martin Bella
committed
updated build for new gradle wrapper and plugin [sdk-60]
1 parent a274b98 commit 842f603

File tree

13 files changed

+50
-45
lines changed

13 files changed

+50
-45
lines changed

build.gradle

+18-16
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,12 @@ buildscript {
2626

2727
repositories {
2828
jcenter()
29+
google()
2930
maven { url 'https://plugins.gradle.org/m2/' }
3031
}
3132

3233
dependencies {
33-
classpath 'com.android.tools.build:gradle:2.3.3'
34+
classpath 'com.android.tools.build:gradle:3.0.0-alpha4'
3435
classpath 'com.dicedmelon.gradle:jacoco-android:0.1.2'
3536
classpath 'gradle.plugin.com.nimbledroid:gradle-profiler:1.1.3'
3637
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
@@ -40,7 +41,7 @@ buildscript {
4041
allprojects {
4142
repositories {
4243
jcenter()
43-
mavenLocal()
44+
google()
4445
}
4546
}
4647

@@ -64,7 +65,7 @@ subprojects {
6465

6566
android {
6667
compileSdkVersion 25
67-
buildToolsVersion '25.0.3'
68+
buildToolsVersion '26.0.0'
6869

6970
defaultConfig {
7071
minSdkVersion 15
@@ -83,8 +84,8 @@ subprojects {
8384
}
8485

8586
compileOptions {
86-
sourceCompatibility JavaVersion.VERSION_1_7
87-
targetCompatibility JavaVersion.VERSION_1_7
87+
sourceCompatibility JavaVersion.VERSION_1_8
88+
targetCompatibility JavaVersion.VERSION_1_8
8889
}
8990

9091
if (isLibrary) {
@@ -106,16 +107,17 @@ subprojects {
106107

107108
if (isLibrary) {
108109
dependencies {
109-
testCompile 'com.google.truth:truth:0.33'
110-
testCompile 'com.nhaarman:mockito-kotlin:1.5.0'
111-
testCompile 'com.squareup.okhttp:mockwebserver:2.7.5'
112-
testCompile 'junit:junit:4.12'
113-
testCompile 'nl.jqno.equalsverifier:equalsverifier:2.3'
114-
testCompile "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
115-
testCompile "org.jetbrains.kotlin:kotlin-test-junit:$kotlinVersion"
116-
testCompile 'org.json:json:20170516'
117-
testCompile 'org.mockito:mockito-core:2.8.47'
118-
testCompile 'org.robolectric:robolectric:3.3.2'
110+
testImplementation 'com.google.truth:truth:0.33'
111+
testImplementation 'com.nhaarman:mockito-kotlin:1.5.0'
112+
testImplementation 'com.squareup.okhttp:mockwebserver:2.7.5'
113+
testImplementation 'junit:junit:4.12'
114+
testImplementation 'nl.jqno.equalsverifier:equalsverifier:2.3'
115+
testImplementation "org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion"
116+
testImplementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
117+
testImplementation "org.jetbrains.kotlin:kotlin-test-junit:$kotlinVersion"
118+
testImplementation 'org.json:json:20170516'
119+
testImplementation 'org.mockito:mockito-core:2.8.47'
120+
testImplementation 'org.robolectric:robolectric:3.3.2'
119121
}
120122
}
121123

@@ -131,7 +133,7 @@ subprojects {
131133
}
132134

133135
task wrapper(type: Wrapper) {
134-
gradleVersion = '3.3'
136+
gradleVersion = '4.0'
135137
}
136138

137139
task clean(type: Delete) {

examples/demo/build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ android {
4444
}
4545

4646
dependencies {
47-
compile project(':library')
47+
implementation project(':library')
4848

49-
compile "com.android.support:appcompat-v7:$supportVersion"
49+
implementation "com.android.support:appcompat-v7:$supportVersion"
5050
}

examples/notifications-style/build.gradle

+3-3
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ android {
4444
}
4545

4646
dependencies {
47-
compile project(':library')
48-
compile project(':library-notifications')
47+
implementation project(':library')
48+
implementation project(':library-notifications')
4949

50-
compile "com.android.support:appcompat-v7:$supportVersion"
50+
implementation "com.android.support:appcompat-v7:$supportVersion"
5151
}

examples/notifications-style/src/main/java/com/deltadna/android/sdk/notifications/example/ExampleActivity.java

-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424

2525
import com.deltadna.android.sdk.DDNA;
2626
import com.deltadna.android.sdk.notifications.DDNANotifications;
27-
import com.google.firebase.iid.FirebaseInstanceId;
2827

2928
public class ExampleActivity extends AppCompatActivity {
3029

examples/notifications/build.gradle

+3-3
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ android {
4444
}
4545

4646
dependencies {
47-
compile project(':library')
48-
compile project(':library-notifications')
47+
implementation project(':library')
48+
implementation project(':library-notifications')
4949

50-
compile "com.android.support:appcompat-v7:$supportVersion"
50+
implementation "com.android.support:appcompat-v7:$supportVersion"
5151
}

gradle.properties

+2
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,5 @@ POM_LICENCE_DIST=repo
1414

1515
RELEASE_REPOSITORY_URL=https://api.bintray.com/maven/deltadna/android/deltadna-sdk/;publish=1
1616
SNAPSHOT_REPOSITORY_URL=http://edinlin01:8082/artifactory/libs-snapshot-local
17+
18+
org.gradle.jvmargs=-Xmx1536M

gradle/mvn-push.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ afterEvaluate { project ->
7777
licenses {
7878
license {
7979
name POM_LICENCE_NAME
80-
url POM_LICENCE_URL
80+
url POM_LICENCE_URL
8181
distribution POM_LICENCE_DIST
8282
}
8383
}

gradle/wrapper/gradle-wrapper.jar

884 Bytes
Binary file not shown.
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Tue Jan 24 10:15:41 GMT 2017
1+
#Tue Jun 20 10:35:43 BST 2017
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-bin.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.0-bin.zip

gradlew

+15-7
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
##
@@ -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

-6
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

library-notifications/build.gradle

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
android {}
1818

1919
dependencies {
20-
compile "com.android.support:support-annotations:$supportVersion"
21-
compile "com.google.firebase:firebase-messaging:$firebaseVersion"
20+
api "com.android.support:support-annotations:$supportVersion"
21+
api "com.google.firebase:firebase-messaging:$firebaseVersion"
2222

23-
provided project(':library')
23+
compileOnly project(':library')
2424
}

library/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@
1717
android {}
1818

1919
dependencies {
20-
compile "com.android.support:support-annotations:$supportVersion"
20+
api "com.android.support:support-annotations:$supportVersion"
2121
}

0 commit comments

Comments
 (0)