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

Add support for local/remote binary #52

Open
wants to merge 31 commits into
base: feature/external-dependencies-single-module-experimental
Choose a base branch
from

Conversation

frankois944
Copy link

Based on #47

Add the capability to use local and remote Binary

  • Test are updated
  • A local xcframework (for local) and a zipped (for remote) one is available in the resource folder or the test module.

The folder localBinarySample contains the Xcode project and a script to generate the testing framework.

For VersionRange, it's not possible to have a specific one
We need to try/cacth every swift step and print on the ouput the error, it's important for the user
All test are passing except local package
The local package need to be done
we can now use local path, some manual update has been done
all tests are passing
add new test for building and liking Firebase
using triple for specify the build target
you can set multiple product from a dependency like Firebase
need to duplicate the code of remote function
The exception is not forwarded correctly
check case when the list of packages have a empty string
add some comment for the versioning of package
update comment in interface
We can now set the toolsVersion from the plugin
By default, the command line uses the latest swift version available.
By at some cases, it can't work and a specific version need to be set.
It needs to be set at Warning Level or it will be considered as a Error.
set a non null default value for toolsVersion in CompileTask
rollback unwanted commit change
commit 166468f
Author: frankois <dabonot.francois@gmail.com>
Date:   Wed Nov 6 17:27:43 2024 +0100

    cleaning CompileSwiftTask

    moving all command for updating the manifest to CreatePackageSwift
update sed command for injecting the package
cleaning some code
the checksum is a mandatory value
update checksum
update build script
use template now
…l' of https://github.com/frankois944/swift-klib-plugin into swift-spm-local-remote-lib

# Conflicts:
#	plugin/src/functionalTest/kotlin/io/github/ttypic/swiftklib/gradle/SwiftPackageModulesTest.kt
#	plugin/src/main/kotlin/io/github/ttypic/swiftklib/gradle/api/SwiftPackageConfiguration.kt
#	plugin/src/main/kotlin/io/github/ttypic/swiftklib/gradle/internal/SwiftPackageConfigurationImpl.kt
#	plugin/src/main/kotlin/io/github/ttypic/swiftklib/gradle/task/CompileSwiftTask.kt
#	plugin/src/main/kotlin/io/github/ttypic/swiftklib/gradle/templates/CreatePackageSwift.kt
@frankois944
Copy link
Author

@IlyaGulya Done, the history is dirty, squash if you can :D

@IlyaGulya
Copy link
Collaborator

Hmm, I'm not sure I want binaries in the repo.
I think we could compile these frameworks during the test execution and put them where required

@IlyaGulya
Copy link
Collaborator

Also, I think it would be nice to use Xcodegen to avoid putting xcode project files into repo. They are not git-friendly =)

@frankois944
Copy link
Author

frankois944 commented Nov 28, 2024

Hmm, I'm not sure I want binaries in the repo. I think we could compile these frameworks during the test execution and put them where required

There are required for testing, especially the .zip one, it needs to be remotly available and have a valid checksum. It can't be done during the tests.
Both case are necessary and take a LOT of time to build.

@frankois944
Copy link
Author

frankois944 commented Nov 28, 2024

Also, I think it would be nice to use Xcodegen to avoid putting xcode project files into repo. They are not git-friendly =)

Using an external tools to manage the Xcode project will make thing more complicate to manage.
But yes, not git friendly, like every Apple project. But once it's inside the git, it won't move until we add more cases.

Just stay on the simplest way, I can also put the sample project in a zip to clean the history of the git, If you want.

@IlyaGulya
Copy link
Collaborator

Maybe we can use some community built binary framework for such tests?

@IlyaGulya
Copy link
Collaborator

Regarding the xcodeproj - i don't really see any specific reason to keep whole xcode project in the repo, when it can be easily generated by xcodegen.
It's clean and maintainable

name: DummyFramework
options:
  deploymentTarget:
    iOS: 12.0
    macOS: 11.0
    tvOS: 15.0
    watchOS: 8.0
  xcodeVersion: "16.1"
  preferredProjectObjectVersion: "77"

targets:
  DummyFramework:
    type: framework
    platform: [iOS, macOS, tvOS, watchOS]
    sources: 
      - DummyFramework
    settings:
      base:
        PRODUCT_BUNDLE_IDENTIFIER: com.dummy.DummyFramework
        BUILD_LIBRARY_FOR_DISTRIBUTION: YES
        SWIFT_INSTALL_OBJC_HEADER: NO
        DEFINES_MODULE: YES
        SWIFT_VERSION: 5.0
        CURRENT_PROJECT_VERSION: 1
        MARKETING_VERSION: 1.0
        SUPPORTS_MACCATALYST: YES
        SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD: YES
        SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD: NO
        DRIVERKIT_DEPLOYMENT_TARGET: 20.0
        SKIP_INSTALL: YES

@markst
Copy link
Contributor

markst commented Dec 11, 2024

May be relevant: PaGr0m/kotlin-spm-plugin#7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants