Add test for case when BuildFusService can't be injected
#KT-63990
This commit is contained in:
committed by
Space Team
parent
7b841d90e6
commit
ed144a106d
+16
@@ -28,4 +28,20 @@ class ProjectIsolationIT : KGPBaseTest() {
|
||||
build(":main-project:compileKotlin")
|
||||
}
|
||||
}
|
||||
|
||||
@DisplayName("project with buildSrc should be compatible with project isolation")
|
||||
@GradleTestVersions(
|
||||
minVersion = TestVersions.Gradle.G_7_4
|
||||
)
|
||||
@JvmGradlePluginTests
|
||||
@GradleTest
|
||||
fun testProjectIsolationWithBuildSrc(gradleVersion: GradleVersion) {
|
||||
project(
|
||||
projectName = "kt-63990-buildSrcWithKotlinJvmPlugin",
|
||||
gradleVersion = gradleVersion,
|
||||
buildOptions = defaultBuildOptions.copy(configurationCache = null)
|
||||
) {
|
||||
build("tasks")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+5
-3
@@ -24,7 +24,7 @@ data class BuildOptions(
|
||||
val stacktraceMode: String? = StacktraceOption.FULL_STACKTRACE_LONG_OPTION,
|
||||
val kotlinVersion: String = TestVersions.Kotlin.CURRENT,
|
||||
val warningMode: WarningMode = WarningMode.Fail,
|
||||
val configurationCache: Boolean = false,
|
||||
val configurationCache: Boolean? = false, //null value is only for cases, when project isolation is used without configuration cache. Otherwise Gradle runner will throw exception "The configuration cache cannot be disabled when isolated projects is enabled."
|
||||
val projectIsolation: Boolean = false,
|
||||
val configurationCacheProblems: BaseGradleIT.ConfigurationCacheProblems = BaseGradleIT.ConfigurationCacheProblems.FAIL,
|
||||
val parallel: Boolean = true,
|
||||
@@ -117,8 +117,10 @@ data class BuildOptions(
|
||||
WarningMode.None -> arguments.add("--warning-mode=none")
|
||||
}
|
||||
|
||||
arguments.add("-Dorg.gradle.unsafe.configuration-cache=$configurationCache")
|
||||
arguments.add("-Dorg.gradle.unsafe.configuration-cache-problems=${configurationCacheProblems.name.lowercase(Locale.getDefault())}")
|
||||
if (configurationCache != null) {
|
||||
arguments.add("-Dorg.gradle.unsafe.configuration-cache=$configurationCache")
|
||||
arguments.add("-Dorg.gradle.unsafe.configuration-cache-problems=${configurationCacheProblems.name.lowercase(Locale.getDefault())}")
|
||||
}
|
||||
|
||||
if (gradleVersion >= GradleVersion.version("7.1")) {
|
||||
arguments.add("-Dorg.gradle.unsafe.isolated-projects=$projectIsolation")
|
||||
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
plugins {
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
plugins {
|
||||
kotlin("jvm")
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
gradlePluginPortal()
|
||||
}
|
||||
Reference in New Issue
Block a user