Skip to content

Commit cb9e98a

Browse files
committed
Style improvements
1 parent ded6d08 commit cb9e98a

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

src/perfTest/groovy/com/monits/gradle/sca/performance/fixture/AbstractPerfTestFixture.groovy

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ package com.monits.gradle.sca.performance.fixture
1515

1616
import com.monits.gradle.sca.performance.io.TestFile
1717
import groovy.transform.CompileStatic
18-
import groovy.transform.TypeCheckingMode
1918
import org.gradle.testkit.runner.GradleRunner
2019
import org.gradle.util.GradleVersion
2120
import org.junit.Rule
@@ -29,7 +28,8 @@ import spock.util.environment.Jvm
2928
@CompileStatic
3029
abstract class AbstractPerfTestFixture extends Specification {
3130
// A sample of gradle versions to be considered in general testing - don't test anything below 2.8, it spams stdout
32-
static final List<String> TESTED_GRADLE_VERSIONS = ['2.14.1', '3.5.1', GradleVersion.current().version].asImmutable()
31+
static final List<String> TESTED_GRADLE_VERSIONS = ['2.14.1', '3.5.1', GradleVersion.current().version]
32+
.asImmutable()
3333
@SuppressWarnings(['DuplicateStringLiteral', 'UnnecessaryCast'])
3434
static final List<String> TESTED_GRADLE_VERSIONS_FOR_ANDROID = (['2.14.1', '3.5.1'] +
3535
(Jvm.current.java8Compatible ? [GradleVersion.current().version] : [] as List<String>))
@@ -53,20 +53,18 @@ abstract class AbstractPerfTestFixture extends Specification {
5353

5454
String pluginClasspathString
5555

56-
@CompileStatic(TypeCheckingMode.SKIP)
57-
@SuppressWarnings('UnnecessaryCollectCall')
5856
void setup() {
59-
// We do it this way to support all versions of gradle in our tests, since we care about backwards comaptibility
60-
URL pluginClasspathResource = getClass().classLoader.findResource('plugin-classpath.txt')
57+
// We do it this way to support all versions of gradle in our tests, since we care about backwards compatibility
58+
URL pluginClasspathResource = getClass().classLoader.getResource('plugin-classpath.txt')
6159
if (pluginClasspathResource == null) {
6260
throw new IllegalStateException('Did not find plugin classpath resource, run `testClasses` build task.')
6361
}
6462

6563
Collection<File> pluginClasspath = pluginClasspathResource.readLines().collect { new File(it) }
6664
pluginClasspathString = pluginClasspath
67-
.collect { it.absolutePath } // get absolute paths
65+
*.absolutePath // get absolute paths
6866
.findAll { !it.contains(".gradle${File.separator}wrapper${File.separator}dists${File.separator}") }
69-
.collect { it.replace('\\', '\\\\') } // escape backslashes in Windows paths
67+
*.replace('\\', '\\\\') // escape backslashes in Windows paths
7068
.collect { "'$it'" }
7169
.join(', ')
7270
}

0 commit comments

Comments
 (0)