# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.

name: FBAEMKit

include:
  - ../xcodegen_project_common.yml

projectReferences:
  FBSDKCoreKit_Basics:
    path: ../FBSDKCoreKit_Basics/FBSDKCoreKit_Basics.xcodeproj
  TestTools:
    path: ../TestTools/TestTools.xcodeproj

configFiles:
  Debug: Configurations/Shared/Configuration/Debug.xcconfig
  Release: Configurations/Shared/Configuration/Release.xcconfig

targets:
  FBAEMKit-Static:
    type: framework
    platform: iOS
    productName: FBAEMKit
    sources:
      - path: FBAEMKit
    dependencies:
      - target: FBSDKCoreKit_Basics/FBSDKCoreKit_Basics-Static
        link: false
    configFiles:
      Debug: Configurations/FBAEMKit-Static.xcconfig
      Release: Configurations/FBAEMKit-Static.xcconfig
    preBuildScripts:
      - name: Run Swiftlint
        showEnvVars: false
        script: ../scripts/build_phase_swiftlint.sh
    settings:
      GCC_PREFIX_HEADER: FBAEMKit/FBAEMKit-Prefix-Header.h
  FBAEMKit-Dynamic:
    type: framework
    platform: iOS
    productName: FBAEMKit
    sources:
      - path: FBAEMKit
    dependencies:
      - target: FBSDKCoreKit_Basics/FBSDKCoreKit_Basics-Dynamic
      - sdk: UIKit.framework
      - sdk: libz.tbd
    configFiles:
      Debug: Configurations/FBAEMKit-Dynamic.xcconfig
      Release: Configurations/FBAEMKit-Dynamic.xcconfig
    settings:
      GCC_PREFIX_HEADER: FBAEMKit/FBAEMKit-Prefix-Header.h
    preBuildScripts:
      - name: Run Swiftlint
        showEnvVars: false
        script: ../scripts/build_phase_swiftlint.sh
  FBAEMKit_TV-Static:
    type: framework
    platform: tvOS
    productName: FBAEMKit
    sources:
      - path: FBAEMKit
    dependencies:
      - target: FBSDKCoreKit_Basics/FBSDKCoreKit_Basics_TV-Static
        link: false
    configFiles:
      Debug: Configurations/FBAEMKit-tvOS-Static.xcconfig
      Release: Configurations/FBAEMKit-tvOS-Static.xcconfig
    preBuildScripts:
      - name: Run Swiftlint
        showEnvVars: false
        script: ../scripts/build_phase_swiftlint.sh
    settings:
      GCC_PREFIX_HEADER: FBAEMKit/FBAEMKit-Prefix-Header.h
  FBAEMKit_TV-Dynamic:
    type: framework
    platform: tvOS
    productName: FBAEMKit
    sources:
      - path: FBAEMKit
    dependencies:
      - target: FBSDKCoreKit_Basics/FBSDKCoreKit_Basics_TV-Dynamic
      - sdk: UIKit.framework
      - sdk: libz.tbd
    configFiles:
      Debug: Configurations/FBAEMKit-tvOS-Dynamic.xcconfig
      Release: Configurations/FBAEMKit-tvOS-Dynamic.xcconfig
    settings:
      GCC_PREFIX_HEADER: FBAEMKit/FBAEMKit-Prefix-Header.h
    preBuildScripts:
      - name: Run Swiftlint
        showEnvVars: false
        script: ../scripts/build_phase_swiftlint.sh
  FBAEMKitTests:
    type: bundle.unit-test
    platform: iOS
    sources:
      - FBAEMKitTests
    configFiles:
      Debug: Configurations/FBAEMKitTests.xcconfig
      Release: Configurations/FBAEMKitTests.xcconfig
    dependencies:
      - target: FBAEMKit-Dynamic
      - target: TestTools/TestTools
        embed: false

schemes:
  FBAEMKit-Static:
    build:
      targets:
        FBAEMKit-Static: all
  FBAEMKit-Dynamic:
    build:
      targets:
        FBAEMKit-Dynamic: all
    test:
      targets: [FBAEMKitTests]
      gatherCoverageData: true
      coverageTargets:
        - FBAEMKit-Dynamic
  FBAEMKit_TV-Static:
    build:
      targets:
        FBAEMKit_TV-Static: all
  FBAEMKit_TV-Dynamic:
    build:
      targets:
        FBAEMKit_TV-Dynamic: all
