-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(sdds-icore): added generation of assets
- Loading branch information
Showing
8 changed files
with
744 additions
and
6 deletions.
There are no files selected for viewing
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,38 @@ | ||
// swiftlint:disable all | ||
// Generated using SwiftGen — https://github.com/SwiftGen/SwiftGen | ||
|
||
|
||
#if os(iOS) | ||
import UIKit | ||
#elseif os(tvOS) || os(watchOS) | ||
import UIKit | ||
#endif | ||
#if canImport(SwiftUI) | ||
import SwiftUI | ||
#endif | ||
|
||
// Deprecated typealiases | ||
|
||
// swiftlint:disable superfluous_disable_command file_length implicit_return | ||
|
||
// MARK: - Asset Catalogs | ||
|
||
// swiftlint:disable identifier_name line_length nesting type_body_length type_name | ||
public enum Asset { | ||
} | ||
// swiftlint:enable identifier_name line_length nesting type_body_length type_name | ||
|
||
// MARK: - Implementation Details | ||
|
||
// swiftlint:disable convenience_type | ||
private final class BundleToken { | ||
static let bundle: Bundle = { | ||
#if SWIFT_PACKAGE | ||
return Bundle.module | ||
#else | ||
return Bundle(for: BundleToken.self) | ||
#endif | ||
}() | ||
} | ||
// swiftlint:enable convenience_type | ||
|
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,21 @@ | ||
MIT License | ||
|
||
Copyright (c) Salute Devices | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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
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,6 @@ | ||
{ | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
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,45 @@ | ||
#!/bin/bash | ||
|
||
PROJECT_ROOT_DIR="$(dirname "$0")/.." | ||
PROJECT_ROOT_DIR=$(cd "$PROJECT_ROOT_DIR" && pwd) | ||
echo "Root directory is ${PROJECT_ROOT_DIR}" | ||
|
||
BUILD_FOLDER="build" | ||
BUILD_PATH="${PROJECT_ROOT_DIR}/${BUILD_FOLDER}" | ||
|
||
echo "Artefacts will appear in ${BUILD_PATH}" | ||
|
||
rm -rf "${BUILD_PATH}" | ||
mkdir -p "${BUILD_PATH}" | ||
|
||
SCHEME="SDDSIcons" | ||
|
||
echo "Building XCFrameworks for ${SCHEME}" | ||
|
||
XCODE_PROJECT_PATH="${PROJECT_ROOT_DIR}/${SCHEME}.xcodeproj" | ||
|
||
echo "Building XCFramework for the scheme $SCHEME" | ||
|
||
echo "Making an archive for iOS device..." | ||
iOS_ARCHIVE_PATH="${BUILD_PATH}/${SCHEME}-iphoneos.xcarchive" | ||
SKIP_LINT=YES xcodebuild archive -project ${XCODE_PROJECT_PATH} -scheme ${SCHEME} -archivePath "${iOS_ARCHIVE_PATH}" -sdk iphoneos SKIP_INSTALL=NO BUILD_LIBRARIES_FOR_DISTRIBUTION=YES | ||
|
||
echo "Making an archive for iOS simulator..." | ||
iOS_SIMULATOR_ARCHIVE_PATH="${BUILD_PATH}/${SCHEME}-iossimulator.xcarchive" | ||
SKIP_LINT=YES xcodebuild archive -project ${XCODE_PROJECT_PATH} -scheme ${SCHEME} -archivePath "${iOS_SIMULATOR_ARCHIVE_PATH}" -sdk iphonesimulator SKIP_INSTALL=NO BUILD_LIBRARIES_FOR_DISTRIBUTION=YES | ||
|
||
echo "Making XCFramework..." | ||
SKIP_LINT=YES xcodebuild -create-xcframework -framework "${BUILD_PATH}/${SCHEME}-iphoneos.xcarchive/Products/Library/Frameworks/${SCHEME}.framework" -framework "${BUILD_PATH}/${SCHEME}-iossimulator.xcarchive/Products/Library/Frameworks/${SCHEME}.framework" -output "${BUILD_PATH}/${SCHEME}.xcframework" | ||
|
||
if [ $? -ne 0 ]; then | ||
echo "Build failed for the scheme $SCHEME." | ||
exit 1 | ||
else | ||
echo "Build succeeded for the scheme $SCHEME" | ||
fi | ||
|
||
echo "Cleaning up archives..." | ||
rm -rf "${iOS_ARCHIVE_PATH}" | ||
rm -rf "${iOS_SIMULATOR_ARCHIVE_PATH}" | ||
|
||
echo "All builds succeeded" |
Oops, something went wrong.