Skip to content

Commit 204a7af

Browse files
committed
remove runtime dependency on generatr-api
1 parent a98e8b8 commit 204a7af

File tree

1 file changed

+3
-18
lines changed

1 file changed

+3
-18
lines changed

build.gradle

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,10 @@ repositories {
1717
}
1818
}
1919

20-
configurations {
21-
api
22-
implementation.extendsFrom api
23-
}
24-
2520
dependencies {
2621
implementation localGroovy()
2722

28-
// needed at runtime, see copyApi
29-
api 'com.github.hauner.openapi:openapi-generatr-api:1.0.0.B1'
23+
compileOnly 'com.github.hauner.openapi:openapi-generatr-api:1.0.0.B1'
3024

3125
testImplementation ('org.spockframework:spock-core:1.3-groovy-2.5') {
3226
// avoid conflict with localGroovy()
@@ -42,10 +36,10 @@ testSets {
4236

4337
check.dependsOn testInt
4438

45-
// copy classes of api dependencies to build/classes so they are included in the plugin jar
39+
// avoid runtime dependency on the generatr-api by merging it into the plugin jar
4640
task copyApi (type: Copy) {
4741
from {
48-
configurations.api.collect { zipTree (it) }
42+
configurations.compileOnly.collect { zipTree (it) }
4943
}
5044
into ("$buildDir/classes/groovy/main")
5145
include ('**/*.class')
@@ -55,15 +49,6 @@ compileJava {
5549
compileJava.dependsOn ('copyApi')
5650
}
5751

58-
//jar {
59-
// dependsOn (configurations.api)
60-
//
61-
// with copySpec {
62-
// from {
63-
// configurations.api.collect { zipTree(it) }
64-
// }
65-
// }
66-
//}
6752

6853
gradlePlugin {
6954
plugins {

0 commit comments

Comments
 (0)