File tree Expand file tree Collapse file tree 5 files changed +7
-21
lines changed Expand file tree Collapse file tree 5 files changed +7
-21
lines changed Original file line number Diff line number Diff line change @@ -163,7 +163,7 @@ subprojects {
163
163
useJUnitPlatform()
164
164
165
165
val isIntegrationProfile = System .getProperty(" test.profile" ) == " integration"
166
- val runningSpecificTests = gradle.startParameter.taskNames.contains( " --tests " )
166
+ val runningSpecificTests = gradle.startParameter.taskRequests.isNotEmpty( )
167
167
if (! isIntegrationProfile && ! runningSpecificTests) {
168
168
// exclude integration tests unless requested
169
169
exclude(" integration/**" , " **/*IntegrationTest.class" , " **/*ITTest.class" )
Original file line number Diff line number Diff line change @@ -134,17 +134,10 @@ tasks.getByName("assemble").dependsOn("shadowJar")
134
134
tasks {
135
135
test {
136
136
val isIntegrationProfile = System .getProperty(" test.profile" ) == " integration"
137
- val testsIndex = gradle.startParameter.taskNames.indexOf(" --tests" )
138
- var runningIntegrationTests = false
139
- if (testsIndex != - 1 ) {
140
- val testName = gradle.startParameter.taskNames[testsIndex + 1 ]
141
- if (testName.contains(" integration." ) || testName.endsWith(" IT" )) {
142
- runningIntegrationTests = true
143
- }
144
- }
137
+ val runningSpecificTests = gradle.startParameter.taskRequests.isNotEmpty()
145
138
146
139
// exclude attaching probe to self unless requested
147
- if (isIntegrationProfile || runningIntegrationTests ) {
140
+ if (isIntegrationProfile || runningSpecificTests ) {
148
141
dependsOn(" :probes:jvm:boot:jar" )
149
142
150
143
val probeJar = " ${project(" :probes:jvm:boot" ).buildDir} /libs/spp-probe-$version .jar"
Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ tasks {
95
95
96
96
// todo: should have way to distinguish tests that just need platform and tests that attach to self
97
97
val isIntegrationProfile = System .getProperty(" test.profile" ) == " integration"
98
- val runningSpecificTests = gradle.startParameter.taskNames.contains( " --tests " )
98
+ val runningSpecificTests = gradle.startParameter.taskRequests.isNotEmpty( )
99
99
100
100
// exclude attaching probe to self unless requested
101
101
if (isIntegrationProfile || runningSpecificTests) {
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ tasks {
56
56
57
57
// todo: should have way to distinguish tests that just need platform and tests that attach to self
58
58
val isIntegrationProfile = System .getProperty(" test.profile" ) == " integration"
59
- val runningSpecificTests = gradle.startParameter.taskNames.contains( " --tests " )
59
+ val runningSpecificTests = gradle.startParameter.taskRequests.isNotEmpty( )
60
60
61
61
// exclude attaching probe to self unless requested
62
62
if (isIntegrationProfile || runningSpecificTests) {
Original file line number Diff line number Diff line change @@ -74,17 +74,10 @@ dependencies {
74
74
tasks {
75
75
test {
76
76
val isIntegrationProfile = System .getProperty(" test.profile" ) == " integration"
77
- val testsIndex = gradle.startParameter.taskNames.indexOf(" --tests" )
78
- var runningIntegrationTests = false
79
- if (testsIndex != - 1 ) {
80
- val testName = gradle.startParameter.taskNames[testsIndex + 1 ]
81
- if (testName.contains(" integration." ) || testName.endsWith(" IT" )) {
82
- runningIntegrationTests = true
83
- }
84
- }
77
+ val runningSpecificTests = gradle.startParameter.taskRequests.isNotEmpty()
85
78
86
79
// exclude attaching probe to self unless requested
87
- if (isIntegrationProfile || runningIntegrationTests ) {
80
+ if (isIntegrationProfile || runningSpecificTests ) {
88
81
dependsOn(" :probes:jvm:boot:jar" )
89
82
90
83
val probeJar = " ${project(" :probes:jvm:boot" ).buildDir} /libs/spp-probe-$version .jar"
You can’t perform that action at this time.
0 commit comments