chore: remove Groovy compilation from the build pipeline
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index c22f9b3..2c8ca1f 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -53,8 +53,7 @@
The steps to import the sources (based on Eclipse 2019-06) into Eclipse are as follows:
1. Install `Eclipse IDE for Java Developers`
-1. Install the Groovy Eclipse plugin and select Groovy Compiler 2.4 (some tests are written in Groovy)
-1. Install `Kotlin for Eclipse` plugin (builds scripts are written in Kotlin)
+1. Install `Kotlin for Eclipse` plugin (JMeter code uses Java and Kotlin)
1. Make sure you have a Java 8 compatible JDK configured in your workspace
1. Open `File->Import...`
1. Select `Existing Gradle Project` and click `Next`
diff --git a/build-logic/jvm/src/main/kotlin/build-logic.groovy.gradle.kts b/build-logic/jvm/src/main/kotlin/build-logic.groovy.gradle.kts
deleted file mode 100644
index 1acd72c..0000000
--- a/build-logic/jvm/src/main/kotlin/build-logic.groovy.gradle.kts
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to you under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import com.github.vlsi.gradle.dsl.configureEach
-
-plugins {
- id("java")
- id("groovy")
- id("build-logic.test-spock")
- id("com.github.vlsi.gradle-extensions")
- id("build-logic.build-params")
-}
-
-tasks.configureEach<GroovyCompile> {
- buildParameters.testJdk?.let {
- javaLauncher.convention(javaToolchains.launcherFor(it))
- }
- // Support jdk-release to configure the target Java release when compiling the bytecode
- // See https://issues.apache.org/jira/browse/GROOVY-11105
-}
diff --git a/build-logic/jvm/src/main/kotlin/build-logic.jvm-library.gradle.kts b/build-logic/jvm/src/main/kotlin/build-logic.jvm-library.gradle.kts
index 1b38aec..3c9f687 100644
--- a/build-logic/jvm/src/main/kotlin/build-logic.jvm-library.gradle.kts
+++ b/build-logic/jvm/src/main/kotlin/build-logic.jvm-library.gradle.kts
@@ -19,10 +19,6 @@
id("build-logic.java-library")
}
-if (file("src/main/groovy").isDirectory || file("src/test/groovy").isDirectory) {
- apply(plugin = "build-logic.groovy")
-}
-
if (file("src/main/kotlin").isDirectory || file("src/test/kotlin").isDirectory) {
apply(plugin = "build-logic.kotlin")
}
diff --git a/build-logic/jvm/src/main/kotlin/build-logic.test-base.gradle.kts b/build-logic/jvm/src/main/kotlin/build-logic.test-base.gradle.kts
index 830174d..fa614d9 100644
--- a/build-logic/jvm/src/main/kotlin/build-logic.test-base.gradle.kts
+++ b/build-logic/jvm/src/main/kotlin/build-logic.test-base.gradle.kts
@@ -61,20 +61,4 @@
passProperty("skip.test_TestDNSCacheManager.testWithCustomResolverAnd1Server")
// Enable testing ByteBuddy with EA Java versions
passProperty("net.bytebuddy.experimental", "true")
- // Spock tests use cglib proxies that access ClassLoader.defineClass reflectively,
- // So we pass --add-opens
- // See https://github.com/apache/jmeter/pull/5763
- jvmArgumentProviders += AddOpensArgumentsProvider(javaLauncher.map { it.metadata.languageVersion })
-}
-
-class AddOpensArgumentsProvider(
- @Input val javaLanguageVersion: Provider<JavaLanguageVersion>
-): CommandLineArgumentProvider {
- override fun asArguments(): Iterable<String> =
- if (javaLanguageVersion.get().asInt() <= 8) {
- // Jave 1.8 does not need add-opens, so we omit it
- listOf()
- } else {
- listOf("--add-opens=java.base/java.lang=ALL-UNNAMED")
- }
}
diff --git a/build-logic/jvm/src/main/kotlin/build-logic.test-spock.gradle.kts b/build-logic/jvm/src/main/kotlin/build-logic.test-spock.gradle.kts
deleted file mode 100644
index 431485b..0000000
--- a/build-logic/jvm/src/main/kotlin/build-logic.test-spock.gradle.kts
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to you under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-plugins {
- `java-library`
- id("build-logic.test-base")
-}
-
-dependencies {
- testImplementation("org.spockframework:spock-core")
- testRuntimeOnly("cglib:cglib-nodep") {
- because(
- """
- org.spockframework.mock.CannotCreateMockException: Cannot create mock for
- class org.apache.jmeter.report.processor.AbstractSummaryConsumer${'$'}SummaryInfo.
- Mocking of non-interface types requires a code generation library.
- Please put an up-to-date version of byte-buddy or cglib-nodep on the class path.
- """.trimIndent()
- )
- }
- testRuntimeOnly("org.objenesis:objenesis") {
- because(
- """
- org.spockframework.mock.CannotCreateMockException: Cannot create mock for
- class org.apache.jmeter.report.core.Sample. To solve this problem,
- put Objenesis 1.2 or higher on the class path (recommended),
- or supply constructor arguments (e.g. 'constructorArgs: [42]') that allow to construct
- an object of the mocked type.
- """.trimIndent()
- )
- }
-}
diff --git a/checksum.xml b/checksum.xml
index ce13b9d..cbbfe40 100644
--- a/checksum.xml
+++ b/checksum.xml
@@ -211,7 +211,6 @@
<trusted-key id='60200ac4ae761f1614d6c46766d68daa073be985' group='org.slf4j' />
<trusted-key id='2b1042677fd8190c7b9fc0dc2161d72e7dcd4258' group='org.sonarsource.scanner.api' />
<trusted-key id='f1182e81c792928921dbcab4cfca4a29d26468de' group='org.sonarsource.scanner.api' />
- <trusted-key id='76e94e8ff0ab5af3b6f8366972fefd1572eb75e1' group='org.spockframework' />
<trusted-key id='8756c4f765c9ac3cb6b85d62379ce192d401ab61' group='org.springframework' />
<trusted-key id='e2acb037933cdeaab7bf77d49a2c7a98e457c53d' group='org.springframework' />
<trusted-key id='7cd52b5a8295137c88fb5748dddafa7674e54418' group='org.testng' />
diff --git a/renovate.json b/renovate.json
index 39d8644..dd41f3b 100644
--- a/renovate.json
+++ b/renovate.json
@@ -114,12 +114,6 @@
"allowedVersions": "< 2.0.0"
},
{
- "matchPackagePrefixes": ["org.spockframework"],
- "groupName": "org.spockframework",
- "description": "TODO: change when we upgrade to Groovy 4.0",
- "allowedVersions": "/.*-groovy-3.0/"
- },
- {
"matchPackagePatterns": ["^src:protocol"],
"enabled": false
}
diff --git a/src/bom-testing/build.gradle.kts b/src/bom-testing/build.gradle.kts
index 65ddd38..158cb59 100644
--- a/src/bom-testing/build.gradle.kts
+++ b/src/bom-testing/build.gradle.kts
@@ -56,7 +56,6 @@
api("org.objenesis:objenesis:3.3")
api("org.openjdk.jmh:jmh-core:1.37")
api("org.openjdk.jmh:jmh-generator-annprocess:1.37")
- api("org.spockframework:spock-core:2.3-groovy-3.0")
api("org.springframework:spring-beans:4.3.30.RELEASE")
api("org.springframework:spring-context:4.3.30.RELEASE")
}
diff --git a/src/components/build.gradle.kts b/src/components/build.gradle.kts
index 1e5052a..7ea996e 100644
--- a/src/components/build.gradle.kts
+++ b/src/components/build.gradle.kts
@@ -91,7 +91,6 @@
testFixturesImplementation(testFixtures(projects.src.core))
testFixturesImplementation("junit:junit")
testImplementation("io.mockk:mockk")
- testFixturesImplementation("org.spockframework:spock-core")
}
if (!buildParameters.enableJavaFx) {