[Gradle] Add smoke test for appleGradlePlugin
^KT-57668 Verification Pending
This commit is contained in:
committed by
Space Team
parent
fd63aee3e5
commit
fac90070bc
+31
@@ -392,4 +392,35 @@ class AppleFrameworkIT : BaseGradleIT() {
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `smoke test with apple gradle plugin`() {
|
||||
with(Project("appleGradlePluginConsumesAppleFrameworks", minLogLevel = LogLevel.INFO)) {
|
||||
setupWorkingDir()
|
||||
|
||||
fun dependencyInsight(configuration: String) = arrayOf(
|
||||
":iosApp:dependencyInsight", "--configuration", configuration, "--dependency", "iosLib"
|
||||
)
|
||||
build(*dependencyInsight("iosAppIosX64DebugImplementation")) {
|
||||
assertSuccessful()
|
||||
assertContains("variant \"mainDynamicDebugFrameworkIos\"")
|
||||
}
|
||||
|
||||
build(*dependencyInsight("iosAppIosX64ReleaseImplementation")) {
|
||||
assertSuccessful()
|
||||
assertContains("variant \"mainDynamicReleaseFrameworkIos\"")
|
||||
}
|
||||
|
||||
// NB: '0' is required at the end since dependency is added with custom attribute and it creates new configuration
|
||||
build(*dependencyInsight("iosAppIosX64DebugImplementation0"), "-PmultipleFrameworks") {
|
||||
assertSuccessful()
|
||||
assertContains("variant \"mainStaticDebugFrameworkIos\"")
|
||||
}
|
||||
|
||||
build(*dependencyInsight("iosAppIosX64ReleaseImplementation0"), "-PmultipleFrameworks") {
|
||||
assertSuccessful()
|
||||
assertContains("variant \"mainStaticReleaseFrameworkIos\"")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
+4
@@ -64,4 +64,8 @@ interface TestVersions {
|
||||
AGP_80(AGP.AGP_80, GradleVersion.version(Gradle.G_8_0), GradleVersion.version(Gradle.G_8_0), JavaVersion.VERSION_17),
|
||||
;
|
||||
}
|
||||
|
||||
object AppleGradlePlugin {
|
||||
const val V222_0_21 = "222.4550-0.21"
|
||||
}
|
||||
}
|
||||
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
plugins {
|
||||
kotlin("multiplatform") apply false
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget
|
||||
|
||||
plugins {
|
||||
id("org.jetbrains.gradle.apple.applePlugin") version "222.4550-0.21-dev-0"
|
||||
}
|
||||
|
||||
apple {
|
||||
iosApp {
|
||||
productName = "test"
|
||||
productModuleName = "MobileApp"
|
||||
launchStoryboard = "LaunchScreen"
|
||||
|
||||
dependencies {
|
||||
implementation(project(":iosLib")) {
|
||||
if (properties.containsKey("multipleFrameworks")) {
|
||||
attributes.attribute(KotlinNativeTarget.kotlinNativeFrameworkNameAttribute, "mainStatic")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
println(configurations.names.joinToString("\n"))
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
plugins {
|
||||
kotlin("multiplatform")
|
||||
}
|
||||
|
||||
kotlin {
|
||||
iosX64("ios") {
|
||||
binaries {
|
||||
framework("mainDynamic") {
|
||||
isStatic = false
|
||||
}
|
||||
|
||||
if (properties.containsKey("multipleFrameworks")) {
|
||||
framework("mainStatic") {
|
||||
isStatic = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
include(":iosLib", ":iosApp")
|
||||
Reference in New Issue
Block a user