Revert "Add integration tests for "assembleAppleFrameworkForXcode" and "embedAndSignAppleFrameworkForXcode" tasks."
This reverts commit 6db3960d
This commit is contained in:
-102
@@ -1,102 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
|
||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package org.jetbrains.kotlin.gradle
|
|
||||||
|
|
||||||
import kotlin.test.Test
|
|
||||||
|
|
||||||
class AppleFrameworkIT : KotlinAndroid36GradleIT() {
|
|
||||||
companion object {
|
|
||||||
private val gradleVersion = GradleVersionRequired.FOR_MPP_SUPPORT
|
|
||||||
}
|
|
||||||
|
|
||||||
override val defaultGradleVersion: GradleVersionRequired
|
|
||||||
get() = gradleVersion
|
|
||||||
|
|
||||||
@Test
|
|
||||||
fun `assemble debug AppleFrameworkForXcode for IosArm64`() {
|
|
||||||
with(Project("sharedAppleFramework")) {
|
|
||||||
val options: BuildOptions = defaultBuildOptions().copy(
|
|
||||||
customEnvironmentVariables = mapOf(
|
|
||||||
"CONFIGURATION" to "debug",
|
|
||||||
"SDK_NAME" to "iphoneos123"
|
|
||||||
)
|
|
||||||
)
|
|
||||||
build("assembleAppleFrameworkForXcode", options = options) {
|
|
||||||
assertSuccessful()
|
|
||||||
assertTasksExecuted(":shared:assembleSharedDebugAppleFrameworkForXcodeIosArm64")
|
|
||||||
assertFileExists("/shared/build/xcode-frameworks/debug/iphoneos123/shared.framework")
|
|
||||||
assertFileExists("/shared/build/xcode-frameworks/debug/iphoneos123/shared.framework.dSYM")
|
|
||||||
}
|
|
||||||
|
|
||||||
build("assembleAppleFrameworkForXcode", options = options) {
|
|
||||||
assertSuccessful()
|
|
||||||
assertTasksUpToDate(":shared:assembleSharedDebugAppleFrameworkForXcodeIosArm64")
|
|
||||||
assertFileExists("/shared/build/xcode-frameworks/debug/iphoneos123/shared.framework")
|
|
||||||
assertFileExists("/shared/build/xcode-frameworks/debug/iphoneos123/shared.framework.dSYM")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
fun `check there aren't Xcode tasks without Xcode environment`() {
|
|
||||||
with(Project("sharedAppleFramework")) {
|
|
||||||
build("tasks") {
|
|
||||||
assertSuccessful()
|
|
||||||
assertTasksNotRegistered(
|
|
||||||
":shared:assembleAppleFrameworkForXcode",
|
|
||||||
":shared:embedAndSignAppleFrameworkForXcode"
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
fun `check all registered tasks with Xcode environment for Debug IosArm64 configuration`() {
|
|
||||||
with(Project("sharedAppleFramework")) {
|
|
||||||
val options: BuildOptions = defaultBuildOptions().copy(
|
|
||||||
customEnvironmentVariables = mapOf(
|
|
||||||
"CONFIGURATION" to "Debug",
|
|
||||||
"SDK_NAME" to "iphoneos",
|
|
||||||
"EXPANDED_CODE_SIGN_IDENTITY" to "-",
|
|
||||||
"TARGET_BUILD_DIR" to "testBuildDir",
|
|
||||||
"FRAMEWORKS_FOLDER_PATH" to "testFrameworksDir"
|
|
||||||
)
|
|
||||||
)
|
|
||||||
build("tasks", options = options) {
|
|
||||||
assertSuccessful()
|
|
||||||
assertTasksRegistered(
|
|
||||||
":shared:assembleAppleFrameworkForXcode",
|
|
||||||
":shared:assembleSharedDebugAppleFrameworkForXcodeIosArm64",
|
|
||||||
":shared:embedAndSignAppleFrameworkForXcode"
|
|
||||||
)
|
|
||||||
assertTasksNotRegistered(":shared:assembleSharedDebugAppleFrameworkForXcodeIosX64")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
fun `check there isn't embedAndSignAppleFrameworkForXcode task without required Xcode environments`() {
|
|
||||||
with(Project("sharedAppleFramework")) {
|
|
||||||
val options: BuildOptions = defaultBuildOptions().copy(
|
|
||||||
customEnvironmentVariables = mapOf(
|
|
||||||
"CONFIGURATION" to "Debug",
|
|
||||||
"SDK_NAME" to "iphoneos"
|
|
||||||
)
|
|
||||||
)
|
|
||||||
build("tasks", options = options) {
|
|
||||||
assertSuccessful()
|
|
||||||
assertTasksRegistered(
|
|
||||||
":shared:assembleAppleFrameworkForXcode",
|
|
||||||
":shared:assembleSharedDebugAppleFrameworkForXcodeIosArm64",
|
|
||||||
)
|
|
||||||
assertTasksNotRegistered(
|
|
||||||
":shared:embedAndSignAppleFrameworkForXcode",
|
|
||||||
":shared:assembleSharedDebugAppleFrameworkForXcodeIosX64"
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+1
-9
@@ -247,8 +247,7 @@ abstract class BaseGradleIT {
|
|||||||
val configurationCache: Boolean = false,
|
val configurationCache: Boolean = false,
|
||||||
val configurationCacheProblems: ConfigurationCacheProblems = ConfigurationCacheProblems.FAIL,
|
val configurationCacheProblems: ConfigurationCacheProblems = ConfigurationCacheProblems.FAIL,
|
||||||
val warningMode: WarningMode = WarningMode.Fail,
|
val warningMode: WarningMode = WarningMode.Fail,
|
||||||
val useFir: Boolean = false,
|
val useFir: Boolean = false
|
||||||
val customEnvironmentVariables: Map<String, String> = mapOf()
|
|
||||||
)
|
)
|
||||||
|
|
||||||
enum class ConfigurationCacheProblems {
|
enum class ConfigurationCacheProblems {
|
||||||
@@ -663,12 +662,6 @@ abstract class BaseGradleIT {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun CompiledProject.assertTasksNotRegistered(vararg tasks: String) {
|
|
||||||
for (task in tasks) {
|
|
||||||
assertNotContains("'Register task $task'")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fun CompiledProject.assertTasksRegisteredByPrefix(taskPrefixes: Iterable<String>) {
|
fun CompiledProject.assertTasksRegisteredByPrefix(taskPrefixes: Iterable<String>) {
|
||||||
for (prefix in taskPrefixes) {
|
for (prefix in taskPrefixes) {
|
||||||
assertContainsRegex("'Register task $prefix\\w*'".toRegex())
|
assertContainsRegex("'Register task $prefix\\w*'".toRegex())
|
||||||
@@ -970,7 +963,6 @@ Finished executing task ':$taskName'|
|
|||||||
options.gradleUserHome?.let {
|
options.gradleUserHome?.let {
|
||||||
put("GRADLE_USER_HOME", it.canonicalPath)
|
put("GRADLE_USER_HOME", it.canonicalPath)
|
||||||
}
|
}
|
||||||
putAll(options.customEnvironmentVariables)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun String.normalize() = this.lineSequence().joinToString(SYSTEM_LINE_SEPARATOR)
|
private fun String.normalize() = this.lineSequence().joinToString(SYSTEM_LINE_SEPARATOR)
|
||||||
|
|||||||
-22
@@ -1,22 +0,0 @@
|
|||||||
buildscript {
|
|
||||||
repositories {
|
|
||||||
gradlePluginPortal()
|
|
||||||
jcenter()
|
|
||||||
google()
|
|
||||||
mavenCentral()
|
|
||||||
mavenLocal()
|
|
||||||
}
|
|
||||||
dependencies {
|
|
||||||
classpath(kotlin("gradle-plugin:${property("kotlin_version")}"))
|
|
||||||
classpath("com.android.tools.build:gradle:${property("android_tools_version")}")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
allprojects {
|
|
||||||
repositories {
|
|
||||||
google()
|
|
||||||
jcenter()
|
|
||||||
mavenCentral()
|
|
||||||
mavenLocal()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-2
@@ -1,2 +0,0 @@
|
|||||||
kotlin.mpp.enableGranularSourceSetsMetadata=true
|
|
||||||
kotlin.native.enableDependencyPropagation=false
|
|
||||||
-10
@@ -1,10 +0,0 @@
|
|||||||
pluginManagement {
|
|
||||||
repositories {
|
|
||||||
google()
|
|
||||||
jcenter()
|
|
||||||
gradlePluginPortal()
|
|
||||||
mavenCentral()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
include(":shared")
|
|
||||||
-25
@@ -1,25 +0,0 @@
|
|||||||
plugins {
|
|
||||||
kotlin("multiplatform")
|
|
||||||
id("com.android.library")
|
|
||||||
}
|
|
||||||
|
|
||||||
kotlin {
|
|
||||||
android()
|
|
||||||
|
|
||||||
ios() {
|
|
||||||
binaries {
|
|
||||||
framework {
|
|
||||||
baseName = "shared"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
android {
|
|
||||||
compileSdkVersion(30)
|
|
||||||
sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml")
|
|
||||||
defaultConfig {
|
|
||||||
minSdkVersion(21)
|
|
||||||
targetSdkVersion(30)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-2
@@ -1,2 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<manifest package="com.github.jetbrains.myapplication" />
|
|
||||||
-5
@@ -1,5 +0,0 @@
|
|||||||
package com.github.jetbrains.myapplication
|
|
||||||
|
|
||||||
actual class Platform actual constructor() {
|
|
||||||
actual val platform: String = "Android ${android.os.Build.VERSION.SDK_INT}"
|
|
||||||
}
|
|
||||||
-7
@@ -1,7 +0,0 @@
|
|||||||
package com.github.jetbrains.myapplication
|
|
||||||
|
|
||||||
class Greeting {
|
|
||||||
fun greeting(): String {
|
|
||||||
return "Hello, ${Platform().platform}!"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-5
@@ -1,5 +0,0 @@
|
|||||||
package com.github.jetbrains.myapplication
|
|
||||||
|
|
||||||
expect class Platform() {
|
|
||||||
val platform: String
|
|
||||||
}
|
|
||||||
-7
@@ -1,7 +0,0 @@
|
|||||||
package com.github.jetbrains.myapplication
|
|
||||||
|
|
||||||
import platform.UIKit.UIDevice
|
|
||||||
|
|
||||||
actual class Platform actual constructor() {
|
|
||||||
actual val platform: String = UIDevice.currentDevice.systemName() + " " + UIDevice.currentDevice.systemVersion
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user