diff --git a/Package.swift b/Package.swift index b7343aab6..e9ff0c17f 100644 --- a/Package.swift +++ b/Package.swift @@ -27,9 +27,9 @@ let openCombineShimTarget: Target = .target( dependencies: [ "OpenCombine", .target(name: "OpenCombineDispatch", - condition: .when(platforms: supportedPlatforms.except([.wasi]))), + condition: .when(platforms: supportedPlatforms.except([.wasi, .android]))), .target(name: "OpenCombineFoundation", - condition: .when(platforms: supportedPlatforms.except([.wasi]))), + condition: .when(platforms: supportedPlatforms.except([.wasi, .android]))), ] ) let openCombineTarget: Target = .target( @@ -37,7 +37,7 @@ let openCombineTarget: Target = .target( dependencies: [ .target( name: "COpenCombineHelpers", - condition: .when(platforms: supportedPlatforms.except([.wasi])) + condition: .when(platforms: supportedPlatforms.except([.wasi, .android])) ), ], exclude: [ @@ -53,7 +53,7 @@ let openCombineFoundationTarget: Target = .target( "OpenCombine", .target( name: "COpenCombineHelpers", - condition: .when(platforms: supportedPlatforms.except([.wasi])) + condition: .when(platforms: supportedPlatforms.except([.wasi, .android])) ), ] ) @@ -66,9 +66,9 @@ let openCombineTestsTarget: Target = .testTarget( dependencies: [ "OpenCombine", .target(name: "OpenCombineDispatch", - condition: .when(platforms: supportedPlatforms.except([.wasi]))), + condition: .when(platforms: supportedPlatforms.except([.wasi, .android]))), .target(name: "OpenCombineFoundation", - condition: .when(platforms: supportedPlatforms.except([.wasi]))), + condition: .when(platforms: supportedPlatforms.except([.wasi, .android]))), ], swiftSettings: [ .unsafeFlags(["-enable-testing"]), @@ -90,8 +90,7 @@ let package = Package( openCombineFoundationTarget, openCombineDispatchTarget, openCombineTestsTarget, - ], - cxxLanguageStandard: .cxx17 + ] ) // MARK: Helpers diff --git a/Sources/OpenCombine/CombineIdentifier.swift b/Sources/OpenCombine/CombineIdentifier.swift index 62862db3a..823a4c24a 100644 --- a/Sources/OpenCombine/CombineIdentifier.swift +++ b/Sources/OpenCombine/CombineIdentifier.swift @@ -9,7 +9,7 @@ @_implementationOnly import COpenCombineHelpers #endif -#if os(WASI) +#if os(WASI) || os(Android) private var __identifier: UInt64 = 0 internal func __nextCombineIdentifier() -> UInt64 { diff --git a/Sources/OpenCombine/Helpers/Locking.swift b/Sources/OpenCombine/Helpers/Locking.swift index 3ff662fc1..5a73882e3 100644 --- a/Sources/OpenCombine/Helpers/Locking.swift +++ b/Sources/OpenCombine/Helpers/Locking.swift @@ -9,7 +9,7 @@ @_implementationOnly import COpenCombineHelpers #endif -#if os(WASI) +#if os(WASI) || os(Android) internal struct __UnfairLock { // swiftlint:disable:this type_name internal static func allocate() -> UnfairLock { return .init() } internal func lock() {} diff --git a/Sources/OpenCombine/Publishers/Publishers.Breakpoint.swift b/Sources/OpenCombine/Publishers/Publishers.Breakpoint.swift index 354555e13..7afd7951e 100644 --- a/Sources/OpenCombine/Publishers/Publishers.Breakpoint.swift +++ b/Sources/OpenCombine/Publishers/Publishers.Breakpoint.swift @@ -5,7 +5,7 @@ // Created by Sergej Jaskiewicz on 03.12.2019. // -#if !os(WASI) +#if !(os(WASI) || os(Android)) #if canImport(COpenCombineHelpers) @_implementationOnly import COpenCombineHelpers