name: UnitTests

schemes:
  UnitTests:
    analyze:
      config: Debug
    archive:
      config: Release
    build:
      targets:
        UnitTests: all
    profile:
      config: Release
    run:
      config: Debug
      disableMainThreadChecker: false
    test:
      config: Debug
      disableMainThreadChecker: false
      gatherCoverageData: true
      coverageTargets:
        - ElementX
      testPlans:
        - path: UnitTests.xctestplan
          defaultPlan: true

targets:
  UnitTests:
    type: bundle.unit-test
    platform: iOS

    dependencies:
    - target: ElementX
    - package: MatrixRustSDK
    - package: AsyncAlgorithms
    - package: Clocks
    - package: Dynamic

    info:
      path: ../SupportingFiles/Info.plist

    settings:
      base:
        PRODUCT_NAME: UnitTests
        PRODUCT_BUNDLE_IDENTIFIER: ${BASE_BUNDLE_IDENTIFIER}.unit.tests
      debug:
      release:

    sources:
    - path: ../Sources
    - path: ../SupportingFiles
    - path: ../../DevelopmentAssets
    - path: ../../ElementX/Sources/Other/Extensions/Publisher.swift
    - path: ../../ElementX/Sources/Other/Extensions/XCTestCase.swift
    - path: ../../ElementX/Sources/Other/InfoPlistReader.swift
    - path: ../../Tools/Scripts/Templates/SimpleScreenExample/Tests/Unit
    
