Skip to content

Commit

Permalink
Merge pull request #32 from TamarMilchtaich/feature/tuist/nimble-to-t…
Browse files Browse the repository at this point in the history
…uist

Nimble: migrate to Tuist.
  • Loading branch information
barakwei authored Dec 4, 2024
2 parents 1c6587d + 7f42751 commit 442ee2d
Show file tree
Hide file tree
Showing 12 changed files with 1,155 additions and 1,177 deletions.
52 changes: 52 additions & 0 deletions Configurations/Common.xcconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
// Copyright (c) 2024 Lightricks. All rights reserved.

CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES
CLANG_CXX_LANGUAGE_STANDARD = gnu++0x
CLANG_CXX_LIBRARY = libc++
CLANG_ENABLE_MODULES = YES
CLANG_ENABLE_OBJC_ARC = YES
CLANG_MODULES_AUTOLINK = NO
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_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_UNREACHABLE_CODE = YES
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES

GCC_C_LANGUAGE_STANDARD = gnu99
GCC_NO_COMMON_BLOCKS = YES
GCC_WARN_64_TO_32_BIT_CONVERSION = YES
GCC_WARN_ABOUT_MISSING_NEWLINE = 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

ALWAYS_SEARCH_USER_PATHS = NO
APPLICATION_EXTENSION_API_ONLY = YES
CODE_SIGNING_REQUIRED = NO
CODE_SIGN_IDENTITY =
CURRENT_PROJECT_VERSION = 1
ENABLE_STRICT_OBJC_MSGSEND = YES
ENABLE_TESTING_SEARCH_PATHS = YES
OTHER_LDFLAGS = $(inherited) -Xlinker -no_application_extension
SDKROOT = macosx
SWIFT_SWIFT3_OBJC_INFERENCE = Off
SWIFT_VERSION = 5.0
VERSIONING_SYSTEM = apple-generic
VERSION_INFO_PREFIX =
15 changes: 15 additions & 0 deletions Configurations/Debug.xcconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Copyright (c) 2024 Lightricks. All rights reserved.

#include "Common.xcconfig"

GCC_DYNAMIC_NO_PIC = NO
GCC_OPTIMIZATION_LEVEL = 0
GCC_PREPROCESSOR_DEFINITIONS = DEBUG=1 $(inherited)
GCC_SYMBOLS_PRIVATE_EXTERN = NO

SWIFT_OPTIMIZATION_LEVEL = -Onone

ENABLE_TESTABILITY = YES
METAL_ENABLE_DEBUG_INFO = YES
ONLY_ACTIVE_ARCH = YES
COPY_PHASE_STRIP = NO
12 changes: 12 additions & 0 deletions Configurations/Release.xcconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Copyright (c) 2024 Lightricks. All rights reserved.

#include "Common.xcconfig"

SWIFT_COMPILATION_MODE = wholemodule
SWIFT_OPTIMIZATION_LEVEL = -O

COPY_PHASE_STRIP = YES
ENABLE_NS_ASSERTIONS = NO
METAL_ENABLE_DEBUG_INFO = NO
OTHER_SWIFT_FLAGS = $(inherited) -suppress-warnings
VALIDATE_PRODUCT = YES
2,001 changes: 894 additions & 1,107 deletions Nimble.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
{
"originHash" : "2853479464af5aaca0b6c21a7e0210cbead60c922083c008c0a0399d641c3af0",
"pins" : [
{
"identity" : "cwlcatchexception",
"kind" : "remoteSourceControl",
"location" : "https://github.com/mattgallagher/CwlCatchException",
"state" : {
"revision" : "3b123999de19bf04905bc1dfdb76f817b0f2cc00",
"version" : "2.1.2"
"revision" : "07b2ba21d361c223e25e3c1e924288742923f08c",
"version" : "2.2.1"
}
},
{
"identity" : "cwlpreconditiontesting",
"kind" : "remoteSourceControl",
"location" : "https://github.com/mattgallagher/CwlPreconditionTesting",
"state" : {
"revision" : "dc9af4781f2afdd1e68e90f80b8603be73ea7abc",
"version" : "2.2.0"
"revision" : "0139c665ebb45e6a9fbdb68aabfd7c39f3fe0071",
"version" : "2.2.2"
}
}
],
"version" : 2
"version" : 3
}
24 changes: 16 additions & 8 deletions Nimble.xcodeproj/xcshareddata/xcschemes/Nimble.xcscheme
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1600"
version = "2.0">
LastUpgradeVersion = "1010"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
Expand All @@ -14,7 +14,7 @@
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "1F925EAC195C0D6300ED456B"
BlueprintIdentifier = "FDFE4AA35E6F8AB96174A3E5"
BuildableName = "Nimble.framework"
BlueprintName = "Nimble"
ReferencedContainer = "container:Nimble.xcodeproj">
Expand All @@ -33,7 +33,7 @@
parallelizable = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "1F925EB6195C0D6300ED456B"
BlueprintIdentifier = "1E5E5C25BE020156082AF939"
BuildableName = "NimbleTests.xctest"
BlueprintName = "NimbleTests"
ReferencedContainer = "container:Nimble.xcodeproj">
Expand All @@ -43,19 +43,18 @@
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = ""
selectedLauncherIdentifier = "Xcode.IDEFoundation.Launcher.PosixSpawn"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugXPCServices = "NO"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "1F925EAC195C0D6300ED456B"
BlueprintIdentifier = "FDFE4AA35E6F8AB96174A3E5"
BuildableName = "Nimble.framework"
BlueprintName = "Nimble"
ReferencedContainer = "container:Nimble.xcodeproj">
Expand All @@ -68,6 +67,15 @@
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "FDFE4AA35E6F8AB96174A3E5"
BuildableName = "Nimble.framework"
BlueprintName = "Nimble"
ReferencedContainer = "container:Nimble.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
Expand Down
41 changes: 0 additions & 41 deletions Package.resolved

This file was deleted.

120 changes: 120 additions & 0 deletions Project.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
import ProjectDescription

let bundleIDPrefix = "net.jeffhui"
let destinations: Destinations = .iOS.union(Destinations.macOS)
let deploymentTargets: DeploymentTargets = .multiplatform(iOS: "13.0", macOS: "12.0")

let target: Target = .target(
name: "Nimble",
destinations: destinations,
product: .framework,
bundleId: "\(bundleIDPrefix).Nimble",
deploymentTargets: deploymentTargets,
infoPlist: "Sources/Nimble/Info.plist",
sources: [
.glob(
"Sources/Nimble/**",
excluding: ["Sources/Nimble/Adapters/NonObjectiveC/ExceptionCapture.swift"]
),
"Sources/NimbleObjectiveC/**",
],
headers: .headers(
public: [
"Sources/NimbleObjectiveC/include/**",
"Sources/Nimble/Nimble.h"
]
),
dependencies: [
.package(product: "CwlCatchException"),
.package(product: "CwlPreconditionTesting"),
.package(product: "CwlPosixPreconditionTesting"),
],
settings: .settings(
base: [
"DEBUG_INFORMATION_FORMAT": "dwarf-with-dsym",
"DEFINES_MODULE": "YES",
"DYLIB_COMPATIBILITY_VERSION": "1",
"DYLIB_CURRENT_VERSION": "1",
"DYLIB_INSTALL_NAME_BASE": "@rpath",
"GCC_PREPROCESSOR_DEFINITIONS": "$(inherited)",
"GCC_TREAT_WARNINGS_AS_ERRORS": "YES",
"INSTALL_PATH": "$(LOCAL_LIBRARY_DIR)/Frameworks",
"LD_RUNPATH_SEARCH_PATHS":
"$(inherited) @executable_path/Frameworks @loader_path/Frameworks",
"SKIP_INSTALL": "YES",
"SUPPORTS_MACCATALYST": "YES",
],
configurations: [
.debug(name: "Debug"),
.release(name: "Release")
],
defaultSettings: .none
)
)

let testTarget: Target = .target(
name: "NimbleTests",
destinations: destinations,
product: .unitTests,
bundleId: "\(bundleIDPrefix).NimbleTests",
deploymentTargets: deploymentTargets,
infoPlist: "Tests/NimbleTests/Info.plist",
sources: [
"Tests/**",
"Sources/NimbleSharedTestHelpers/**"
],
headers: .headers(project: "Tests/NimbleObjectiveCTests/**"),
dependencies: [
.target(name: "Nimble")
],
settings: .settings(
base: [
"DEBUG_INFORMATION_FORMAT": "dwarf-with-dsym",
"CLANG_ENABLE_MODULES": "YES",
"SUPPORTS_MACCATALYST": "YES",
"SWIFT_OPTIMIZATION_LEVEL": "-Onone",
"COMBINE_HIDPI_IMAGES": "YES",
"LD_RUNPATH_SEARCH_PATHS":
"$(inherited) @executable_path/Frameworks @loader_path/Frameworks",

"GCC_PREPROCESSOR_DEFINITIONS": "DEBUG=1 $(inherited)",
"METAL_ENABLE_DEBUG_INFO": "YES",
"SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD": "YES",
],
configurations: [
.debug(name: "Debug"),
.release(name: "Release")
],
defaultSettings: .none
)
)

let project = Project(
name: "Nimble",
organizationName: bundleIDPrefix,
packages: [
.package(url: "https://github.com/mattgallagher/CwlCatchException", from: "2.1.2"),
.package(url: "https://github.com/mattgallagher/CwlPreconditionTesting", from: "2.2.0"),
],
settings: .settings(
configurations: [
.debug(name: "Debug", xcconfig: "Configurations/Debug.xcconfig"),
.release(name: "Release", xcconfig: "Configurations/Release.xcconfig")
],
defaultSettings: .none
),
targets: [
target,
testTarget
],
schemes: [
.scheme(
name: "Nimble",
buildAction: .buildAction(targets: ["Nimble"]),
testAction: .targets(
[.testableTarget(target: "NimbleTests", isParallelizable: true)],
attachDebugger: false
)
)
]
)
24 changes: 24 additions & 0 deletions Tuist/Package.resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"originHash" : "d55755a06c2a521a1527515ee9224d295cffc80c3842462176852d0b09632182",
"pins" : [
{
"identity" : "cwlcatchexception",
"kind" : "remoteSourceControl",
"location" : "https://github.com/mattgallagher/CwlCatchException",
"state" : {
"revision" : "07b2ba21d361c223e25e3c1e924288742923f08c",
"version" : "2.2.1"
}
},
{
"identity" : "cwlpreconditiontesting",
"kind" : "remoteSourceControl",
"location" : "https://github.com/mattgallagher/CwlPreconditionTesting",
"state" : {
"revision" : "0139c665ebb45e6a9fbdb68aabfd7c39f3fe0071",
"version" : "2.2.2"
}
}
],
"version" : 3
}
Loading

0 comments on commit 442ee2d

Please sign in to comment.