Skip to content

Commit 32d2564

Browse files
committed
upgrade to gradle 8.1.1
1 parent 17a18af commit 32d2564

File tree

6 files changed

+64
-71
lines changed

6 files changed

+64
-71
lines changed

build.gradle

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
22
id 'java-gradle-plugin'
3-
id "com.gradle.plugin-publish" version "1.0.0"
3+
id "com.gradle.plugin-publish" version "1.1.0"
44
id "org.jetbrains.gradle.plugin.idea-ext" version "1.0"
55
}
66

@@ -22,22 +22,19 @@ ext {
2222
}
2323

2424
gradlePlugin {
25+
website = project.ext.website
26+
vcsUrl = project.ext.vcsUrl
27+
description = project.description
2528
plugins {
2629
gradleScoverage {
2730
id = 'org.scoverage'
2831
implementationClass = 'org.scoverage.ScoveragePlugin'
2932
displayName = 'Gradle Scoverage plugin'
33+
tags.set(['coverage', 'scala', 'scoverage'])
3034
}
3135
}
3236
}
3337

34-
pluginBundle {
35-
website = project.website
36-
vcsUrl = ext.vcsUrl
37-
description = project.description
38-
tags = ['coverage', 'scala', 'scoverage']
39-
}
40-
4138
apply plugin: 'maven-publish'
4239
apply plugin: 'groovy'
4340

@@ -117,7 +114,7 @@ gradlePlugin {
117114

118115
task groovydocJar(type: Jar, dependsOn: groovydoc) {
119116
from "$buildDir/docs/groovydoc"
120-
classifier 'groovydoc'
117+
archiveClassifier.set('groovydoc')
121118
}
122119

123120
def propOrDefault(String property) {
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
4-
distributionSha256Sum=29e49b10984e585d8118b7d0bc452f944e386458df27371b49b4ac1dec4b7fda
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
4+
distributionSha256Sum=e111cb9948407e26351227dabce49822fb88c37ee72f1d1582a69c68af2e702f
55
zipStoreBase=GRADLE_USER_HOME
66
zipStorePath=wrapper/dists

src/functionalTest/java/org/scoverage/ScoverageFunctionalTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@ private void configureArguments(String... arguments) {
122122
List<String> fullArguments = new ArrayList<>();
123123

124124
fullArguments.add("-PscalaVersionMajor=2");
125-
fullArguments.add("-PscalaVersionMinor=12");
126-
fullArguments.add("-PscalaVersionBuild=17");
125+
fullArguments.add("-PscalaVersionMinor=13");
126+
fullArguments.add("-PscalaVersionBuild=10");
127127
fullArguments.add("-PjunitVersion=5.3.2");
128128
fullArguments.add("-PjunitPlatformVersion=1.3.2");
129129
fullArguments.add("-PscalatestVersion=3.0.8");

src/functionalTest/resources/projects/scala-multi-module-multiple-test-tasks/build.gradle

Lines changed: 26 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -25,36 +25,35 @@ allprojects {
2525
testImplementation group: 'org.scalatest', name: "scalatest_${scalaVersionMajor}.${scalaVersionMinor}", version: scalatestVersion
2626
}
2727

28-
test {
29-
useJUnitPlatform()
30-
maxParallelForks = 1
31-
}
32-
33-
configurations {
34-
intTestImplementation.extendsFrom testImplementation
35-
intTestRuntimeOnly.extendsFrom testRuntimeOnly
36-
}
37-
sourceSets {
38-
intTest {
39-
resources.srcDir file('src/intTest/resources')
40-
scala {
41-
compileClasspath += main.output + test.output
42-
runtimeClasspath += main.output + test.output
43-
srcDir file("${projectDir}/src/intTest/scala")
28+
testing {
29+
suites {
30+
configureEach {
31+
useJUnit()
32+
targets.configureEach {
33+
testTask.configure {
34+
maxParallelForks = 1
35+
}
36+
}
37+
}
38+
intTest(JvmTestSuite) {
39+
testType = TestSuiteType.INTEGRATION_TEST
40+
// dependencies { ... } does not appear to work as advertised?
41+
sources {
42+
scala {
43+
compileClasspath += sourceSets.test.compileClasspath + sourceSets.main.output + sourceSets.test.output
44+
runtimeClasspath += sourceSets.test.runtimeClasspath
45+
}
46+
}
47+
targets.configureEach {
48+
testTask.configure{
49+
outputs.upToDateWhen { false }
50+
mustRunAfter(test)
51+
}
52+
}
4453
}
4554
}
4655
}
47-
48-
49-
task intTest(type: Test) {
50-
testClassesDirs = sourceSets.intTest.output.classesDirs
51-
classpath = sourceSets.intTest.runtimeClasspath
52-
outputs.upToDateWhen { false }
53-
54-
maxParallelForks = 1
55-
}
56-
check.dependsOn(intTest)
57-
intTest.mustRunAfter(test)
56+
check.dependsOn(testing.suites.intTest)
5857

5958
scoverage {
6059
minimumRate = 0.5

src/functionalTest/resources/projects/scala-single-module-multiple-test-tasks/build.gradle

Lines changed: 27 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
plugins {
22
id 'io.spring.dependency-management' version "1.0.4.RELEASE"
33
id 'org.scoverage'
4+
id 'jvm-test-suite'
45
}
56

67
repositories {
@@ -27,39 +28,35 @@ dependencies {
2728
testImplementation group: 'org.scalatest', name: "scalatest_${scalaVersionMajor}.${scalaVersionMinor}", version: scalatestVersion
2829
}
2930

30-
test {
31-
useJUnitPlatform()
32-
}
33-
34-
35-
configurations {
36-
intTestImplementation.extendsFrom testImplementation
37-
intTestRuntimeOnly.extendsFrom testRuntimeOnly
38-
}
39-
sourceSets {
40-
intTest {
41-
resources.srcDir file('src/intTest/resources')
42-
scala {
43-
compileClasspath += main.output + test.output
44-
runtimeClasspath += main.output + test.output
45-
srcDir file("${projectDir}/src/intTest/scala")
31+
testing {
32+
suites {
33+
configureEach {
34+
useJUnit()
35+
targets.configureEach {
36+
testTask.configure {
37+
maxParallelForks = 1
38+
}
39+
}
40+
}
41+
intTest(JvmTestSuite) {
42+
testType = TestSuiteType.INTEGRATION_TEST
43+
// dependencies { ... } does not appear to work as advertised?
44+
sources {
45+
scala {
46+
compileClasspath += sourceSets.test.compileClasspath + sourceSets.main.output + sourceSets.test.output
47+
runtimeClasspath += sourceSets.test.runtimeClasspath
48+
}
49+
}
50+
targets.configureEach {
51+
testTask.configure{
52+
outputs.upToDateWhen { false }
53+
mustRunAfter(test)
54+
}
55+
}
4656
}
4757
}
4858
}
49-
50-
test {
51-
maxParallelForks = 1
52-
}
53-
54-
task intTest(type: Test) {
55-
testClassesDirs = sourceSets.intTest.output.classesDirs
56-
classpath = sourceSets.intTest.runtimeClasspath
57-
outputs.upToDateWhen { false }
58-
59-
maxParallelForks = 1
60-
}
61-
check.dependsOn(intTest)
62-
intTest.mustRunAfter(test)
59+
check.dependsOn(testing.suites.intTest)
6360

6461
scoverage {
6562
minimumRate = 0.6

src/main/groovy/org/scoverage/ScoveragePlugin.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ class ScoveragePlugin implements Plugin<PluginAware> {
212212

213213
compileTask.configure {
214214
doFirst {
215-
destinationDir.deleteDir()
215+
destinationDirectory.get().getAsFile().deleteDir()
216216
}
217217

218218
// delete non-instrumented classes by comparing normally compiled classes to those compiled with scoverage

0 commit comments

Comments
 (0)