-
Notifications
You must be signed in to change notification settings - Fork 32
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
Improve SPM Integration, break into sub-modules 📦 #205
Conversation
Codecov Report
@@ Coverage Diff @@
## master #205 +/- ##
=======================================
Coverage 94.96% 94.96%
=======================================
Files 97 97
Lines 3254 3254
=======================================
Hits 3090 3090
Misses 164 164
Continue to review full report at Codecov.
|
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.
Looks great! 🚀 Minor 💄 comment
Regarding your questions, @portellaa:
Additionally, do you think we should add a stage on our pipeline to validate the SPM package description? |
a6432ea
to
98c77ca
Compare
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.
👌
## Changes - Fix `Package.swift` by prefixing target names with `Alicerce` since that's the name of the generated frameworks (to use in imports). - Add Alicerce package to the workspace, as well as targets for each SPM product (libraries). - Add necessary imports so that sub-modules are correctly imported if building sub-libraries.
98c77ca
to
b79d10a
Compare
Checklist
master
Motivation and Context
Since Swift Package Manager is becoming quite popular and Alicerce via CocoaPods supports subspecs, this is quite achievable with Swift Package Manager. It isn't very fancy, but at least is supported.
Description
So each module as it's own target which will be referenced by each
library
.The name of the target it's only visible in the xcode project and the library is what is exposed to the products of libraries that includes Alicerce.
That's why i have named each
library
with the prefixAlicerce
and gave the name of the module to the target.Regarding the Extensions, since SPM doesn't supports the same as CocoaPods supports - sub-subspecs - the only way to achieve that is using a
library
with the nameAlicerceExtensionsFoundation
, ...It would become something like:
Regarding the tests Target has
Objective-C
code, this is not supported by Swift Package Manager, as far as i know, i'm still investigating.One thing i can do is exclude the CoreData path, since this is the one that includes
Objective-C
code.EDIT: We are not adding support for Unit Tests via SPM for now, and will leave that as future work. CocoaPods is under the same situation.
All the suggestions are welcome, let's support modules on SPM 🚀
Additions
QuartzCore
extensions sub-sub-spec and merge them intoUIKit
extensions