Skip to content

Commit

Permalink
Fix custom configurations from target when `enforceExplicitDependenci…
Browse files Browse the repository at this point in the history
…es` option is enabled (#6080)

* map target configurations

* fix tests

* format
  • Loading branch information
fdzsergio committed Mar 23, 2024
1 parent 8994a3b commit 5b6c876
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public struct ExplicitDependencyGraphMapper: GraphMapping {
target.settings = Settings(
base: target.settings?.base ?? [:],
baseDebug: additionalSettings,
configurations: [:]
configurations: target.settings?.configurations ?? [:]
)

let copyBuiltProductsScript: String
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,13 @@ final class ExplicitDependencyGraphMapperTests: TuistUnitTestCase {
let dynamicLibraryB: Target = .test(
name: "DynamicLibraryB",
product: .dynamicLibrary,
productName: "DynamicLibraryB"
productName: "DynamicLibraryB",
settings: .test(
configurations: [
.debug: .test(),
.release: .test(),
]
)
)
let externalFrameworkC: Target = .test(
name: "ExternalFrameworkC",
Expand Down Expand Up @@ -172,6 +178,10 @@ final class ExplicitDependencyGraphMapperTests: TuistUnitTestCase {
baseDebug: [
"BUILT_PRODUCTS_DIR": "$(CONFIGURATION_BUILD_DIR)$(TARGET_BUILD_SUBPATH)/$(PRODUCT_NAME)",
"TARGET_BUILD_DIR": "$(CONFIGURATION_BUILD_DIR)$(TARGET_BUILD_SUBPATH)/$(PRODUCT_NAME)",
],
configurations: [
.debug: .test(),
.release: .test(),
]
),
scripts: [
Expand Down

0 comments on commit 5b6c876

Please sign in to comment.