Просмотр исходного кода

Xcode 12 and SwiftPM enhancements

Robert Payne 5 лет назад
Родитель
Сommit
18608ead65
42 измененных файлов с 20 добавлено и 49 удалено
  1. 1 1
      Package.swift
  2. 18 20
      SnapKit.xcodeproj/project.pbxproj
  3. 1 1
      SnapKit.xcodeproj/xcshareddata/xcschemes/SnapKit.xcscheme
  4. 0 27
      Source/SnapKit.h
  5. 0 0
      Sources/Constraint.swift
  6. 0 0
      Sources/ConstraintAttributes.swift
  7. 0 0
      Sources/ConstraintConfig.swift
  8. 0 0
      Sources/ConstraintConstantTarget.swift
  9. 0 0
      Sources/ConstraintDSL.swift
  10. 0 0
      Sources/ConstraintDescription.swift
  11. 0 0
      Sources/ConstraintDirectionalInsetTarget.swift
  12. 0 0
      Sources/ConstraintDirectionalInsets.swift
  13. 0 0
      Sources/ConstraintInsetTarget.swift
  14. 0 0
      Sources/ConstraintInsets.swift
  15. 0 0
      Sources/ConstraintItem.swift
  16. 0 0
      Sources/ConstraintLayoutGuide+Extensions.swift
  17. 0 0
      Sources/ConstraintLayoutGuide.swift
  18. 0 0
      Sources/ConstraintLayoutGuideDSL.swift
  19. 0 0
      Sources/ConstraintLayoutSupport.swift
  20. 0 0
      Sources/ConstraintLayoutSupportDSL.swift
  21. 0 0
      Sources/ConstraintMaker.swift
  22. 0 0
      Sources/ConstraintMakerEditable.swift
  23. 0 0
      Sources/ConstraintMakerExtendable.swift
  24. 0 0
      Sources/ConstraintMakerFinalizable.swift
  25. 0 0
      Sources/ConstraintMakerPriortizable.swift
  26. 0 0
      Sources/ConstraintMakerRelatable+Extensions.swift
  27. 0 0
      Sources/ConstraintMakerRelatable.swift
  28. 0 0
      Sources/ConstraintMultiplierTarget.swift
  29. 0 0
      Sources/ConstraintOffsetTarget.swift
  30. 0 0
      Sources/ConstraintPriority.swift
  31. 0 0
      Sources/ConstraintPriorityTarget.swift
  32. 0 0
      Sources/ConstraintRelatableTarget.swift
  33. 0 0
      Sources/ConstraintRelation.swift
  34. 0 0
      Sources/ConstraintView+Extensions.swift
  35. 0 0
      Sources/ConstraintView.swift
  36. 0 0
      Sources/ConstraintViewDSL.swift
  37. 0 0
      Sources/Debugging.swift
  38. 0 0
      Sources/LayoutConstraint.swift
  39. 0 0
      Sources/LayoutConstraintItem.swift
  40. 0 0
      Sources/Typealiases.swift
  41. 0 0
      Sources/UILayoutSupport+Extensions.swift
  42. 0 0
      Supporting Files/Info.plist

+ 1 - 1
Package.swift

@@ -36,7 +36,7 @@ let package = Package(
         .library(name: "SnapKit", targets: ["SnapKit"]),
     ],
     targets: [
-        .target(name: "SnapKit", path: "Source"),
+        .target(name: "SnapKit", path: "Sources"),
         .testTarget(name: "SnapKitTests", dependencies: ["SnapKit"]),
     ],
     swiftLanguageVersions: [

+ 18 - 20
SnapKit.xcodeproj/project.pbxproj

@@ -39,7 +39,6 @@
 		EE4910991B19A40200A54F1F /* SnapKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EEBCC9D819CC627D0083B827 /* SnapKit.framework */; };
 		EE6087751E4F133E0029CF84 /* ConstraintPriority.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE6087741E4F133E0029CF84 /* ConstraintPriority.swift */; };
 		EE6898CB1DA7B3A100D47F33 /* LayoutConstraintItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE6898CA1DA7B3A100D47F33 /* LayoutConstraintItem.swift */; };
-		EECDB3741AC0C9B6006BBC11 /* SnapKit.h in Headers */ = {isa = PBXBuildFile; fileRef = EECDB3661AC0C95C006BBC11 /* SnapKit.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		EECDB3931AC0CB52006BBC11 /* Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = EECDB36A1AC0C95C006BBC11 /* Tests.swift */; };
 		EEF68F9E1D78492400980C26 /* ConstraintLayoutGuideDSL.swift in Sources */ = {isa = PBXBuildFile; fileRef = EEF68F9D1D78492400980C26 /* ConstraintLayoutGuideDSL.swift */; };
 		EEF68FA61D784A5300980C26 /* ConstraintDSL.swift in Sources */ = {isa = PBXBuildFile; fileRef = EEF68FA51D784A5300980C26 /* ConstraintDSL.swift */; };
@@ -82,12 +81,11 @@
 		EE235FC61C5785E200C08960 /* ConstraintView+Extensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "ConstraintView+Extensions.swift"; sourceTree = "<group>"; };
 		EE6087741E4F133E0029CF84 /* ConstraintPriority.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ConstraintPriority.swift; sourceTree = "<group>"; };
 		EE6898CA1DA7B3A100D47F33 /* LayoutConstraintItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LayoutConstraintItem.swift; sourceTree = "<group>"; };
+		EE6DB559251D9A6B00E0C374 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
 		EE94F6081AC0F10A008767FF /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
 		EE94F60A1AC0F10F008767FF /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/System/Library/Frameworks/AppKit.framework; sourceTree = DEVELOPER_DIR; };
 		EEBCC9D819CC627D0083B827 /* SnapKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SnapKit.framework; sourceTree = BUILT_PRODUCTS_DIR; };
 		EEBCC9E219CC627E0083B827 /* SnapKit Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "SnapKit Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
-		EECDB3641AC0C95C006BBC11 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
-		EECDB3661AC0C95C006BBC11 /* SnapKit.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SnapKit.h; sourceTree = "<group>"; };
 		EECDB3691AC0C95C006BBC11 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = SnapKitTests/Info.plist; sourceTree = "<group>"; };
 		EECDB36A1AC0C95C006BBC11 /* Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = Tests.swift; path = SnapKitTests/Tests.swift; sourceTree = "<group>"; };
 		EEF68F9D1D78492400980C26 /* ConstraintLayoutGuideDSL.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ConstraintLayoutGuideDSL.swift; sourceTree = "<group>"; };
@@ -120,7 +118,8 @@
 		DDC9FD8C1981B4DD009612C7 = {
 			isa = PBXGroup;
 			children = (
-				EECDB35D1AC0C95C006BBC11 /* Source */,
+				EE6DB557251D9A6B00E0C374 /* Supporting Files */,
+				EECDB35D1AC0C95C006BBC11 /* Sources */,
 				EE94F60C1AC0F113008767FF /* Frameworks */,
 				DDC9FD961981B4DD009612C7 /* Products */,
 			);
@@ -214,6 +213,14 @@
 			name = Debugging;
 			sourceTree = "<group>";
 		};
+		EE6DB557251D9A6B00E0C374 /* Supporting Files */ = {
+			isa = PBXGroup;
+			children = (
+				EE6DB559251D9A6B00E0C374 /* Info.plist */,
+			);
+			path = "Supporting Files";
+			sourceTree = "<group>";
+		};
 		EE94F60C1AC0F113008767FF /* Frameworks */ = {
 			isa = PBXGroup;
 			children = (
@@ -224,20 +231,18 @@
 			name = Frameworks;
 			sourceTree = "<group>";
 		};
-		EECDB35D1AC0C95C006BBC11 /* Source */ = {
+		EECDB35D1AC0C95C006BBC11 /* Sources */ = {
 			isa = PBXGroup;
 			children = (
-				EECDB3661AC0C95C006BBC11 /* SnapKit.h */,
 				EE235F581C57858700C08960 /* Extensions */,
 				EE235F591C57859200C08960 /* DSLs */,
 				EE235F5A1C57859900C08960 /* Maker */,
 				EE235F5B1C57859E00C08960 /* Targets */,
 				EE235F5C1C5785A400C08960 /* Models */,
 				EE235F5D1C5785AC00C08960 /* Debugging */,
-				EECDB36B1AC0C967006BBC11 /* Supporting Files */,
 				EECDB3681AC0C95C006BBC11 /* Tests */,
 			);
-			path = Source;
+			path = Sources;
 			sourceTree = "<group>";
 		};
 		EECDB3681AC0C95C006BBC11 /* Tests */ = {
@@ -250,14 +255,6 @@
 			path = ../Tests;
 			sourceTree = "<group>";
 		};
-		EECDB36B1AC0C967006BBC11 /* Supporting Files */ = {
-			isa = PBXGroup;
-			children = (
-				EECDB3641AC0C95C006BBC11 /* Info.plist */,
-			);
-			name = "Supporting Files";
-			sourceTree = "<group>";
-		};
 /* End PBXGroup section */
 
 /* Begin PBXHeadersBuildPhase section */
@@ -265,7 +262,6 @@
 			isa = PBXHeadersBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				EECDB3741AC0C9B6006BBC11 /* SnapKit.h in Headers */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -314,7 +310,7 @@
 			isa = PBXProject;
 			attributes = {
 				LastSwiftUpdateCheck = 0720;
-				LastUpgradeCheck = 1100;
+				LastUpgradeCheck = 1200;
 				ORGANIZATIONNAME = "SnapKit Team";
 				TargetAttributes = {
 					EEBCC9D719CC627D0083B827 = {
@@ -443,6 +439,7 @@
 				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;
@@ -503,6 +500,7 @@
 				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;
@@ -539,7 +537,7 @@
 				CURRENT_PROJECT_VERSION = 1.0.0;
 				DEFINES_MODULE = YES;
 				DYLIB_INSTALL_NAME_BASE = "@rpath";
-				INFOPLIST_FILE = "$(SRCROOT)/Source/Info.plist";
+				INFOPLIST_FILE = "$(SRCROOT)/Supporting Files/Info.plist";
 				IPHONEOS_DEPLOYMENT_TARGET = 10.0;
 				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
 				MACOSX_DEPLOYMENT_TARGET = 10.11;
@@ -562,7 +560,7 @@
 				CURRENT_PROJECT_VERSION = 1.0.0;
 				DEFINES_MODULE = YES;
 				DYLIB_INSTALL_NAME_BASE = "@rpath";
-				INFOPLIST_FILE = "$(SRCROOT)/Source/Info.plist";
+				INFOPLIST_FILE = "$(SRCROOT)/Supporting Files/Info.plist";
 				IPHONEOS_DEPLOYMENT_TARGET = 10.0;
 				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
 				MACOSX_DEPLOYMENT_TARGET = 10.11;

+ 1 - 1
SnapKit.xcodeproj/xcshareddata/xcschemes/SnapKit.xcscheme

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <Scheme
-   LastUpgradeVersion = "1100"
+   LastUpgradeVersion = "1200"
    version = "1.3">
    <BuildAction
       parallelizeBuildables = "YES"

+ 0 - 27
Source/SnapKit.h

@@ -1,27 +0,0 @@
-//
-//  SnapKit
-//
-//  Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit
-//
-//  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.
-
-#import <Foundation/Foundation.h>
-
-FOUNDATION_EXPORT double SnapKitVersionNumber;
-FOUNDATION_EXPORT const unsigned char SnapKitVersionString[];

+ 0 - 0
Source/Constraint.swift → Sources/Constraint.swift


+ 0 - 0
Source/ConstraintAttributes.swift → Sources/ConstraintAttributes.swift


+ 0 - 0
Source/ConstraintConfig.swift → Sources/ConstraintConfig.swift


+ 0 - 0
Source/ConstraintConstantTarget.swift → Sources/ConstraintConstantTarget.swift


+ 0 - 0
Source/ConstraintDSL.swift → Sources/ConstraintDSL.swift


+ 0 - 0
Source/ConstraintDescription.swift → Sources/ConstraintDescription.swift


+ 0 - 0
Source/ConstraintDirectionalInsetTarget.swift → Sources/ConstraintDirectionalInsetTarget.swift


+ 0 - 0
Source/ConstraintDirectionalInsets.swift → Sources/ConstraintDirectionalInsets.swift


+ 0 - 0
Source/ConstraintInsetTarget.swift → Sources/ConstraintInsetTarget.swift


+ 0 - 0
Source/ConstraintInsets.swift → Sources/ConstraintInsets.swift


+ 0 - 0
Source/ConstraintItem.swift → Sources/ConstraintItem.swift


+ 0 - 0
Source/ConstraintLayoutGuide+Extensions.swift → Sources/ConstraintLayoutGuide+Extensions.swift


+ 0 - 0
Source/ConstraintLayoutGuide.swift → Sources/ConstraintLayoutGuide.swift


+ 0 - 0
Source/ConstraintLayoutGuideDSL.swift → Sources/ConstraintLayoutGuideDSL.swift


+ 0 - 0
Source/ConstraintLayoutSupport.swift → Sources/ConstraintLayoutSupport.swift


+ 0 - 0
Source/ConstraintLayoutSupportDSL.swift → Sources/ConstraintLayoutSupportDSL.swift


+ 0 - 0
Source/ConstraintMaker.swift → Sources/ConstraintMaker.swift


+ 0 - 0
Source/ConstraintMakerEditable.swift → Sources/ConstraintMakerEditable.swift


+ 0 - 0
Source/ConstraintMakerExtendable.swift → Sources/ConstraintMakerExtendable.swift


+ 0 - 0
Source/ConstraintMakerFinalizable.swift → Sources/ConstraintMakerFinalizable.swift


+ 0 - 0
Source/ConstraintMakerPriortizable.swift → Sources/ConstraintMakerPriortizable.swift


+ 0 - 0
Source/ConstraintMakerRelatable+Extensions.swift → Sources/ConstraintMakerRelatable+Extensions.swift


+ 0 - 0
Source/ConstraintMakerRelatable.swift → Sources/ConstraintMakerRelatable.swift


+ 0 - 0
Source/ConstraintMultiplierTarget.swift → Sources/ConstraintMultiplierTarget.swift


+ 0 - 0
Source/ConstraintOffsetTarget.swift → Sources/ConstraintOffsetTarget.swift


+ 0 - 0
Source/ConstraintPriority.swift → Sources/ConstraintPriority.swift


+ 0 - 0
Source/ConstraintPriorityTarget.swift → Sources/ConstraintPriorityTarget.swift


+ 0 - 0
Source/ConstraintRelatableTarget.swift → Sources/ConstraintRelatableTarget.swift


+ 0 - 0
Source/ConstraintRelation.swift → Sources/ConstraintRelation.swift


+ 0 - 0
Source/ConstraintView+Extensions.swift → Sources/ConstraintView+Extensions.swift


+ 0 - 0
Source/ConstraintView.swift → Sources/ConstraintView.swift


+ 0 - 0
Source/ConstraintViewDSL.swift → Sources/ConstraintViewDSL.swift


+ 0 - 0
Source/Debugging.swift → Sources/Debugging.swift


+ 0 - 0
Source/LayoutConstraint.swift → Sources/LayoutConstraint.swift


+ 0 - 0
Source/LayoutConstraintItem.swift → Sources/LayoutConstraintItem.swift


+ 0 - 0
Source/Typealiases.swift → Sources/Typealiases.swift


+ 0 - 0
Source/UILayoutSupport+Extensions.swift → Sources/UILayoutSupport+Extensions.swift


+ 0 - 0
Source/Info.plist → Supporting Files/Info.plist