|
1 | 1 | package org.gradle.android
|
2 | 2 |
|
3 |
| -import org.gradle.api.JavaVersion |
4 |
| -import org.junit.Assume |
5 |
| -import org.junit.experimental.categories.Category |
6 | 3 | import spock.lang.Specification
|
7 | 4 | import spock.lang.Unroll
|
8 | 5 |
|
9 |
| -@Category(MultiVersionTest) |
10 | 6 | class WorkaroundTest extends Specification {
|
11 |
| - |
12 | 7 | @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"() { |
15 | 9 | def possibleWorkarounds = AndroidCacheFixPlugin.initializeWorkarounds(null)
|
16 | 10 | def workarounds = AndroidCacheFixPlugin.getWorkaroundsToApply(Versions.android(androidVersion), null, possibleWorkarounds)
|
17 | 11 | expect:
|
18 | 12 | workarounds.collect { it.class.simpleName.replaceAll(/Workaround/, "") }.sort() == expectedWorkarounds.sort()
|
19 | 13 | where:
|
20 | 14 | 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'] |
22 | 17 | "4.1.2" | ['RoomSchemaLocation', 'CompileLibraryResources_4_0', 'MergeResources', 'MergeNativeLibs']
|
23 | 18 | "4.0.2" | ['MergeJavaResources', 'MergeNativeLibs', 'RoomSchemaLocation', 'CompileLibraryResources_4_0', 'MergeResources']
|
24 | 19 | "3.6.4" | ['MergeJavaResources', 'MergeNativeLibs', 'RoomSchemaLocation']
|
25 | 20 | "3.5.4" | ['MergeJavaResources', 'RoomSchemaLocation', 'MergeNativeLibs']
|
26 | 21 | }
|
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 |
| - } |
39 | 22 | }
|
0 commit comments