forked from altstoreio/AltKit
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from SideStore/feature/swiftall
Convert to full swift
- Loading branch information
Showing
33 changed files
with
1,226 additions
and
1,040 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# CODEOWNERS | ||
# Lines starting with '#' are comments. | ||
# Each line is a file pattern followed by one or more owners. | ||
# https://help.github.com/en/articles/about-code-owners | ||
|
||
# These owners will be the default owners for everything in the repo. | ||
* @JoeMatt |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# These are supported funding model platforms | ||
|
||
github: [JoeMatt] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] | ||
patreon: # Replace with a single Patreon username | ||
open_collective: provenanceemu # Replace with a single Open Collective username | ||
ko_fi: # Replace with a single Ko-fi username | ||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel | ||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry | ||
liberapay: # Replace with a single Liberapay username | ||
issuehunt: # Replace with a single IssueHunt username | ||
otechie: # Replace with a single Otechie username | ||
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Set to true to add reviewers to pull requests | ||
addReviewers: true | ||
|
||
# Set to true to add assignees to pull requests | ||
addAssignees: false | ||
|
||
# A list of reviewers to be added to pull requests (GitHub user name) | ||
reviewers: | ||
- JoeMatt | ||
|
||
# A number of reviewers added to the pull request | ||
# Set 0 to add all the reviewers (default: 0) | ||
numberOfReviewers: 0 | ||
|
||
# A list of assignees, overrides reviewers if set | ||
# assignees: | ||
|
||
# A number of assignees to add to the pull request | ||
# Set to 0 to add all of the assignees. | ||
# Uses numberOfReviewers if unset. | ||
numberOfAssignees: 1 | ||
|
||
# A list of keywords to be skipped the process that add reviewers if pull requests include it | ||
skipKeywords: | ||
- wip | ||
- WIP |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<!-- | ||
ℹ We use Github issues for bug reports, feature requests, general support, and questions about the library. | ||
Please fill out this template when filing an issue. | ||
--> | ||
|
||
## What did you do? | ||
|
||
<!-- Please replace this with what you did. --> | ||
|
||
## What did you expect to happen? | ||
|
||
<!-- Please replace this with what you expected to happen. --> | ||
|
||
## What happened instead? | ||
|
||
<!-- Please replace this with of what happened instead. --> | ||
|
||
## General Information | ||
|
||
- Hero Version: | ||
|
||
- iOS Version(s): | ||
|
||
- Swift Version: | ||
|
||
- Devices/Simulators: | ||
|
||
- Reproducible in Examples? (Yes/No): | ||
|
||
## Demo Project | ||
|
||
<!-- Please link to or upload a project we can download that reproduces the issue. --> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Number of days of inactivity before an issue becomes stale | ||
daysUntilStale: 180 | ||
# Number of days of inactivity before a stale issue is closed | ||
daysUntilClose: 7 | ||
# Issues with these labels will never be considered stale | ||
exemptLabels: | ||
- pinned | ||
- security | ||
- confirmed bug | ||
- investigating | ||
- bug? | ||
- WIP | ||
# Label to use when marking an issue as stale | ||
staleLabel: stale | ||
# Comment to post when marking an issue as stale. Set to `false` to disable | ||
markComment: > | ||
This issue has been automatically marked as stale because it has not had | ||
recent activity. It will be closed if no further activity occurs. Thank you | ||
for your contributions. | ||
# Comment to post when closing a stale issue. Set to `false` to disable | ||
closeComment: true | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Rebase PR branch when someone comments /rebase | ||
on: | ||
issue_comment: | ||
types: [created] | ||
name: Automatic Rebase | ||
jobs: | ||
rebase: | ||
name: Rebase | ||
if: contains(github.event.comment.body, '/rebase') | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: Automatic Rebase | ||
uses: cirrus-actions/rebase@master | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Swift Lint | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- '.github/workflows/swiftlint.yml' | ||
- '.swiftlint.yml' | ||
- '**/*.swift' | ||
|
||
jobs: | ||
swift-lint: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: GitHub Action for SwiftLint | ||
uses: norio-nomura/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
DIFF_BASE: ${{ github.base_ref }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Unit Test | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- "**.swift" | ||
- "**.xcodeproj" | ||
- "**.m" | ||
- "**.h" | ||
- "**.podspec" | ||
- "Podfile" | ||
- "Podfile.lock" | ||
- "test.yml" | ||
jobs: | ||
swiftpm: | ||
name: Test iOS (swiftpm) | ||
runs-on: macOS-latest | ||
env: | ||
DEVELOPER_DIR: /Applications/Xcode_14.2.app/Contents/Developer | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@master | ||
|
||
- name: iOS - Swift PM | ||
run: | | ||
set -o pipefail && swift test --parallel | xcpretty -c --test --color --report junit --output build/reports/junit.xml --report html --output build/reports/html | ||
- name: Upload Test Results | ||
uses: actions/upload-artifact@v2 | ||
if: always() | ||
with: | ||
name: Test Results | ||
path: build/reports | ||
|
||
- name: Upload Coverage Results | ||
uses: actions/upload-artifact@v2 | ||
if: always() | ||
with: | ||
name: Coverage Results | ||
path: build/coverage | ||
|
||
- name: Upload Logs | ||
uses: actions/upload-artifact@v2 | ||
if: always() | ||
with: | ||
name: Logs | ||
path: build/logs |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,4 @@ | |
xcuserdata/ | ||
DerivedData/ | ||
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata | ||
/build |
8 changes: 8 additions & 0 deletions
8
.swiftpm/xcode/package.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded</key> | ||
<true/> | ||
</dict> | ||
</plist> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,38 @@ | ||
cmake_minimum_required(VERSION 3.15.1) | ||
|
||
project(AltKit LANGUAGES C Swift) | ||
project(SideKit LANGUAGES Swift) | ||
|
||
add_library(CAltKit | ||
Sources/CAltKit/NSError+ALTServerError.h | ||
Sources/CAltKit/NSError+ALTServerError.m | ||
) | ||
add_library(SideKit | ||
Sources/SideKit/Extensions/ALTServerError+Conveniences.swift | ||
Sources/SideKit/Extensions/Result+Conveniences.swift | ||
|
||
add_library(AltKit | ||
Sources/AltKit/Extensions/ALTServerError+Conveniences.swift | ||
Sources/AltKit/Extensions/Result+Conveniences.swift | ||
Sources/SideKit/Errors/ALTServerError.swift | ||
Sources/SideKit/Errors/ALTServerError+NSError.swift | ||
Sources/SideKit/Errors/ALTServerConnectionError.swift | ||
Sources/SideKit/Errors/ALTServerConnectionError+NSError.swift | ||
|
||
Sources/AltKit/Server/Connection.swift | ||
Sources/AltKit/Server/NetworkConnection.swift | ||
Sources/AltKit/Server/Server.swift | ||
Sources/AltKit/Server/ServerConnection.swift | ||
Sources/AltKit/Server/ServerManager.swift | ||
Sources/AltKit/Server/ServerProtocol.swift | ||
Sources/SideKit/Server/Connection.swift | ||
Sources/SideKit/Server/NetworkConnection.swift | ||
Sources/SideKit/Server/Server.swift | ||
Sources/SideKit/Server/ServerConnection.swift | ||
Sources/SideKit/Server/ServerManager.swift | ||
Sources/SideKit/Server/ServerProtocol.swift | ||
|
||
Sources/AltKit/Types/CodableServerError.swift | ||
Sources/SideKit/Types/CodableServerError.swift | ||
) | ||
|
||
target_link_libraries(AltKit PRIVATE CAltKit) | ||
target_link_libraries(SideKit PRIVATE CSideKit) | ||
|
||
set_property(TARGET AltKit PROPERTY XCODE_ATTRIBUTE_SWIFT_VERSION "5.0") | ||
set_property(TARGET SideKit PROPERTY XCODE_ATTRIBUTE_SWIFT_VERSION "5.0") | ||
|
||
# Make CAltKit's modulemap available to AltKit | ||
set_property(TARGET AltKit PROPERTY XCODE_ATTRIBUTE_SWIFT_INCLUDE_PATHS "${CMAKE_CURRENT_SOURCE_DIR}/Sources/CAltKit") | ||
# Make CSideKit's modulemap available to SideKit | ||
set_property(TARGET SideKit PROPERTY XCODE_ATTRIBUTE_SWIFT_INCLUDE_PATHS "${CMAKE_CURRENT_SOURCE_DIR}/Sources/CSideKit") | ||
|
||
# Add binary dir to interface include path to make Swift header accessible to targets using AltKit | ||
target_include_directories(AltKit INTERFACE ${CMAKE_CURRENT_BINARY_DIR}) | ||
# Add binary dir to interface include path to make Swift header accessible to targets using SideKit | ||
target_include_directories(SideKit INTERFACE ${CMAKE_CURRENT_BINARY_DIR}) | ||
|
||
# Copy generated Swift header to binary dir | ||
add_custom_command(TARGET AltKit | ||
add_custom_command(TARGET SideKit | ||
POST_BUILD | ||
COMMAND cp $DERIVED_SOURCES_DIR/AltKit-Swift.h ${CMAKE_CURRENT_BINARY_DIR} | ||
COMMAND cp $DERIVED_SOURCES_DIR/SideKit-Swift.h ${CMAKE_CURRENT_BINARY_DIR} | ||
) |
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
38 changes: 0 additions & 38 deletions
38
Sources/AltKit/Extensions/ALTServerError+Conveniences.swift
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.