Skip to content
Open
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
64 changes: 0 additions & 64 deletions .run/androidApp-cocoapods.run.xml

This file was deleted.

7 changes: 0 additions & 7 deletions .run/iosApp-cocoapods.run.xml

This file was deleted.

8 changes: 2 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,9 @@ buildProject:
# Build Apple Samples
buildAppleSamples:
./gradlew build -p sentry-samples
cd ./sentry-samples/kmp-app-cocoapods/iosApp/iosApp && touch iosApp.xcconfig
# cd ./sentry-samples/kmp-app-mvvm-di/iosApp && touch iosApp.xcconfig
cd ./sentry-samples/kmp-app-spm/iosApp && touch iosApp.xcconfig
sudo xcode-select --switch /Applications/Xcode.app && /usr/bin/xcodebuild -version
./gradlew ":sentry-samples:kmp-app-cocoapods:shared:podInstall"
cd ./sentry-samples/kmp-app-cocoapods/iosApp; pod update;
xcodebuild -workspace ./sentry-samples/kmp-app-cocoapods/iosApp/iosApp.xcworkspace -scheme iosApp -configuration Debug -sdk iphonesimulator -arch arm64
# xcodebuild -project ./sentry-samples/kmp-app-mvvm-di/iosApp.xcodeproj -scheme iosApp -configuration Debug -sdk iphonesimulator -arch arm64
xcodebuild -project ./sentry-samples/kmp-app-spm/iosApp.xcodeproj -scheme iosApp -configuration Debug -sdk iphonesimulator -arch arm64


# Build all targets, run tests and checks api
Expand Down
1 change: 0 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ plugins {
id(Config.QualityPlugins.detekt).version(Config.QualityPlugins.detektVersion)
id(Config.dokka).version(Config.dokkaVersion)
kotlin(Config.multiplatform).version(Config.kotlinVersion).apply(false)
kotlin(Config.cocoapods).version(Config.kotlinVersion).apply(false)
id(Config.spmForKmp).version(Config.spmForKmpVersion).apply(false)
id(Config.jetpackCompose).version(Config.composePluginVersion).apply(false)
id(Config.kotlinCompose).version(Config.kotlinVersion).apply(false)
Expand Down
1 change: 0 additions & 1 deletion buildSrc/src/main/java/Config.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ object Config {
val gradleMavenPublishPluginVersion = "0.30.0"

val multiplatform = "multiplatform"
val cocoapods = "native.cocoapods"
val spmForKmp = "io.github.frankois944.spmForKmp"
val spmForKmpVersion = "1.9.3"
val jetpackCompose = "org.jetbrains.compose"
Expand Down
14 changes: 6 additions & 8 deletions scripts/bump-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,17 @@ VERSION_NAME_PATTERN="versionName"
perl -pi -e "s/$VERSION_NAME_PATTERN=.*$/$VERSION_NAME_PATTERN=$NEW_VERSION/g" $GRADLE_FILEPATH
perl -pi -e "s/$VERSION_NAME_PATTERN=.*$/$VERSION_NAME_PATTERN=$NEW_VERSION/g" $PLUGIN_GRADLE_FILEPATH

PODSPEC_FILEPATH='sentry-kotlin-multiplatform/sentry_kotlin_multiplatform.podspec'
PODSPEC_CONTENT=$(cat $PODSPEC_FILEPATH)
CONFIG_FILEPATH='buildSrc/src/main/java/Config.kt'
CONFIG_CONTENT=$(cat $CONFIG_FILEPATH)

PODSPEC_REGEX="('Sentry', *)'([0-9\.]+)'"
COCOA_VERSION_REGEX='sentryCocoaVersion *= *"([0-9\.]+)"'

if ! [[ $PODSPEC_CONTENT =~ $PODSPEC_REGEX ]]; then
echo "Failed to find the Cocoa version in $PODSPEC_FILEPATH"
if ! [[ $CONFIG_CONTENT =~ $COCOA_VERSION_REGEX ]]; then
echo "Failed to find the Cocoa version in $CONFIG_FILEPATH"
exit 1
fi

PODSPEC_WHOLE_MATCH=${BASH_REMATCH[0]}
PODSPEC_VAR_NAME=${BASH_REMATCH[1]}
PODSPEC_VERSION=${BASH_REMATCH[2]}
PODSPEC_VERSION=${BASH_REMATCH[1]}

# create a new table entry in readme with NEW_VERSION and PODSPEC_VERSION in the compatibility table
# Find the line number of the last entry in the compatibility table and insert the new entry after it
Expand Down
50 changes: 17 additions & 33 deletions scripts/update-cocoa.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@
cd $(dirname "$0")/../

config_file='buildSrc/src/main/java/Config.kt'
podspec_file='sentry-kotlin-multiplatform/sentry_kotlin_multiplatform.podspec'
plugin_properties_file='sentry-kotlin-multiplatform-gradle-plugin/gradle.properties'
sample_podspec_file='sentry-samples/kmp-app-cocoapods/shared/shared.podspec'
sample_ios_app_dir='sentry-samples/kmp-app-cocoapods/iosApp'
spm_sample_pbxproj_file='sentry-samples/kmp-app-spm/iosApp.xcodeproj/project.pbxproj'
spm_sample_project='sentry-samples/kmp-app-spm/iosApp.xcodeproj'
spm_sample_scheme='iosApp'

config_content=$(cat $config_file)
podspec_content=$(cat $podspec_file)
plugin_properties_content=$(cat $plugin_properties_file)
sample_podspec_content=$(cat $sample_podspec_file)
pbxproj_content=$(cat $spm_sample_pbxproj_file)

config_regex='(sentryCocoaVersion *= *)"([0-9\.]+)"'
podspec_regex="('Sentry', *)'([0-9\.]+)'"
plugin_properties_regex='(sentryCocoaVersion *= *)([0-9\.]+)'
# Matches the sentry-cocoa SwiftPM pin in the SPM sample, e.g. `version = 8.58.2;`
pbxproj_regex='(version = )([0-9\.]+)(;)'
Comment thread
buenaflor marked this conversation as resolved.

if ! [[ $config_content =~ $config_regex ]]; then
echo "Failed to find the Cocoa version in $config_file"
Expand All @@ -26,14 +26,6 @@ config_whole_match=${BASH_REMATCH[0]}
config_var_name=${BASH_REMATCH[1]}
config_version=${BASH_REMATCH[2]}

if ! [[ $podspec_content =~ $podspec_regex ]]; then
echo "Failed to find the Cocoa version in $podspec_file"
exit 1
fi

podspec_whole_match=${BASH_REMATCH[0]}
podspec_var_name=${BASH_REMATCH[1]}

if ! [[ $plugin_properties_content =~ $plugin_properties_regex ]]; then
echo "Failed to find the Cocoa version in $plugin_properties_file"
exit 1
Expand All @@ -42,13 +34,12 @@ fi
plugin_properties_whole_match=${BASH_REMATCH[0]}
plugin_properties_var_name=${BASH_REMATCH[1]}

if ! [[ $sample_podspec_content =~ $podspec_regex ]]; then
echo "Failed to find the Cocoa version in $sample_podspec_file"
if ! [[ $pbxproj_content =~ $pbxproj_regex ]]; then
echo "Failed to find the sentry-cocoa SwiftPM version in $spm_sample_pbxproj_file"
exit 1
fi

sample_podspec_whole_match=${BASH_REMATCH[0]}
sample_podspec_var_name=${BASH_REMATCH[1]}
pbxproj_whole_match=${BASH_REMATCH[0]}

case $1 in
get-version)
Expand All @@ -63,28 +54,21 @@ set-version)
newValue="${config_var_name}\"$2"\"
echo "${config_content/${config_whole_match}/$newValue}" >$config_file

# Update the version in the podspec file
newValue="${podspec_var_name}'$2'"
echo "${podspec_content/${podspec_whole_match}/$newValue}" >$podspec_file

# Update the version in the plugin properties file
newValue="${plugin_properties_var_name}$2"
echo "${plugin_properties_content/${plugin_properties_whole_match}/$newValue}" >$plugin_properties_file

# Update the version in the sample podspec file
newValue="${sample_podspec_var_name}'$2'"
echo "${sample_podspec_content/${sample_podspec_whole_match}/$newValue}" >$sample_podspec_file

# Generate dummy framework first (required for pod update to work)
echo "Generating dummy framework for shared module..."
./gradlew :sentry-samples:kmp-app-cocoapods:shared:generateDummyFramework
# Update the sentry-cocoa SwiftPM pin in the SPM sample Xcode project
newValue="version = $2;"
echo "${pbxproj_content/${pbxproj_whole_match}/$newValue}" >$spm_sample_pbxproj_file

# Run pod update in the sample iOS app directory to update Podfile.lock
echo "Running pod update in $sample_ios_app_dir..."
(cd $sample_ios_app_dir && pod update)
# Refresh the SPM sample lockfiles (Package.resolved) so the pinned revision
# matches the new version.
echo "Resolving SwiftPM dependencies for the SPM sample..."
xcodebuild -resolvePackageDependencies -project $spm_sample_project -scheme $spm_sample_scheme
;;
*)
echo "Unknown argument $1"
exit 1
;;
esac
esac
57 changes: 0 additions & 57 deletions sentry-kotlin-multiplatform/sentry_kotlin_multiplatform.podspec

This file was deleted.

73 changes: 0 additions & 73 deletions sentry-samples/kmp-app-cocoapods/androidApp/build.gradle.kts

This file was deleted.

Binary file not shown.

This file was deleted.

Loading
Loading