Skip to content

Commit d3c90f1

Browse files
committed
build: update dependencies and add CocoaPods specs for UI modules
- Update Kotlin version to 2.3.21. - Update `androidxComposeTest` and `uiTooling` dependencies to 1.11.0. - Add `ui.podspec` files for the `:core:ui` and `:core:test:ui` modules to support iOS CocoaPods integration. - Update iOS user interface state and workspace configuration.
1 parent cce4678 commit d3c90f1

4 files changed

Lines changed: 97 additions & 3 deletions

File tree

Binary file not shown.

core/test/ui/ui.podspec

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
Pod::Spec.new do |spec|
2+
spec.name = 'ui'
3+
spec.version = '1.0'
4+
spec.homepage = 'https://github.com/softartdev/NoteDelight'
5+
spec.source = { :http=> ''}
6+
spec.authors = ''
7+
spec.license = ''
8+
spec.summary = 'UI test library for the NoteDelight app'
9+
spec.vendored_frameworks = 'build/cocoapods/framework/ui.framework'
10+
spec.libraries = 'c++'
11+
spec.ios.deployment_target = '14.0'
12+
spec.dependency 'SQLCipher', '4.9.0'
13+
if !Dir.exist?('build/cocoapods/framework/ui.framework') || Dir.empty?('build/cocoapods/framework/ui.framework')
14+
raise "
15+
Kotlin framework 'ui' doesn't exist yet, so a proper Xcode project can't be generated.
16+
'pod install' should be executed after running ':generateDummyFramework' Gradle task:
17+
./gradlew :core:test:ui:generateDummyFramework
18+
Alternatively, proper pod installation is performed during Gradle sync in the IDE (if Podfile location is set)"
19+
end
20+
spec.xcconfig = {
21+
'ENABLE_USER_SCRIPT_SANDBOXING' => 'NO',
22+
}
23+
spec.pod_target_xcconfig = {
24+
'KOTLIN_PROJECT_PATH' => ':core:test:ui',
25+
'PRODUCT_MODULE_NAME' => 'ui',
26+
}
27+
spec.script_phases = [
28+
{
29+
:name => 'Build ui',
30+
:execution_position => :before_compile,
31+
:shell_path => '/bin/sh',
32+
:script => <<-SCRIPT
33+
if [ "YES" = "$OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED" ]; then
34+
echo "Skipping Gradle build task invocation due to OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED environment variable set to \"YES\""
35+
exit 0
36+
fi
37+
set -ev
38+
REPO_ROOT="$PODS_TARGET_SRCROOT"
39+
"$REPO_ROOT/../../../gradlew" -p "$REPO_ROOT" $KOTLIN_PROJECT_PATH:syncFramework \
40+
-Pkotlin.native.cocoapods.platform=$PLATFORM_NAME \
41+
-Pkotlin.native.cocoapods.archs="$ARCHS" \
42+
-Pkotlin.native.cocoapods.configuration="$CONFIGURATION"
43+
SCRIPT
44+
}
45+
]
46+
spec.resources = ['build/compose/cocoapods/compose-resources']
47+
end

core/ui/ui.podspec

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
Pod::Spec.new do |spec|
2+
spec.name = 'ui'
3+
spec.version = '1.0'
4+
spec.homepage = 'https://github.com/softartdev/NoteDelight'
5+
spec.source = { :http=> ''}
6+
spec.authors = ''
7+
spec.license = ''
8+
spec.summary = 'Shared library for the NoteDelight app'
9+
spec.vendored_frameworks = 'build/cocoapods/framework/ui.framework'
10+
spec.libraries = 'c++'
11+
spec.ios.deployment_target = '14.0'
12+
spec.dependency 'SQLCipher', '4.9.0'
13+
if !Dir.exist?('build/cocoapods/framework/ui.framework') || Dir.empty?('build/cocoapods/framework/ui.framework')
14+
raise "
15+
Kotlin framework 'ui' doesn't exist yet, so a proper Xcode project can't be generated.
16+
'pod install' should be executed after running ':generateDummyFramework' Gradle task:
17+
./gradlew :core:ui:generateDummyFramework
18+
Alternatively, proper pod installation is performed during Gradle sync in the IDE (if Podfile location is set)"
19+
end
20+
spec.xcconfig = {
21+
'ENABLE_USER_SCRIPT_SANDBOXING' => 'NO',
22+
}
23+
spec.pod_target_xcconfig = {
24+
'KOTLIN_PROJECT_PATH' => ':core:ui',
25+
'PRODUCT_MODULE_NAME' => 'ui',
26+
}
27+
spec.script_phases = [
28+
{
29+
:name => 'Build ui',
30+
:execution_position => :before_compile,
31+
:shell_path => '/bin/sh',
32+
:script => <<-SCRIPT
33+
if [ "YES" = "$OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED" ]; then
34+
echo "Skipping Gradle build task invocation due to OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED environment variable set to \"YES\""
35+
exit 0
36+
fi
37+
set -ev
38+
REPO_ROOT="$PODS_TARGET_SRCROOT"
39+
"$REPO_ROOT/../../gradlew" -p "$REPO_ROOT" $KOTLIN_PROJECT_PATH:syncFramework \
40+
-Pkotlin.native.cocoapods.platform=$PLATFORM_NAME \
41+
-Pkotlin.native.cocoapods.archs="$ARCHS" \
42+
-Pkotlin.native.cocoapods.configuration="$CONFIGURATION"
43+
SCRIPT
44+
}
45+
]
46+
spec.resources = ['build/compose/cocoapods/compose-resources']
47+
end

gradle/libs.versions.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[versions]
22
jdk = "17"
33
agp = "9.2.0"
4-
kotlin = "2.3.20"
4+
kotlin = "2.3.21"
55
compileSdk = "37"
66
targetSdk = "37"
77
minSdk = "23"
@@ -28,7 +28,7 @@ androidxViewModel = "2.10.0"
2828
androidxNavigation = "2.9.2"
2929
androidxNavigationEvent = "1.0.1"
3030
androidxActivityCompose = "1.13.0"
31-
androidxComposeTest = "1.10.6"
31+
androidxComposeTest = "1.11.0"
3232
androidxCoreSplashscreen = "1.2.0"
3333
androidxTracing = "1.3.0"
3434
androidxLifecycle = "2.10.0"
@@ -46,7 +46,7 @@ espresso = "3.7.0"
4646
desugar = "2.1.5"
4747
androidSecurityLint = "1.0.4"
4848
appdirs = "1.5.0"
49-
uiTooling = "1.10.6"
49+
uiTooling = "1.11.0"
5050
download = "5.7.0"
5151
okio = "3.17.0"
5252
accompanist-permissions = "0.37.3"

0 commit comments

Comments
 (0)