Skip to content

Commit 72a7734

Browse files
authored
rework dependency tree, add api instead of implementation (#737)
1 parent d5d1f06 commit 72a7734

11 files changed

Lines changed: 39 additions & 104 deletions

File tree

samples/build.gradle

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,11 @@ sourceCompatibility = JavaVersion.VERSION_1_8
55
targetCompatibility = JavaVersion.VERSION_1_8
66

77
dependencies {
8-
compile project(":services-core")
9-
compile project(":services-directions")
10-
compile project(":services-geocoding")
11-
compile project(":services-optimization")
12-
compile project(":services-geojson")
13-
compile project(":services-matching")
14-
compile project(":services-staticmap")
8+
implementation project(":services-geocoding")
9+
implementation project(":services-optimization")
10+
implementation project(":services-geojson")
11+
implementation project(":services-matching")
12+
implementation project(":services-staticmap")
1513
}
1614

1715
buildConfig {

services-core/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,17 @@ static def getGitRevision() {
2121
dependencies {
2222

2323
// Gson
24-
compile dependenciesList.gson
24+
api dependenciesList.gson
2525

2626
// Retrofit
27-
compile dependenciesList.retrofit
28-
compile dependenciesList.retrofit2Gson
27+
api dependenciesList.retrofit
28+
api dependenciesList.retrofit2Gson
2929

3030
// Annotations
3131
compileOnly dependenciesList.supportAnnotation
3232

3333
// OkHttp
34-
compile dependenciesList.okhttp3Logging
34+
api dependenciesList.okhttp3Logging
3535

3636
// AutoValue
3737
compileOnly dependenciesList.autoValue

services-directions/build.gradle

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,19 @@
11
apply plugin: 'java-library'
22

33
dependencies {
4-
5-
compile project(":services-core")
6-
compile project(":services-geojson")
7-
8-
// Retrofit
9-
compile dependenciesList.retrofit
10-
compile dependenciesList.retrofit2Gson
4+
api project(":services-core")
5+
api project(":services-geojson")
116

127
// Annotations
138
compileOnly dependenciesList.supportAnnotation
149

15-
// OkHttp
16-
compile dependenciesList.okhttp3Logging
17-
1810
// AutoValue
1911
compileOnly dependenciesList.autoValue
2012
compileOnly dependenciesList.autoValueGson
2113

2214
// Test Dependencies
23-
testCompile dependenciesList.okhttp3Mockwebserver
24-
testCompile project(path: ':services-core', configuration: 'testOutput')
15+
testImplementation dependenciesList.okhttp3Mockwebserver
16+
testImplementation project(path: ':services-core', configuration: 'testOutput')
2517
}
2618

2719
apply from: "${rootDir}/gradle/checkstyle.gradle"

services-geocoding/build.gradle

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,19 @@ apply plugin: 'java-library'
22

33
dependencies {
44

5-
compile project(":services-core")
6-
compile project(":services-geojson")
7-
8-
// Retrofit
9-
compile dependenciesList.retrofit
10-
compile dependenciesList.retrofit2Gson
5+
api project(":services-core")
6+
api project(":services-geojson")
117

128
// Annotations
139
compileOnly dependenciesList.supportAnnotation
1410

15-
// OkHttp
16-
compile dependenciesList.okhttp3Logging
17-
1811
// AutoValue
1912
compileOnly dependenciesList.autoValue
2013
compileOnly dependenciesList.autoValueGson
2114

2215
// Test Dependencies
23-
testCompile dependenciesList.okhttp3Mockwebserver
24-
testCompile project(path: ':services-core', configuration: 'testOutput')
16+
testImplementation dependenciesList.okhttp3Mockwebserver
17+
testImplementation project(path: ':services-core', configuration: 'testOutput')
2518
}
2619

2720
apply from: "${rootDir}/gradle/checkstyle.gradle"

services-geojson/build.gradle

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
apply plugin: 'java-library'
22

33
dependencies {
4-
5-
compile project(":services-core")
6-
74
// Gson
8-
compile dependenciesList.gson
5+
api dependenciesList.gson
96

107
// Annotations
118
compileOnly dependenciesList.supportAnnotation
@@ -15,9 +12,9 @@ dependencies {
1512
compileOnly dependenciesList.autoValueGson
1613

1714
// Test Dependencies
18-
testCompile dependenciesList.okhttp3Mockwebserver
19-
testCompile project(path: ':services-core', configuration: 'testOutput')
20-
testCompile project(":services-turf")
15+
testImplementation dependenciesList.okhttp3Mockwebserver
16+
testImplementation project(path: ':services-core', configuration: 'testOutput')
17+
testImplementation project(":services-turf")
2118
}
2219

2320
apply from: "${rootDir}/gradle/checkstyle.gradle"

services-matching/build.gradle

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,18 @@
11
apply plugin: 'java-library'
22

33
dependencies {
4-
5-
compile project(":services-geojson")
6-
compile project(":services-directions")
7-
8-
// Retrofit
9-
compile dependenciesList.retrofit
10-
compile dependenciesList.retrofit2Gson
4+
api project(":services-directions")
115

126
// Annotations
137
compileOnly dependenciesList.supportAnnotation
148

15-
// OkHttp
16-
compile dependenciesList.okhttp3Logging
17-
189
// AutoValue
1910
compileOnly dependenciesList.autoValue
2011
compileOnly dependenciesList.autoValueGson
2112

2213
// Test Dependencies
23-
testCompile dependenciesList.okhttp3Mockwebserver
24-
testCompile project(path: ':services-core', configuration: 'testOutput')
14+
testImplementation dependenciesList.okhttp3Mockwebserver
15+
testImplementation project(path: ':services-core', configuration: 'testOutput')
2516
}
2617

2718
apply from: "${rootDir}/gradle/checkstyle.gradle"

services-matrix/build.gradle

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,18 @@
11
apply plugin: 'java-library'
22

33
dependencies {
4-
5-
compile project(":services-geojson")
6-
compile project(":services-directions")
7-
8-
// Retrofit
9-
compile dependenciesList.retrofit
10-
compile dependenciesList.retrofit2Gson
4+
api project(":services-directions")
115

126
// Annotations
137
compileOnly dependenciesList.supportAnnotation
148

15-
// OkHttp
16-
compile dependenciesList.okhttp3Logging
17-
189
// AutoValue
1910
compileOnly dependenciesList.autoValue
2011
compileOnly dependenciesList.autoValueGson
2112

2213
// Test Dependencies
23-
testCompile dependenciesList.okhttp3Mockwebserver
24-
testCompile project(path: ':services-core', configuration: 'testOutput')
14+
testImplementation dependenciesList.okhttp3Mockwebserver
15+
testImplementation project(path: ':services-core', configuration: 'testOutput')
2516
}
2617

2718
apply from: "${rootDir}/gradle/checkstyle.gradle"

services-optimization/build.gradle

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,18 @@
11
apply plugin: 'java-library'
22

33
dependencies {
4-
5-
compile project(":services-core")
6-
compile project(":services-geojson")
7-
compile project(":services-directions")
8-
9-
// Retrofit
10-
compile dependenciesList.retrofit
11-
compile dependenciesList.retrofit2Gson
4+
api project(":services-directions")
125

136
// Annotations
147
compileOnly dependenciesList.supportAnnotation
158

16-
// OkHttp
17-
compile dependenciesList.okhttp3Logging
18-
199
// AutoValue
2010
compileOnly dependenciesList.autoValue
2111
compileOnly dependenciesList.autoValueGson
2212

2313
// Test Dependencies
24-
testCompile dependenciesList.okhttp3Mockwebserver
25-
testCompile project(path: ':services-core', configuration: 'testOutput')
14+
testImplementation dependenciesList.okhttp3Mockwebserver
15+
testImplementation project(path: ':services-core', configuration: 'testOutput')
2616
}
2717

2818
apply from: "${rootDir}/gradle/checkstyle.gradle"

services-staticmap/build.gradle

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
apply plugin: 'java-library'
22

33
dependencies {
4-
5-
compile project(":services-core")
6-
compile project(":services-geojson")
7-
8-
// OkHttp
9-
compile dependenciesList.okhttp3Logging
4+
api project(":services-core")
5+
api project(":services-geojson")
106

117
// Annotations
128
compileOnly dependenciesList.supportAnnotation
@@ -16,8 +12,8 @@ dependencies {
1612
compileOnly dependenciesList.autoValueGson
1713

1814
// Test Dependencies
19-
testCompile dependenciesList.okhttp3Mockwebserver
20-
testCompile project(path: ':services-core', configuration: 'testOutput')
15+
testImplementation dependenciesList.okhttp3Mockwebserver
16+
testImplementation project(path: ':services-core', configuration: 'testOutput')
2117
}
2218

2319
apply from: "${rootDir}/gradle/checkstyle.gradle"

services-turf/build.gradle

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
apply plugin: 'java-library'
22

33
dependencies {
4-
5-
compile project(":services-core")
6-
compile project(":services-geojson")
4+
api project(":services-core")
5+
api project(":services-geojson")
76

87
// Annotations
98
compileOnly dependenciesList.supportAnnotation
@@ -13,7 +12,7 @@ dependencies {
1312
compileOnly dependenciesList.autoValueGson
1413

1514
// Test Dependencies
16-
testCompile project(path: ':services-core', configuration: 'testOutput')
15+
testImplementation project(path: ':services-core', configuration: 'testOutput')
1716
}
1817

1918
apply from: "${rootDir}/gradle/checkstyle.gradle"

0 commit comments

Comments
 (0)