mirror of
https://gitee.com/zhangsken/AndroidIDE.git
synced 2026-10-16 07:49:44 +08:00
tests(tooling-api): update minimum supported Gradle version for latest AGP version tests
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
* along with AndroidIDE. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import com.android.SdkConstants
|
||||
import com.itsaky.androidide.build.config.AGP_VERSION_MINIMUM
|
||||
import com.itsaky.androidide.build.config.BuildConfig
|
||||
import com.itsaky.androidide.build.config.CI
|
||||
@@ -74,6 +75,7 @@ tasks.create("generateBuildInfo") {
|
||||
|
||||
"AGP_VERSION_MININUM" to AGP_VERSION_MINIMUM,
|
||||
"AGP_VERSION_LATEST" to libs.versions.agp.tooling.get(),
|
||||
"AGP_VERSION_GRADLE_LATEST" to SdkConstants.GRADLE_LATEST_VERSION,
|
||||
|
||||
"SNAPSHOTS_REPOSITORY" to VersionUtils.SONATYPE_SNAPSHOTS_REPO,
|
||||
"PUBLIC_REPOSITORY" to VersionUtils.SONATYPE_PUBLIC_REPO,
|
||||
|
||||
@@ -28,6 +28,7 @@ public class BuildInfo {
|
||||
// ---------- Tooling version info --------------
|
||||
public static final String AGP_VERSION_MININUM = "@@AGP_VERSION_MININUM@@";
|
||||
public static final String AGP_VERSION_LATEST = "@@AGP_VERSION_LATEST@@";
|
||||
public static final String AGP_VERSION_GRADLE_LATEST = "@@AGP_VERSION_GRADLE_LATEST@@";
|
||||
|
||||
// ---------- Maven version info ----------------
|
||||
|
||||
|
||||
+18
-4
@@ -48,7 +48,9 @@ class CIOnlyToolingApiTests {
|
||||
// Test the minimum supported and the latest AGP version
|
||||
val versions = listOf(
|
||||
// AGP to Gradle
|
||||
BuildInfo.AGP_VERSION_MININUM to "7.3.3", BuildInfo.AGP_VERSION_LATEST to "8.2")
|
||||
BuildInfo.AGP_VERSION_MININUM to "7.3.3",
|
||||
BuildInfo.AGP_VERSION_LATEST to BuildInfo.AGP_VERSION_GRADLE_LATEST
|
||||
)
|
||||
|
||||
val client = ToolingApiTestLauncher.MultiVersionTestClient()
|
||||
for ((agpVersion, gradleVersion) in versions) {
|
||||
@@ -69,9 +71,21 @@ class CIOnlyToolingApiTests {
|
||||
|
||||
val client = ToolingApiTestLauncher.MultiVersionTestClient(
|
||||
agpVersion = agpVersion.toStringSimple(),
|
||||
gradleVersion = "${agpVersion.major}.${agpVersion.minor}", log = log)
|
||||
ToolingApiTestLauncher.launchServer(client = client, log = log, sysProps = mapOf(
|
||||
ToolingProps.TESTING_LATEST_AGP_VERSION to ToolingApiTestLauncher.MultiVersionTestClient.DEFAULT_AGP_VERSION)) {
|
||||
gradleVersion = BuildInfo.AGP_VERSION_GRADLE_LATEST,
|
||||
log = log
|
||||
)
|
||||
|
||||
ToolingApiTestLauncher.launchServer(
|
||||
client = client,
|
||||
log = log,
|
||||
|
||||
// Version of Android Gradle Plugin that the tooling API should recognize
|
||||
// as the latest one
|
||||
sysProps = mapOf(
|
||||
ToolingProps.TESTING_LATEST_AGP_VERSION
|
||||
to ToolingApiTestLauncher.MultiVersionTestClient.DEFAULT_AGP_VERSION
|
||||
)
|
||||
) {
|
||||
val output = log.toString()
|
||||
|
||||
if (result?.isSuccessful != true) {
|
||||
|
||||
Reference in New Issue
Block a user