File tree 8 files changed +31
-20
lines changed
src/funcTest/groovy/me/champeau/jmh
8 files changed +31
-20
lines changed Original file line number Diff line number Diff line change @@ -30,23 +30,19 @@ buildScanRecipes {
30
30
recipe(mapOf (" baseUrl" to " https://github.com/melix/jmh-gradle-plugin/tree" ), " git-commit" )
31
31
}
32
32
33
- val jmhVersion: String by project
34
- val spockVersion: String by project
35
- val shadowVersion: String by project
36
- val shadowForkVersion: String by project
37
- val jacocoVersion: String by project
38
-
39
33
dependencies {
34
+ val jmhVersion = " 1.37"
40
35
implementation(" org.openjdk.jmh:jmh-core:$jmhVersion " )
41
36
42
- testImplementation(" org.spockframework:spock-core:$spockVersion " ) {
37
+ testImplementation(" org.spockframework:spock-core:2.3-groovy-3.0 " ) {
43
38
exclude(mapOf (" group" to " org.codehaus.groovy" ))
44
39
}
45
- pluginsUnderTest(" gradle.plugin.com.github.johnrengelman:shadow:$shadowVersion " )
46
- pluginsUnderTest(" io.github.goooler.shadow:shadow-gradle-plugin:$shadowForkVersion " )
40
+ pluginsUnderTest(" gradle.plugin.com.github.johnrengelman:shadow:7.1.2 " )
41
+ pluginsUnderTest(" io.github.goooler.shadow:shadow-gradle-plugin:8.1.8 " )
47
42
48
43
testImplementation(" org.openjdk.jmh:jmh-core:$jmhVersion " )
49
44
testImplementation(" org.openjdk.jmh:jmh-generator-bytecode:$jmhVersion " )
45
+ testImplementation(" commons-io:commons-io:2.16.1" )
50
46
}
51
47
52
48
java {
58
54
}
59
55
60
56
jacoco {
61
- toolVersion = jacocoVersion
57
+ toolVersion = " 0.8.12 "
62
58
}
63
59
64
60
tasks.jacocoTestReport {
Original file line number Diff line number Diff line change @@ -6,12 +6,6 @@ project_website=https://github.com/melix/jmh-gradle-plugin
6
6
project_issues =https://github.com/melix/jmh-gradle-plugin/issues
7
7
project_vcs =https://github.com/melix/jmh-gradle-plugin.git
8
8
9
- jacocoVersion = 0.8.12
10
- jmhVersion = 1.37
11
- shadowVersion = 7.1.2
12
- shadowForkVersion = 8.1.8
13
- spockVersion = 2.3-groovy-3.0
14
-
15
9
org.gradle.jvmargs =-Xmx4g -Dfile.encoding =UTF-8
16
10
org.gradle.parallel =true
17
11
org.gradle.caching =true
Original file line number Diff line number Diff line change 1
1
distributionBase =GRADLE_USER_HOME
2
2
distributionPath =wrapper/dists
3
- distributionUrl =https\://services.gradle.org/distributions/gradle-8.8 -bin.zip
3
+ distributionUrl =https\://services.gradle.org/distributions/gradle-8.9 -bin.zip
4
4
networkTimeout =10000
5
5
validateDistributionUrl =true
6
6
zipStoreBase =GRADLE_USER_HOME
Original file line number Diff line number Diff line change 15
15
# See the License for the specific language governing permissions and
16
16
# limitations under the License.
17
17
#
18
+ # SPDX-License-Identifier: Apache-2.0
19
+ #
18
20
19
21
# #############################################################################
20
22
#
84
86
# shellcheck disable=SC2034
85
87
APP_BASE_NAME=${0##*/ }
86
88
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
87
- APP_HOME=$( cd " ${APP_HOME:- ./ } " > /dev/null && pwd -P ) || exit
89
+ APP_HOME=$( cd -P " ${APP_HOME:- ./ } " > /dev/null && printf ' %s
90
+ ' " $PWD " ) || exit
88
91
89
92
# Use the maximum available, or set MAX_FD != -1 to use that value.
90
93
MAX_FD=maximum
Original file line number Diff line number Diff line change 13
13
@ rem See the License for the specific language governing permissions and
14
14
@ rem limitations under the License.
15
15
@ rem
16
+ @ rem SPDX-License-Identifier: Apache-2.0
17
+ @ rem
16
18
17
19
@ if " %DEBUG% " == " " @ echo off
18
20
@ rem ##########################################################################
Original file line number Diff line number Diff line change 15
15
*/
16
16
package me.champeau.jmh
17
17
18
+ import org.apache.commons.io.FileUtils
18
19
import org.gradle.testkit.runner.BuildResult
19
20
import org.gradle.testkit.runner.GradleRunner
20
- import org.gradle.util.GFileUtils
21
21
import org.gradle.util.GradleVersion
22
22
import spock.lang.Specification
23
23
import spock.lang.TempDir
@@ -65,13 +65,17 @@ abstract class AbstractFuncSpec extends Specification {
65
65
file(' build.gradle' )
66
66
}
67
67
68
+ File getSettingsFile () {
69
+ file(' settings.gradle' )
70
+ }
71
+
68
72
File getBenchmarksCsv () {
69
73
file(" build/reports/benchmarks.csv" )
70
74
}
71
75
72
76
protected void usingSample (String name ) {
73
77
File sampleDir = new File (" src/funcTest/resources/$name " )
74
- GFileUtils . copyDirectory(sampleDir, projectDir)
78
+ FileUtils . copyDirectory(sampleDir, projectDir)
75
79
}
76
80
77
81
protected File file (String path ) {
Original file line number Diff line number Diff line change 16
16
package me.champeau.jmh
17
17
18
18
import org.gradle.testkit.runner.TaskOutcome
19
+ import org.gradle.util.GradleVersion
19
20
import spock.lang.Unroll
20
21
21
22
@Unroll
@@ -29,6 +30,17 @@ class ProjectWithFeaturePreviewSpec extends AbstractFuncSpec {
29
30
given:
30
31
usingGradleVersion(gradleVersion)
31
32
33
+ and:
34
+ // TODO: we can move this into the test fixture project once we drop support for Gradle 7.x
35
+ if (gradleVersion >= GradleVersion.version(" 8.9 " )) {
36
+ settingsFile.text =
37
+ " " "
38
+ plugins {
39
+ id(" org.gradle.toolchains.foojay-resolver-convention" ) version " 0.8.0"
40
+ }\n
41
+ """ + settingsFile.text
42
+ }
43
+
32
44
when:
33
45
def result = build("jmh")
34
46
You can’t perform that action at this time.
0 commit comments