@@ -25,7 +25,7 @@ class RoomSchemaLocationWorkaroundTest extends AbstractTest {
25
25
cacheDir.mkdirs()
26
26
27
27
when:
28
- BuildResult buildResult = withGradleVersion(Versions.latestGradleVersion( ).version)
28
+ BuildResult buildResult = withGradleVersion(Versions.latestSupportedGradleVersionFor(androidVersion ).version)
29
29
.forwardOutput()
30
30
.withProjectDir(temporaryFolder.root)
31
31
.withArguments(CLEAN_BUILD)
@@ -48,7 +48,7 @@ class RoomSchemaLocationWorkaroundTest extends AbstractTest {
48
48
assertMergedSchemaOutputsExist()
49
49
50
50
when:
51
- buildResult = withGradleVersion(Versions.latestGradleVersion( ).version)
51
+ buildResult = withGradleVersion(Versions.latestSupportedGradleVersionFor(androidVersion ).version)
52
52
.forwardOutput()
53
53
.withProjectDir(temporaryFolder.root)
54
54
.withArguments(CLEAN_BUILD)
@@ -86,7 +86,7 @@ class RoomSchemaLocationWorkaroundTest extends AbstractTest {
86
86
cacheDir.mkdirs()
87
87
88
88
when:
89
- BuildResult buildResult = withGradleVersion(Versions.latestGradleVersion( ).version)
89
+ BuildResult buildResult = withGradleVersion(Versions.latestSupportedGradleVersionFor(androidVersion ).version)
90
90
.forwardOutput()
91
91
.withProjectDir(temporaryFolder.root)
92
92
.withArguments(CLEAN_BUILD)
@@ -109,7 +109,7 @@ class RoomSchemaLocationWorkaroundTest extends AbstractTest {
109
109
assertMergedSchemaOutputsExist()
110
110
111
111
when:
112
- buildResult = withGradleVersion(Versions.latestGradleVersion( ).version)
112
+ buildResult = withGradleVersion(Versions.latestSupportedGradleVersionFor(androidVersion ).version)
113
113
.forwardOutput()
114
114
.withProjectDir(temporaryFolder.root)
115
115
.withArguments(CLEAN_BUILD)
@@ -147,7 +147,7 @@ class RoomSchemaLocationWorkaroundTest extends AbstractTest {
147
147
cacheDir.mkdirs()
148
148
149
149
when:
150
- BuildResult buildResult = withGradleVersion(Versions.latestGradleVersion( ).version)
150
+ BuildResult buildResult = withGradleVersion(Versions.latestSupportedGradleVersionFor(androidVersion ).version)
151
151
.forwardOutput()
152
152
.withProjectDir(temporaryFolder.root)
153
153
.withArguments(CLEAN_BUILD)
@@ -167,7 +167,7 @@ class RoomSchemaLocationWorkaroundTest extends AbstractTest {
167
167
assertMergedSchemaOutputsExist()
168
168
169
169
when:
170
- buildResult = withGradleVersion(Versions.latestGradleVersion( ).version)
170
+ buildResult = withGradleVersion(Versions.latestSupportedGradleVersionFor(androidVersion ).version)
171
171
.forwardOutput()
172
172
.withProjectDir(temporaryFolder.root)
173
173
.withArguments(CLEAN_BUILD)
@@ -192,8 +192,9 @@ class RoomSchemaLocationWorkaroundTest extends AbstractTest {
192
192
193
193
@Unroll
194
194
def " workaround is not applied with older Kotlin plugin version (Kotlin #kotlinVersion)" () {
195
+ def androidVersion = Versions.getLatestVersionForAndroid(" 3.6 " )
195
196
SimpleAndroidApp.builder(temporaryFolder.root, cacheDir)
196
- .withAndroidVersion(Versions.getLatestVersionForAndroid( " 3.6 " ) )
197
+ .withAndroidVersion(androidVersion )
197
198
.withKotlinVersion(kotlinVersion)
198
199
.withRoomProcessingArgumentConfigured()
199
200
.build()
@@ -203,7 +204,7 @@ class RoomSchemaLocationWorkaroundTest extends AbstractTest {
203
204
cacheDir.mkdirs()
204
205
205
206
when:
206
- BuildResult buildResult = withGradleVersion(Versions.latestGradleVersion( ).version)
207
+ BuildResult buildResult = withGradleVersion(Versions.latestSupportedGradleVersionFor(androidVersion ).version)
207
208
.forwardOutput()
208
209
.withProjectDir(temporaryFolder.root)
209
210
.withArguments(CLEAN_BUILD + ['--info'] as String[])
@@ -230,8 +231,9 @@ class RoomSchemaLocationWorkaroundTest extends AbstractTest {
230
231
}
231
232
232
233
def " workaround throws an exception when room extension is not configured, but annotation processor argument is" () {
234
+ def androidVersion = Versions.getLatestVersionForAndroid(" 3.6 " )
233
235
SimpleAndroidApp.builder(temporaryFolder.root, cacheDir)
234
- .withAndroidVersion(Versions.getLatestVersionForAndroid( " 3.6 " ) )
236
+ .withAndroidVersion(androidVersion )
235
237
.withRoomProcessingArgumentConfigured()
236
238
.build()
237
239
.writeProject()
@@ -240,7 +242,7 @@ class RoomSchemaLocationWorkaroundTest extends AbstractTest {
240
242
cacheDir.mkdirs()
241
243
242
244
when:
243
- BuildResult buildResult = withGradleVersion(Versions.latestGradleVersion( ).version)
245
+ BuildResult buildResult = withGradleVersion(Versions.latestSupportedGradleVersionFor(androidVersion ).version)
244
246
.forwardOutput()
245
247
.withProjectDir(temporaryFolder.root)
246
248
.withArguments(CLEAN_BUILD)
@@ -251,8 +253,9 @@ class RoomSchemaLocationWorkaroundTest extends AbstractTest {
251
253
}
252
254
253
255
def " builds with no errors when room extension is not configured and annotation processor argument is missing" () {
256
+ def androidVersion = Versions.getLatestVersionForAndroid(" 3.6 " )
254
257
SimpleAndroidApp.builder(temporaryFolder.root, cacheDir)
255
- .withAndroidVersion(Versions.getLatestVersionForAndroid( " 3.6 " ) )
258
+ .withAndroidVersion(androidVersion )
256
259
.withNoRoomConfiguration()
257
260
.build()
258
261
.writeProject()
@@ -261,7 +264,7 @@ class RoomSchemaLocationWorkaroundTest extends AbstractTest {
261
264
cacheDir.mkdirs()
262
265
263
266
when:
264
- BuildResult buildResult = withGradleVersion(Versions.latestGradleVersion( ).version)
267
+ BuildResult buildResult = withGradleVersion(Versions.latestSupportedGradleVersionFor(androidVersion ).version)
265
268
.forwardOutput()
266
269
.withProjectDir(temporaryFolder.root)
267
270
.withArguments(CLEAN_BUILD)
0 commit comments