commit 9e23e2ec91f3832dc1f05c9440c91905dcc5cd3a Author: Mamadou Elaphi ARAFA Date: Tue Jun 20 10:53:39 2023 +0200 Initial commit diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..ef114ee --- /dev/null +++ b/.drone.yml @@ -0,0 +1,22 @@ +kind: pipeline +type: docker +name: default + +trigger: + event: + - push + +steps: + - name: build + image: swift:latest + commands: + - cd Sources/HelloLibrary + - swift build + + - name: tests_Model + image: swift:latest + commands: + - cd Sources/HelloLibrary + - swift test + depends_on: [build] + \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8fb6036 --- /dev/null +++ b/.gitignore @@ -0,0 +1,120 @@ +# ---> Swift +# Xcode +# +# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore + +## User settings +xcuserdata/ + +## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9) +*.xcscmblueprint +*.xccheckout + +## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4) +build/ +DerivedData/ +*.moved-aside +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 + +## Obj-C/Swift specific +*.hmap + +## App packaging +*.ipa +*.dSYM.zip +*.dSYM + +## Playgrounds +timeline.xctimeline +playground.xcworkspace + +# Swift Package Manager +# +# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. +# Packages/ +# Package.pins +# Package.resolved +# *.xcodeproj +# +# Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata +# hence it is not needed unless you have added a package configuration file to your project +# .swiftpm + +.build/ + +# CocoaPods +# +# We recommend against adding the Pods directory to your .gitignore. However +# you should judge for yourself, the pros and cons are mentioned at: +# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control +# +# Pods/ +# +# Add this line if you want to avoid checking in source code from the Xcode workspace +# *.xcworkspace + +# Carthage +# +# Add this line if you want to avoid checking in source code from Carthage dependencies. +# Carthage/Checkouts + +Carthage/Build/ + +# Accio dependency management +Dependencies/ +.accio/ + +# fastlane +# +# It is recommended to not store the screenshots in the git repo. +# Instead, use fastlane to re-generate the screenshots whenever they are needed. +# For more information about the recommended setup visit: +# https://docs.fastlane.tools/best-practices/source-control/#source-control + +fastlane/report.xml +fastlane/Preview.html +fastlane/screenshots/**/*.png +fastlane/test_output + +# Code Injection +# +# After new code Injection tools there's a generated folder /iOSInjectionProject +# https://github.com/johnno1962/injectionforxcode + +iOSInjectionProject/ + +# ---> macOS +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + diff --git a/Documentation/doc_images/CodeFirst.png b/Documentation/doc_images/CodeFirst.png new file mode 100644 index 0000000..50c0a21 Binary files /dev/null and b/Documentation/doc_images/CodeFirst.png differ diff --git a/README.md b/README.md new file mode 100644 index 0000000..80e7dac --- /dev/null +++ b/README.md @@ -0,0 +1,10 @@ +[![Build Status](https://codefirst.ddns.net/api/badges/mamadou_elaphi.arafa/DepotswiftMvvm/status.svg)](https://codefirst.ddns.net/mamadou_elaphi.arafa/DepotswiftMvvm) + +# DepotswiftMvvm + +Welcome on the DepotswiftMvvm project! + + + +_Generated with a_ **Code#0** _template_ + \ No newline at end of file diff --git a/Sources/HelloCLT/HelloCLT.xcodeproj/project.pbxproj b/Sources/HelloCLT/HelloCLT.xcodeproj/project.pbxproj new file mode 100644 index 0000000..e92c528 --- /dev/null +++ b/Sources/HelloCLT/HelloCLT.xcodeproj/project.pbxproj @@ -0,0 +1,313 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 55; + objects = { + +/* Begin PBXBuildFile section */ + 6FC153182820EFB500D881F3 /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FC153172820EFB500D881F3 /* main.swift */; }; + 6FC153202820EFD800D881F3 /* HelloLibrary in Frameworks */ = {isa = PBXBuildFile; productRef = 6FC1531F2820EFD800D881F3 /* HelloLibrary */; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 6FC153122820EFB500D881F3 /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = /usr/share/man/man1/; + dstSubfolderSpec = 0; + files = ( + ); + runOnlyForDeploymentPostprocessing = 1; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 6FC153142820EFB500D881F3 /* HelloCLT */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = HelloCLT; sourceTree = BUILT_PRODUCTS_DIR; }; + 6FC153172820EFB500D881F3 /* main.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = main.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 6FC153112820EFB500D881F3 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 6FC153202820EFD800D881F3 /* HelloLibrary in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 6FC1530B2820EFB500D881F3 = { + isa = PBXGroup; + children = ( + 6FC153162820EFB500D881F3 /* HelloCLT */, + 6FC153152820EFB500D881F3 /* Products */, + 6FC1531E2820EFD800D881F3 /* Frameworks */, + ); + sourceTree = ""; + }; + 6FC153152820EFB500D881F3 /* Products */ = { + isa = PBXGroup; + children = ( + 6FC153142820EFB500D881F3 /* HelloCLT */, + ); + name = Products; + sourceTree = ""; + }; + 6FC153162820EFB500D881F3 /* HelloCLT */ = { + isa = PBXGroup; + children = ( + 6FC153172820EFB500D881F3 /* main.swift */, + ); + path = HelloCLT; + sourceTree = ""; + }; + 6FC1531E2820EFD800D881F3 /* Frameworks */ = { + isa = PBXGroup; + children = ( + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 6FC153132820EFB500D881F3 /* HelloCLT */ = { + isa = PBXNativeTarget; + buildConfigurationList = 6FC1531B2820EFB500D881F3 /* Build configuration list for PBXNativeTarget "HelloCLT" */; + buildPhases = ( + 6FC153102820EFB500D881F3 /* Sources */, + 6FC153112820EFB500D881F3 /* Frameworks */, + 6FC153122820EFB500D881F3 /* CopyFiles */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = HelloCLT; + packageProductDependencies = ( + 6FC1531F2820EFD800D881F3 /* HelloLibrary */, + ); + productName = HelloCLT; + productReference = 6FC153142820EFB500D881F3 /* HelloCLT */; + productType = "com.apple.product-type.tool"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 6FC1530C2820EFB500D881F3 /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastSwiftUpdateCheck = 1320; + LastUpgradeCheck = 1320; + TargetAttributes = { + 6FC153132820EFB500D881F3 = { + CreatedOnToolsVersion = 13.2.1; + }; + }; + }; + buildConfigurationList = 6FC1530F2820EFB500D881F3 /* Build configuration list for PBXProject "HelloCLT" */; + compatibilityVersion = "Xcode 13.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 6FC1530B2820EFB500D881F3; + productRefGroup = 6FC153152820EFB500D881F3 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 6FC153132820EFB500D881F3 /* HelloCLT */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + 6FC153102820EFB500D881F3 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 6FC153182820EFB500D881F3 /* main.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 6FC153192820EFB500D881F3 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 11.6; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 6FC1531A2820EFB500D881F3 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 11.6; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = macosx; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + }; + name = Release; + }; + 6FC1531C2820EFB500D881F3 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = 9NSYVG2S5B; + ENABLE_HARDENED_RUNTIME = YES; + PRODUCT_BUNDLE_IDENTIFIER = fr.uca.iut; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + }; + name = Debug; + }; + 6FC1531D2820EFB500D881F3 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = 9NSYVG2S5B; + ENABLE_HARDENED_RUNTIME = YES; + PRODUCT_BUNDLE_IDENTIFIER = fr.uca.iut; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 6FC1530F2820EFB500D881F3 /* Build configuration list for PBXProject "HelloCLT" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 6FC153192820EFB500D881F3 /* Debug */, + 6FC1531A2820EFB500D881F3 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 6FC1531B2820EFB500D881F3 /* Build configuration list for PBXNativeTarget "HelloCLT" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 6FC1531C2820EFB500D881F3 /* Debug */, + 6FC1531D2820EFB500D881F3 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + +/* Begin XCSwiftPackageProductDependency section */ + 6FC1531F2820EFD800D881F3 /* HelloLibrary */ = { + isa = XCSwiftPackageProductDependency; + productName = HelloLibrary; + }; +/* End XCSwiftPackageProductDependency section */ + }; + rootObject = 6FC1530C2820EFB500D881F3 /* Project object */; +} diff --git a/Sources/HelloCLT/HelloCLT/main.swift b/Sources/HelloCLT/HelloCLT/main.swift new file mode 100644 index 0000000..ce0a84d --- /dev/null +++ b/Sources/HelloCLT/HelloCLT/main.swift @@ -0,0 +1,14 @@ +// +// main.swift +// HelloCLT +// +// Created by Marc Chevaldonné on 03/05/2022. +// + +import HelloLibrary + +import Foundation + +let helloStruct = HelloStruct() +print(helloStruct.text) + diff --git a/Sources/HelloLibrary/.gitignore b/Sources/HelloLibrary/.gitignore new file mode 100644 index 0000000..bb460e7 --- /dev/null +++ b/Sources/HelloLibrary/.gitignore @@ -0,0 +1,7 @@ +.DS_Store +/.build +/Packages +/*.xcodeproj +xcuserdata/ +DerivedData/ +.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata diff --git a/Sources/HelloLibrary/Package.swift b/Sources/HelloLibrary/Package.swift new file mode 100644 index 0000000..ce5cb59 --- /dev/null +++ b/Sources/HelloLibrary/Package.swift @@ -0,0 +1,28 @@ +// swift-tools-version:5.5 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +import PackageDescription + +let package = Package( + name: "HelloLibrary", + products: [ + // Products define the executables and libraries a package produces, and make them visible to other packages. + .library( + name: "HelloLibrary", + targets: ["HelloLibrary"]), + ], + dependencies: [ + // Dependencies declare other packages that this package depends on. + // .package(url: /* package url */, from: "1.0.0"), + ], + targets: [ + // Targets are the basic building blocks of a package. A target can define a module or a test suite. + // Targets can depend on other targets in this package, and on products in packages this package depends on. + .target( + name: "HelloLibrary", + dependencies: []), + .testTarget( + name: "HelloLibraryTests", + dependencies: ["HelloLibrary"]), + ] +) diff --git a/Sources/HelloLibrary/README.md b/Sources/HelloLibrary/README.md new file mode 100644 index 0000000..5cdc795 --- /dev/null +++ b/Sources/HelloLibrary/README.md @@ -0,0 +1,3 @@ +# HelloLibrary + +A description of this package. diff --git a/Sources/HelloLibrary/Sources/HelloLibrary/HelloStruct.swift b/Sources/HelloLibrary/Sources/HelloLibrary/HelloStruct.swift new file mode 100644 index 0000000..9ebdb96 --- /dev/null +++ b/Sources/HelloLibrary/Sources/HelloLibrary/HelloStruct.swift @@ -0,0 +1,6 @@ +public struct HelloStruct { + public private(set) var text = "Hello, World!" + + public init() { + } +} diff --git a/Sources/HelloLibrary/Tests/HelloLibraryTests/HelloStructTests.swift b/Sources/HelloLibrary/Tests/HelloLibraryTests/HelloStructTests.swift new file mode 100644 index 0000000..13ca6f5 --- /dev/null +++ b/Sources/HelloLibrary/Tests/HelloLibraryTests/HelloStructTests.swift @@ -0,0 +1,11 @@ +import XCTest +@testable import HelloLibrary + +final class HelloStructTests: XCTestCase { + func testExample() throws { + // This is an example of a functional test case. + // Use XCTAssert and related functions to verify your tests produce the correct + // results. + XCTAssertEqual(HelloStruct().text, "Hello, World!") + } +} diff --git a/Sources/HelloWorkspace.xcworkspace/contents.xcworkspacedata b/Sources/HelloWorkspace.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..d8179a9 --- /dev/null +++ b/Sources/HelloWorkspace.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Sources/HelloWorkspace.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Sources/HelloWorkspace.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Sources/HelloWorkspace.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + +