Skip to content

Commit 132f452

Browse files
committed
Remove MultiVersionTest from WorkaroundTest
This test covers different versions, but it does not actually execute a build, so it can be run with a single JDK as a part of the main test task.
1 parent 7dc8c6a commit 132f452

File tree

1 file changed

+3
-20
lines changed

1 file changed

+3
-20
lines changed
Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,22 @@
11
package org.gradle.android
22

3-
import org.gradle.api.JavaVersion
4-
import org.junit.Assume
5-
import org.junit.experimental.categories.Category
63
import spock.lang.Specification
74
import spock.lang.Unroll
85

9-
@Category(MultiVersionTest)
106
class WorkaroundTest extends Specification {
11-
127
@Unroll
13-
def "applies the right workarounds for Android #androidVersion on JDK8"() {
14-
Assume.assumeTrue(JavaVersion.current().isJava8())
8+
def "applies the right workarounds for Android #androidVersion"() {
159
def possibleWorkarounds = AndroidCacheFixPlugin.initializeWorkarounds(null)
1610
def workarounds = AndroidCacheFixPlugin.getWorkaroundsToApply(Versions.android(androidVersion), null, possibleWorkarounds)
1711
expect:
1812
workarounds.collect { it.class.simpleName.replaceAll(/Workaround/, "") }.sort() == expectedWorkarounds.sort()
1913
where:
2014
androidVersion | expectedWorkarounds
21-
"4.2.0-beta04" | ['RoomSchemaLocation', 'CompileLibraryResources_4_2', 'MergeResources', 'MergeNativeLibs']
15+
"7.0.0-alpha01" | ['RoomSchemaLocation', 'CompileLibraryResources_4_2', 'MergeResources', 'MergeNativeLibs']
16+
"4.2.0-beta04" | ['RoomSchemaLocation', 'CompileLibraryResources_4_2', 'MergeResources', 'MergeNativeLibs']
2217
"4.1.2" | ['RoomSchemaLocation', 'CompileLibraryResources_4_0', 'MergeResources', 'MergeNativeLibs']
2318
"4.0.2" | ['MergeJavaResources', 'MergeNativeLibs', 'RoomSchemaLocation', 'CompileLibraryResources_4_0', 'MergeResources']
2419
"3.6.4" | ['MergeJavaResources', 'MergeNativeLibs', 'RoomSchemaLocation']
2520
"3.5.4" | ['MergeJavaResources', 'RoomSchemaLocation', 'MergeNativeLibs']
2621
}
27-
28-
@Unroll
29-
def "applies the right workarounds for Android #androidVersion on JDK11"() {
30-
Assume.assumeTrue(JavaVersion.current().isJava11())
31-
def possibleWorkarounds = AndroidCacheFixPlugin.initializeWorkarounds(null)
32-
def workarounds = AndroidCacheFixPlugin.getWorkaroundsToApply(Versions.android(androidVersion), null, possibleWorkarounds)
33-
expect:
34-
workarounds.collect { it.class.simpleName.replaceAll(/Workaround/, "") }.sort() == expectedWorkarounds.sort()
35-
where:
36-
androidVersion | expectedWorkarounds
37-
"7.0.0-alpha01" | ['RoomSchemaLocation', 'CompileLibraryResources_4_2', 'MergeResources', 'MergeNativeLibs']
38-
}
3922
}

0 commit comments

Comments
 (0)