[Gradle] Test MPP with Configuration Cache and Precompiled Script Plugins
^KT-59042 Verification Pending
This commit is contained in:
committed by
Space Team
parent
314fcc1ad2
commit
37d797577b
+24
-1
@@ -9,10 +9,10 @@ import org.gradle.api.logging.LogLevel
|
||||
import org.gradle.util.GradleVersion
|
||||
import org.jetbrains.kotlin.gradle.report.BuildReportType
|
||||
import org.jetbrains.kotlin.gradle.testbase.*
|
||||
import org.jetbrains.kotlin.gradle.util.replaceText
|
||||
import org.junit.jupiter.api.DisplayName
|
||||
import org.junit.jupiter.api.io.TempDir
|
||||
import java.nio.file.Path
|
||||
import kotlin.test.assertNotNull
|
||||
|
||||
@DisplayName("Configuration cache")
|
||||
class ConfigurationCacheIT : AbstractConfigurationCacheIT() {
|
||||
@@ -108,6 +108,29 @@ class ConfigurationCacheIT : AbstractConfigurationCacheIT() {
|
||||
}
|
||||
}
|
||||
|
||||
@MppGradlePluginTests
|
||||
@GradleTestVersions(
|
||||
minVersion = TestVersions.Gradle.G_8_0 // configuration cache and precompiled script plugins fails on earlier versions
|
||||
)
|
||||
@GradleTest
|
||||
fun `test composite build with precompiled script plugins and multiplatform`(gradleVersion: GradleVersion) {
|
||||
project("composite-build-with-precompiled-script-plugins", gradleVersion) {
|
||||
settingsGradleKts.replaceText(
|
||||
"pluginManagement {",
|
||||
"""
|
||||
pluginManagement {
|
||||
includeBuild("build-logic")
|
||||
""".trimIndent()
|
||||
)
|
||||
subProject("build-logic").projectPath.addPluginManagementToSettings()
|
||||
|
||||
testConfigurationCacheOf(
|
||||
":lib:transformCommonMainDependenciesMetadata",
|
||||
checkUpToDateOnRebuild = false
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@OtherGradlePluginTests
|
||||
@DisplayName("with project using incremental kapt")
|
||||
@GradleTest
|
||||
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
plugins {
|
||||
`kotlin-dsl`
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
|
||||
val kotlin_version by properties
|
||||
dependencies {
|
||||
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version")
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
plugins {
|
||||
kotlin("multiplatform")
|
||||
}
|
||||
|
||||
kotlin {
|
||||
jvm()
|
||||
linuxX64()
|
||||
linuxArm64()
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
plugins {
|
||||
kotlin("multiplatform").apply(false)
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
plugins {
|
||||
id("convention-plugin-multiplatform")
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
fun foo() = "bar"
|
||||
|
||||
fun main() = println(foo())
|
||||
Reference in New Issue
Block a user