Xcode SPM проблема зависимостей

В проекте через SPM подключены две библиотеки

.package(name: "Web3swift", url: "https://github.com/skywinder/web3swift.git", from: "3.0.6"),
.package(name: "Random", url: "https://github.com/vapor-community/random.git", .upToNextMinor(from: "1.2.0"))

библиотека Random тянет за собой библиотеку Core (https://github.com/vapor/core.git), а у библиотеки Web3swift в target тоже используется имя Core

let package = Package(
    name: "Web3swift",
    platforms: [
        .macOS(.v10_15), .iOS(.v13)
    ],
    products: [
        .library(name: "web3swift", targets: ["web3swift"])
    ],
    dependencies: [
        .package(url: "https://github.com/attaswift/BigInt.git", .upToNextMinor(from: "5.3.0")),
        .package(url: "https://github.com/krzyzanowskim/CryptoSwift.git", .upToNextMinor(from: "1.5.1"))
    ],
    targets: [
        .target(name: "secp256k1"),
        .target(
            name: "Core",
            dependencies: ["BigInt", "secp256k1", "CryptoSwift"]
        ),
        .target(
            name: "web3swift",
            dependencies: ["Core", "BigInt", "secp256k1"],
            exclude: excludeFiles,
            resources: [
                .copy("./Browser/browser.js"),
                .copy("./Browser/browser.min.js"),
                .copy("./Browser/wk.bridge.min.js")
            ]
        ),

В итоге у меня ошибка

multiple targets named 'Core' in: 'core', 'web3swift'; consider using the `moduleAliases` parameter in manifest to provide unique names

Подскажите, как исправить ее ?


Ответы (0 шт):