-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Simplify resource management for iOS #3340
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Introduces new a new task 'sync<FRAMEWORK_CLASSIFIER>ComposeIosResources', which collects resources from all source sets, included in iOS targets. With this change: * CocoaPods integration does not require any configuration or calling 'pod install' after changing resources. * Important: existing projects need to remove 'extraSpecAttributes["resources"] = ...' from build scripts, and rerun `./gradlew podInstall` once! * Without CocoaPods, the resource directory should be added to XCode build phases once. Resolves #3073 Resolves #3113 Resolves #3066
pjBooms
requested changes
Jul 13, 2023
...main/kotlin/org/jetbrains/compose/experimental/uikit/tasks/SyncComposeResourcesForIosTask.kt
Outdated
Show resolved
Hide resolved
...main/kotlin/org/jetbrains/compose/experimental/uikit/tasks/SyncComposeResourcesForIosTask.kt
Outdated
Show resolved
Hide resolved
|
pjBooms
requested changes
Jul 14, 2023
components/resources/library/src/iosMain/kotlin/org/jetbrains/compose/resources/Resource.ios.kt
Show resolved
Hide resolved
dima-avdeev-jb
approved these changes
Jul 14, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checked in this branch: #3351
Thanks, it works!!!
AlexeyTsvetkov
force-pushed
the
ios-resources-sync
branch
from
July 17, 2023 11:49
208dd76
to
3d13a16
Compare
pjBooms
reviewed
Jul 18, 2023
components/gradle.properties
Outdated
@@ -5,7 +5,7 @@ kotlin.code.style=official | |||
# __KOTLIN_COMPOSE_VERSION__ | |||
kotlin.version=1.8.20 | |||
# __LATEST_COMPOSE_RELEASE_VERSION__ | |||
compose.version=1.4.1 | |||
compose.version=0.0.0-dev1099 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change this to beta release version after release
pjBooms
requested changes
Jul 18, 2023
...main/kotlin/org/jetbrains/compose/experimental/uikit/tasks/SyncComposeResourcesForIosTask.kt
Outdated
Show resolved
Hide resolved
pjBooms
approved these changes
Jul 18, 2023
j-roskopf
added a commit
to j-roskopf/SyncSphere
that referenced
this pull request
Nov 15, 2023
followed JetBrains/compose-multiplatform#3340 manually removed all other referecnes to cocoapods + pods related build code update ios run target in AS
j-roskopf
added a commit
to j-roskopf/SyncSphere
that referenced
this pull request
Nov 15, 2023
followed JetBrains/compose-multiplatform#3340 manually removed all other referecnes to cocoapods + pods related build code update ios run target in AS
j-roskopf
added a commit
to j-roskopf/SyncSphere
that referenced
this pull request
Nov 15, 2023
followed JetBrains/compose-multiplatform#3340 manually removed all other referecnes to cocoapods + pods related build code update ios run target in AS Co-authored-by: Joe Roskopf <joseph.thomas.roskopf@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
With this change:
src/<SOURCE_SET_INCLUDED_IN_IOS_COMPILATION>/resources
are copied to the application bundle without any additional configuration;podInstall
after modifying resources is not required. It is still required to runpodInstall
once, check the instruction below for details.Known limitation
Configuring Cocoapods
extraSpecAttributes["resources"] = ...
from your Gradle build script:podInstall
task once!Configuring regular frameworks
If your XCode project already has a run phase
./gradlew :shared:embedAndSignAppleFrameworkForXcode
, no additional configuration is required.Converting Cocoapods configuration to regular framework
:shared
Gradle module.pod deintegrate <PATH_TO_XCODEPROJ_FILE>
in the terminal:framework
configuration fromcocoapods
to the iOS targets configuration.cocoapods
section, and the usage oforg.jetbrains.kotlin.native.cocoapods
plugin from plugins block.embedAndSign
Gradle task in the new run phase:Resolves:
pod install
#3113