tests(tooling/plugin): use download version for logsender artifacts in tests

This commit is contained in:
Akash Yadav
2024-07-01 17:04:59 +05:30
parent a039fe46bb
commit 1758008254
2 changed files with 5 additions and 3 deletions
@@ -38,7 +38,7 @@ internal val Project.isTestEnv: Boolean
_PROPERTY_IS_TEST_ENV).toString().toBoolean()
internal fun depVersion(testEnv: Boolean): String {
return if (testEnv ) {
return if (testEnv && !System.getenv("CI").toBoolean()) {
BuildInfo.VERSION_NAME_SIMPLE
} else {
BuildInfo.VERSION_NAME_DOWNLOAD
@@ -18,6 +18,8 @@
package com.itsaky.androidide.gradle
import com.itsaky.androidide.buildinfo.BuildInfo
import com.itsaky.androidide.tooling.api.LogSenderConfig._PROPERTY_IS_TEST_ENV
import com.itsaky.androidide.tooling.api.LogSenderConfig._PROPERTY_MAVEN_LOCAL_REPOSITORY
import com.itsaky.androidide.utils.FileProvider
import org.gradle.testkit.runner.BuildResult
import org.gradle.testkit.runner.GradleRunner
@@ -55,8 +57,8 @@ internal fun buildProject(
val args = mutableListOf(
":app:tasks", // run any task, as long as it applies the plugins
"--init-script", initScript.pathString,
"-Pandroidide.plugins.internal.isTestEnv=true", // plugins should be published to maven local first
"-Pandroidide.plugins.internal.mavenLocalRepositories=$repositories",
"-P$_PROPERTY_IS_TEST_ENV=true", // plugins should be published to maven local first
"-P$_PROPERTY_MAVEN_LOCAL_REPOSITORY=$repositories",
"--stacktrace"
)