File tree Expand file tree Collapse file tree 2 files changed +18
-2
lines changed
restdocs-api-spec-gradle-plugin Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -56,12 +56,10 @@ allprojects {
5656 apply (plugin = " jacoco" )
5757 apply (plugin = " maven-publish" )
5858 apply (plugin = " org.jmailen.kotlinter" )
59-
6059 }
6160}
6261
6362
64-
6563subprojects {
6664
6765 val jacksonVersion by extra { " 2.9.5" }
Original file line number Diff line number Diff line change @@ -26,6 +26,8 @@ gradlePlugin {
2626val jacksonVersion: String by extra
2727val junitVersion: String by extra
2828
29+ val jacocoRuntime by configurations.creating
30+
2931dependencies {
3032 compileOnly(gradleKotlinDsl())
3133
@@ -44,4 +46,20 @@ dependencies {
4446 testImplementation(" com.jayway.jsonpath:json-path:2.4.0" )
4547
4648 testCompile(gradleTestKit())
49+
50+ jacocoRuntime(" org.jacoco:org.jacoco.agent:0.8.2:runtime" )
51+ }
52+
53+ val createTestKitFiles by tasks.creating {
54+ val outputDir = project.file(" $buildDir /testkitFiles" )
55+
56+ inputs.files(jacocoRuntime)
57+ outputs.dir(outputDir)
58+
59+ doLast {
60+ outputDir.mkdirs()
61+ file(" $outputDir /testkit-gradle.properties" ).writeText(" org.gradle.jvmargs=-javaagent:${jacocoRuntime.asPath} =destfile=$buildDir /jacoco/test.exec" )
62+ }
4763}
64+
65+ tasks[" test" ].dependsOn(createTestKitFiles)
You can’t perform that action at this time.
0 commit comments