Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup build scripts #135

Merged
merged 1 commit into from
Sep 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 0 additions & 24 deletions buildSrc/src/main/kotlin/FrameworkUtils.kt

This file was deleted.

37 changes: 4 additions & 33 deletions sample/composeApp/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ kotlin {

framework {
baseName = "ComposeApp"
isStatic = true
}

xcodeConfigurationToNativeBuildType["CUSTOM_DEBUG"] = NativeBuildType.DEBUG
Expand All @@ -42,16 +43,9 @@ kotlin {
configureJvmTarget()
}

listOf(
iosX64 { configureWebRtcCinterops() },
iosArm64 { configureWebRtcCinterops() },
iosSimulatorArm64 { configureWebRtcCinterops() }
).forEach { iosTarget ->
iosTarget.binaries.framework {
baseName = "ComposeApp"
isStatic = true
}
}
iosX64()
iosArm64()
iosSimulatorArm64()

js {
browser {
Expand Down Expand Up @@ -143,26 +137,3 @@ android {
compose.experimental {
web.application {}
}

fun KotlinNativeTarget.configureWebRtcCinterops() {
val webRtcFrameworkPath = file("$buildDir/cocoapods/synthetic/IOS/Pods/WebRTC-SDK")
.resolveArchPath(konanTarget, "WebRTC")
compilations.getByName("main") {
cinterops.getByName("WebRTC") {
compilerOpts("-framework", "WebRTC", "-F$webRtcFrameworkPath")
}
}

binaries {
getTest("DEBUG").apply {
linkerOpts(
"-framework",
"WebRTC",
"-F$webRtcFrameworkPath",
"-rpath",
"$webRtcFrameworkPath",
"-ObjC"
)
}
}
}
4 changes: 2 additions & 2 deletions sample/iosApp/Configuration/Config.xcconfig
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
TEAM_ID=<YOUR_TEAM_ID>
BUNDLE_ID=<YOUR_BUNDLE_ID>
TEAM_ID=
BUNDLE_ID=com.shepeliev.webrtckmp.sample.WebRTC-KMP-Playground
APP_NAME=WebRTC KMP Playground
48 changes: 20 additions & 28 deletions sample/iosApp/iosApp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@
7555FF77242A565900829871 /* Sources */,
B92378962B6B1156000C7307 /* Frameworks */,
7555FF79242A565900829871 /* Resources */,
6E21AAA5910B6F600CBE06DF /* [CP] Embed Pods Frameworks */,
05D66F5F2BFCB089E3967664 /* [CP] Copy Pods Resources */,
931F3CF07987B7B6B6CCC6ED /* [CP] Copy Pods Resources */,
F3D8C08FB2F2F9B33C43EA14 /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
Expand Down Expand Up @@ -172,46 +172,46 @@
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
05D66F5F2BFCB089E3967664 /* [CP] Copy Pods Resources */ = {
5BCD90D29F45499A62B89A70 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-iosApp/Pods-iosApp-resources-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Copy Pods Resources";
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-iosApp/Pods-iosApp-resources-${CONFIGURATION}-output-files.xcfilelist",
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-iosApp-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-iosApp/Pods-iosApp-resources.sh\"\n";
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
5BCD90D29F45499A62B89A70 /* [CP] Check Pods Manifest.lock */ = {
931F3CF07987B7B6B6CCC6ED /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-iosApp/Pods-iosApp-resources-${CONFIGURATION}-input-files.xcfilelist",
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
name = "[CP] Copy Pods Resources";
outputFileListPaths = (
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-iosApp-checkManifestLockResult.txt",
"${PODS_ROOT}/Target Support Files/Pods-iosApp/Pods-iosApp-resources-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-iosApp/Pods-iosApp-resources.sh\"\n";
showEnvVarsInLog = 0;
};
6E21AAA5910B6F600CBE06DF /* [CP] Embed Pods Frameworks */ = {
F3D8C08FB2F2F9B33C43EA14 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
Expand Down Expand Up @@ -382,11 +382,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
OTHER_LDFLAGS = (
"$(inherited)",
"-framework",
composeApp,
);
OTHER_LDFLAGS = "$(inherited)";
PRODUCT_BUNDLE_IDENTIFIER = "${BUNDLE_ID}${TEAM_ID}";
PRODUCT_NAME = "${APP_NAME}";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -416,11 +412,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
OTHER_LDFLAGS = (
"$(inherited)",
"-framework",
composeApp,
);
OTHER_LDFLAGS = "$(inherited)";
PRODUCT_BUNDLE_IDENTIFIER = "${BUNDLE_ID}${TEAM_ID}";
PRODUCT_NAME = "${APP_NAME}";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down
31 changes: 5 additions & 26 deletions webrtc-kmp/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ kotlin {
homepage = "https://github.com/shepeliev/webrtc-kmp"
ios.deploymentTarget = "13.0"

noPodspec()

pod("WebRTC-SDK") {
version = libs.versions.webrtc.ios.sdk.get()
moduleName = "WebRTC"
Expand All @@ -37,9 +39,9 @@ kotlin {
}
}

iosX64 { configureWebRtcCinterops() }
iosArm64 { configureWebRtcCinterops() }
iosSimulatorArm64 { configureWebRtcCinterops() }
iosX64()
iosArm64()
iosSimulatorArm64()

js {
useCommonJs()
Expand Down Expand Up @@ -156,26 +158,3 @@ signing {
useInMemoryPgpKeys(signingKey, signingPassword)
sign(publishing.publications)
}

fun KotlinNativeTarget.configureWebRtcCinterops() {
val webRtcFrameworkPath = file("$buildDir/cocoapods/synthetic/IOS/Pods/WebRTC-SDK")
.resolveArchPath(konanTarget, "WebRTC")
compilations.getByName("main") {
cinterops.getByName("WebRTC") {
compilerOpts("-framework", "WebRTC", "-F$webRtcFrameworkPath")
}
}

binaries {
getTest("DEBUG").apply {
linkerOpts(
"-framework",
"WebRTC",
"-F$webRtcFrameworkPath",
"-rpath",
"$webRtcFrameworkPath",
"-ObjC"
)
}
}
}
54 changes: 0 additions & 54 deletions webrtc-kmp/webrtc_kmp.podspec

This file was deleted.

Loading