-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into fix/consent-to-share-user-data-WPB-12018
- Loading branch information
Showing
300 changed files
with
3,889 additions
and
864 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
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1 +1 @@ | ||
../../../../SourceryPlugin/Stencils/AutoMockable.stencil | ||
../../../../WirePlugins/Plugins/SourceryPlugin/Stencils/AutoMockable.stencil |
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
2 changes: 1 addition & 1 deletion
2
WireAnalytics/Sources/WireAnalyticsSupport/Sourcery/AutoMockable.stencil
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 +1 @@ | ||
../../../../SourceryPlugin/Stencils/AutoMockable.stencil | ||
../../../../WirePlugins/Plugins/SourceryPlugin/Stencils/AutoMockable.stencil |
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
2 changes: 1 addition & 1 deletion
2
WireDomain/Sources/PackageSupport/Sourcery/AutoMockable.stencil
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 +1 @@ | ||
../../../../SourceryPlugin/Stencils/AutoMockable.stencil | ||
../../../../WirePlugins/Plugins/SourceryPlugin/Stencils/AutoMockable.stencil |
2 changes: 1 addition & 1 deletion
2
WireDomain/Sources/WireDomainSupport/Sourcery/AutoMockable.stencil
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 +1 @@ | ||
../../../../SourceryPlugin/Stencils/AutoMockable.stencil | ||
../../../../WirePlugins/Plugins/SourceryPlugin/Stencils/AutoMockable.stencil |
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
2 changes: 1 addition & 1 deletion
2
WireFoundation/Sources/WireFoundationSupport/Sourcery/AutoMockable.stencil
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 +1 @@ | ||
../../../../SourceryPlugin/Stencils/AutoMockable.stencil | ||
../../../../WirePlugins/Plugins/SourceryPlugin/Stencils/AutoMockable.stencil |
File renamed without changes.
File renamed without changes.
File renamed without changes.
67 changes: 67 additions & 0 deletions
67
WirePlugins/.swiftpm/xcode/xcshareddata/xcschemes/WirePlugins-Package.xcscheme
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,67 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<Scheme | ||
LastUpgradeVersion = "1610" | ||
version = "1.7"> | ||
<BuildAction | ||
parallelizeBuildables = "YES" | ||
buildImplicitDependencies = "YES" | ||
buildArchitectures = "Automatic"> | ||
<BuildActionEntries> | ||
<BuildActionEntry | ||
buildForTesting = "YES" | ||
buildForRunning = "YES" | ||
buildForProfiling = "YES" | ||
buildForArchiving = "YES" | ||
buildForAnalyzing = "YES"> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "SwiftGenPlugin" | ||
BuildableName = "SwiftGenPlugin" | ||
BlueprintName = "SwiftGenPlugin" | ||
ReferencedContainer = "container:"> | ||
</BuildableReference> | ||
</BuildActionEntry> | ||
</BuildActionEntries> | ||
</BuildAction> | ||
<TestAction | ||
buildConfiguration = "Debug" | ||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
shouldUseLaunchSchemeArgsEnv = "YES" | ||
shouldAutocreateTestPlan = "YES"> | ||
</TestAction> | ||
<LaunchAction | ||
buildConfiguration = "Debug" | ||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
launchStyle = "0" | ||
useCustomWorkingDirectory = "NO" | ||
ignoresPersistentStateOnLaunch = "NO" | ||
debugDocumentVersioning = "YES" | ||
debugServiceExtension = "internal" | ||
allowLocationSimulation = "YES"> | ||
</LaunchAction> | ||
<ProfileAction | ||
buildConfiguration = "Release" | ||
shouldUseLaunchSchemeArgsEnv = "YES" | ||
savedToolIdentifier = "" | ||
useCustomWorkingDirectory = "NO" | ||
debugDocumentVersioning = "YES"> | ||
<MacroExpansion> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "SwiftGenPlugin" | ||
BuildableName = "SwiftGenPlugin" | ||
BlueprintName = "SwiftGenPlugin" | ||
ReferencedContainer = "container:"> | ||
</BuildableReference> | ||
</MacroExpansion> | ||
</ProfileAction> | ||
<AnalyzeAction | ||
buildConfiguration = "Debug"> | ||
</AnalyzeAction> | ||
<ArchiveAction | ||
buildConfiguration = "Release" | ||
revealArchiveInOrganizer = "YES"> | ||
</ArchiveAction> | ||
</Scheme> |
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,36 @@ | ||
// swift-tools-version: 6.0 | ||
// The swift-tools-version declares the minimum version of Swift required to build this package. | ||
|
||
import PackageDescription | ||
|
||
let package = Package( | ||
name: "WirePlugins", | ||
products: [ | ||
.plugin(name: "SourceryPlugin", targets: ["SourceryPlugin"]), | ||
.plugin(name: "SwiftGenPlugin", targets: ["SwiftGenPlugin"]) | ||
], | ||
targets: [ | ||
.binaryTarget( | ||
name: "sourcery", | ||
url: "https://github.com/krzysztofzablocki/Sourcery/releases/download/2.2.4/sourcery-2.2.4.artifactbundle.zip", | ||
checksum: "79282fd22949653dcaf0ab6a215d33a913ce09840f577c5959b7e94292b12bd4" | ||
), | ||
.plugin( | ||
name: "SourceryPlugin", | ||
capability: .buildTool(), | ||
dependencies: ["sourcery"], | ||
exclude: ["./Stencils/AutoMockable.stencil"] | ||
), | ||
|
||
.plugin( | ||
name: "SwiftGenPlugin", | ||
capability: .buildTool(), | ||
dependencies: ["swiftgen"] | ||
), | ||
.binaryTarget( | ||
name: "swiftgen", | ||
url: "https://github.com/SwiftGen/SwiftGen/releases/download/6.6.3/swiftgen-6.6.3.artifactbundle.zip", | ||
checksum: "caf1feaf93dd32bc5037f0b6ded8d0f4fe28ab5d2f6e5c3edf2572006ba0b7eb" | ||
) | ||
] | ||
) |
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
File renamed without changes.
File renamed without changes.
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,55 @@ | ||
// | ||
// Wire | ||
// Copyright (C) 2024 Wire Swiss GmbH | ||
// | ||
// This program is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU General Public License as published by | ||
// the Free Software Foundation, either version 3 of the License, or | ||
// (at your option) any later version. | ||
// | ||
// This program is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU General Public License for more details. | ||
// | ||
// You should have received a copy of the GNU General Public License | ||
// along with this program. If not, see http://www.gnu.org/licenses/. | ||
// | ||
|
||
import Foundation | ||
import PackagePlugin | ||
|
||
@main | ||
struct SwiftGenPlugin: BuildToolPlugin { | ||
/// Entry point for creating build commands for targets in Swift packages. | ||
func createBuildCommands(context: PluginContext, target: Target) async throws -> [Command] { | ||
// regarding the warning: https://github.com/swiftlang/swift-package-manager/issues/7870 | ||
Check warning on line 26 in WirePlugins/Plugins/SwiftGenPlugin/SwiftGenPlugin.swift GitHub Actions / Test Results'appending(subpath:)' is deprecated: Use `URL` type instead of `Path`.
|
||
let configFile = URL(fileURLWithPath: target.directory.appending(subpath: ".swiftgen.yml").string) | ||
let outputFilesDirectory = context.pluginWorkDirectoryURL | ||
let tool = try context.tool(named: "swiftgen") | ||
return [ | ||
.prebuildCommand( | ||
displayName: "Running \(tool)", | ||
executable: tool.url, | ||
arguments: ["--config", configFile.path()], | ||
environment: ["GENERATED": outputFilesDirectory.path()], | ||
outputFilesDirectory: outputFilesDirectory | ||
) | ||
] + existentialAnyWorkaround(context: context) | ||
} | ||
|
||
/// This workaround is needed because at the time of writing `strings/structured-swift5.stencil` of SwiftGen does not support existential any. | ||
private func existentialAnyWorkaround(context: PluginContext) -> [Command] { | ||
let outputFilesDirectory = context.pluginWorkDirectoryURL | ||
let outputFile = outputFilesDirectory.appending(path: "Strings+Generated.swift", directoryHint: .notDirectory) | ||
return [ | ||
.prebuildCommand( | ||
displayName: "Replace CVarArg by any CVarArg", | ||
executable: try! context.tool(named: "sed").url, | ||
arguments: ["-i", "", "s/CVarArg/any CVarArg/g", outputFile.path()], | ||
// fix duplicate build file warning by providing a non-existent path | ||
outputFilesDirectory: outputFilesDirectory.appending(path: "tmp", directoryHint: .isDirectory) | ||
) | ||
] | ||
} | ||
} |
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
Oops, something went wrong.