1
1
package com.google.protobuf.gradle
2
2
3
+ import com.google.protobuf.gradle.version.AgpVersion
4
+ import com.google.protobuf.gradle.version.GradleVersion
5
+
3
6
import static com.google.protobuf.gradle.ProtobufPluginTestHelper.buildAndroidProject
4
7
import static com.google.protobuf.gradle.ProtobufPluginTestHelper.getAndroidGradleRunner
5
8
@@ -15,8 +18,8 @@ import spock.lang.Unroll
15
18
*/
16
19
@CompileDynamic
17
20
class ProtobufAndroidPluginTest extends Specification {
18
- private static final List<String > GRADLE_VERSION = [" 5.6 " , " 6.5 " , " 6.8 " ]
19
- private static final List<String > ANDROID_PLUGIN_VERSION = [" 3.5.0 " , " 4.1.0 " , " 4.2.0-alpha10 " ]
21
+ private static final List<String > GRADLE_VERSION = [GradleVersion . VERSION_5_6 , GradleVersion . VERSION_6_5 , GradleVersion . VERSION_6_8 , GradleVersion . VERSION_7_4_2 ]
22
+ private static final List<String > ANDROID_PLUGIN_VERSION = [AgpVersion . VERSION_3_5_0 , AgpVersion . VERSION_4_1_0 , AgpVersion . VERSION_4_2_APLHA10 , AgpVersion . VERSION_7_2_1 ]
20
23
21
24
@Unroll
22
25
void " testProjectAndroid should be successfully executed [android #agpVersion, gradle #gradleVersion]" () {
@@ -103,8 +106,8 @@ class ProtobufAndroidPluginTest extends Specification {
103
106
result. task(" :testProjectAndroid:assembleDebug" ). outcome == TaskOutcome . SUCCESS
104
107
105
108
where :
106
- agpVersion << ANDROID_PLUGIN_VERSION . takeRight( 1 )
107
- gradleVersion << GRADLE_VERSION . takeRight( 1 )
109
+ agpVersion << [ AgpVersion . VERSION_4_2_APLHA10 ]
110
+ gradleVersion << [ GradleVersion . VERSION_6_8 ]
108
111
}
109
112
110
113
@Unroll
@@ -168,7 +171,7 @@ class ProtobufAndroidPluginTest extends Specification {
168
171
! result. output. contains(" This makes you vulnerable to https://github.com/google/protobuf-gradle-plugin/issues/248" )
169
172
170
173
where :
171
- agpVersion << ANDROID_PLUGIN_VERSION . takeRight( 1 )
172
- gradleVersion << GRADLE_VERSION . takeRight( 1 )
174
+ agpVersion << [ AgpVersion . VERSION_4_2_APLHA10 ]
175
+ gradleVersion << [ GradleVersion . VERSION_6_8 ]
173
176
}
174
177
}
0 commit comments