Commit Graph

56 Commits

Author SHA1 Message Date
Maxim Krouk 434dfeca2e Add excludeFromProject option for local packages (#1512) 2025-02-17 16:08:54 +11:00
Zewu Chen 681e320867 Add improvement of performance in SpecValidation on validateSettings (#1522) 2024-12-29 15:19:06 +11:00
Tatsuki Otsuka 274ce7342c Disallow the "watchOS" supported destination for multiplatform apps (#1470)
* Reject multiplatform apps that support the watchOS destination

This commit also fixes existing test cases.

* Add test cases

* Update docs

* Update changelog
2024-05-17 23:00:09 +10:00
Giovanni Amati 97d36fd1d2 Support for multiple deployment targets with xcode 14 (#1336)
* platformFilters on Dependecies

* platformFilters on sources

* fixed current unit tests

* renamed enum to SupportedPlatforms

* supportedPlatforms field for target

* errors

* renamed errors

* inferPlatformFiltersByPath flag

* changed priority to generate filter

* fixed parsing

* fixed init

* unit test supportedPlatforms

* unit tests for errors

* fixing build settings and unit tests

* added new settingsPresets

* new check errors and unit tests

* case insensitive match

* fixed skipping cross platform target

* json decode

* unit tests inferPlatformFiltersByPath and platformFilters for sources

* mocked files

* fixing unit tests

* first test on dependecies

* unit tests completed

* fixed unit tests

* changelog

* doc changes

* doc changes

* doc changes

* doc changes

* doc changes

* doc changes

* doc changes

* doc changes

* fixed doc

* fixed unti tests style

* fixed regex

* fixed doc

* addressing comments

* Added TestProject, moved unit tests resources in another folder

* Raising error if platform is an array

* unit test on new error

* fixed error enum

* Integrated in TestProject

* committed TestProject

* unit test error

* fixing spm deps in test project

* pushed testProject

* pushed testProject

* pushed testProject fix

* comment on isResolved property

* renameing supportedPlatforms to supportedDestinations

* renameing supportedPlatforms to supportedDestinations

* renameing test app

* checked out old file

* fixing test app

* working on auto baseSDK

* fixed deploymentTarget

* renamed errors

* fixed presets

* remamed index to priority

* small comments

* removed isResolved in target and fixed error check

* added unit tests

* fixed doc

* fixed doc

* fixed doc

* fixed doc

* fixed test app

* add visionOS and more error check and testing

* fixed supported destinations priority and tests

* fixed doc

* solved conflicts

* fixed conflicts

* renamed everything

---------

Co-authored-by: Giovanni Amati <giovanni.amati@sky.uk>
2023-10-31 20:55:38 +11:00
BarredEwe 73e25e4943 Added support for Build Tool Plug-ins in AggregateTarget (#1390)
* Added support for `BuildTool Plug-ins` in AggregateTarget

* Update CHANGELOG.md
2023-09-10 21:42:47 +10:00
BarredEwe d8d5457f48 Add support for adding build tool plugins to targets (#1374)
* Add support for adding build tool plugins to targets

* Added Plugin validation

* Added some tests

* Limited the minimum version to 5.7 Swift

* Update .gitignore

Co-authored-by: freddi(Yuki Aki) <freddi-kit@users.noreply.github.com>

* Update CHANGELOG.md

Co-authored-by: freddi(Yuki Aki) <freddi-kit@users.noreply.github.com>

* Update CHANGELOG.md

Co-authored-by: freddi(Yuki Aki) <freddi-kit@users.noreply.github.com>

* Update Docs/ProjectSpec.md

Co-authored-by: freddi(Yuki Aki) <freddi-kit@users.noreply.github.com>

* Added a fixture for testing plugins

* Update CHANGELOG.md

* Installed the release version of XcodeProj

---------

Co-authored-by: freddi(Yuki Aki) <freddi-kit@users.noreply.github.com>
2023-08-16 22:22:16 +10:00
Bartosz Kosiorek 9766326dcd Display absolute path for invalidBuildScriptPath and invalidTargetConfigFile error print. (#1353)
* Display absolute path in invalidBuildScriptPath error print.

With previous implementation, the error message was not clear for end user:
  Spec validation error: Target "Project" has a script "SwiftLint" which has a path that doesn't exist "../../wrong-dir/scripts/run_swiftlint_in_xcode_wrapper.sh"

With new implementation with absolute path, it is easier to validate what is wrong with path:
  Spec validation error: Target "Project" has a script "SwiftLint" which has a path that doesn't exist "/Users/SomeUser/dev/fancy-project/wrong-dir/scripts/run_swiftlint_in_xcode_wrapper.sh"

* Display absolute path for invalidTargetConfigFile error print.

Without patch:
  2 Spec validations errors:
	- Target "MM" has invalid config file "../../xcodegen/MM/Build/xcconfig/conan_config.xcconfig" for config "Debug"
	- Target "MM" has invalid config file "../../xcodegen/MM/Build/xcconfig/conan_config.xcconfig" for config "Release"

After fix:
  2 Spec validations errors:
	- Target "MM" has invalid config file path "/Users/MyUser/dev/myproject/xcodegen/MM/Build/xcconfig/conan_config.xcconfig" for config "Release"
	- Target "MM" has invalid config file path "/Users/MyUser/dev/myproject/xcodegen/MM/Build/xcconfig/conan_config.xcconfig" for config "Debug"
2023-04-28 07:52:06 +10:00
Aleksei Sapitskii 24572daeb5 Added duplicate dependencies validation (#1234)
**Reason**
 - More strict validation of added dependencies

**Contents**
 - Added changelog entry
 - Added check for duplicates in validation stage
 - Added test
2022-07-24 16:08:33 +10:00
Yonas Kolb e35f7df14d Add Test Plans (#716)
* upgrade scheme and project versions

* parse test plans

* remove xctestplan from resources

* generate test plan references in schemes

* add test plan to fixture

* non-mutable way of creating [XCScheme.TestPlanReference]

* update fixture version

* Add documentation

* Add default test plan option

# Conflicts:
#	Sources/ProjectSpec/Scheme.swift
#	Tests/Fixtures/paths_test/included_paths_test.yml
#	Tests/ProjectSpecTests/SpecLoadingTests.swift

* Add test plan validation

# Conflicts:
#	Tests/ProjectSpecTests/ProjectSpecTests.swift

* Check for multiple default test plans

* set first plan as default default plan

* small tweaks

* fix test plan path properties

* add test plants to target scheme

* docs

* fix fixture test plan path

* update changelog

* added ability to disable test plan path validation

Co-authored-by: Ota Mares <ota@rebuy.com>
2022-05-10 13:27:31 +10:00
John Connolly be0c3c3926 Added ability to use custom location for local Swift packages (#1175)
* Added xcodePath functionality

* Added xcodePath functionality

* Renamed Xcode path to group

* Updated change log and added fixture tests
2022-03-25 11:26:06 +11:00
freddi(Yuki Aki) 245f17117a Support test target for local Swift Package (#1169)
* support local Swift Package test case into test scheme

* update test

* add test

* update CHABGELOG.md

* Update CHANGELOG.md

* revert resolved package test

* Update Sources/XcodeGenKit/SchemeGenerator.swift

Co-authored-by: Kohki Miki <giginet.net@gmail.com>

* make TargetReference convert from new JSON format

* add .package for location of target reference

* receive target reference format at target of scheme

* update test

* update XcodeProj

* add test and fix small bugs

* update docs

* support multiple style of coverageTargets

* add edge case of parsing test targets

* fix docs

* Update Docs/ProjectSpec.md

Co-authored-by: Yonas Kolb <yonaskolb@users.noreply.github.com>

* create TestableTargetReference for not making API complex

* fix code format

* fix parameter name to Testable Target Reference

* support directly writing key of Testable Target Reference

* fix compile error in build

Co-authored-by: Kohki Miki <giginet.net@gmail.com>
Co-authored-by: Yonas Kolb <yonaskolb@users.noreply.github.com>
2022-03-20 14:27:29 +11:00
Stefano Mondino dfe7f28bcb Scheme config variants wrong assignment for similar config names (#976)
* Failing test for #975

* fixes #975

* chore: refactor to properly select a config from a collection with specific variant and config type
chore: updated changelog

* fix: lowercase compare on config variant names

* fix CI

* fix missing scheme for CI

* fix schemes for CI

* Update CHANGELOG.md

Co-authored-by: Yonas Kolb <yonaskolb@users.noreply.github.com>

* Update Sources/ProjectSpec/Config.swift

Co-authored-by: Yonas Kolb <yonaskolb@users.noreply.github.com>

* - fix compilation issue
- duplicated test for config variant name (uppercase/lowercase)

Co-authored-by: Yonas Kolb <yonaskolb@users.noreply.github.com>
2021-05-01 15:50:39 +10:00
Josh Walker 1e7c1c2da0 throw SpecValidationError for minimumXcodeGenVers (#967)
* throw SpecValidationError for minimumXcodeGenVers

* update changelog

# Conflicts:
#	CHANGELOG.md

Co-authored-by: Yonas Kolb <yonaskolb@users.noreply.github.com>
2020-11-13 08:30:35 +11:00
Yonas Kolb 7da953a488 swift format 2020-06-17 18:12:34 +10:00
freddi 550df76722 Make SwiftPackage itself as enum 2020-03-19 23:29:46 +09:00
freddi e61dafdf55 Removed unnecessary space 2020-03-18 21:48:34 +09:00
freddi ca8136b62d Removed localPackages variable 2020-03-18 21:32:24 +09:00
freddi 19853921df Added validation of local package 2020-03-05 21:30:40 +09:00
freddi 0b5585f122 Support Swift Package in local by localPackages 2020-03-03 21:33:18 +09:00
yonaskolb ce787d9e40 use mxcl/Version to fix parsing 2020-02-07 10:49:28 +11:00
Liam Nichols d69b028294 Update SpecValidation to validate TargetReference definitions in the Scheme.Test action. Add additional coverate to ProjectSpectTests 2020-02-06 10:45:21 +00:00
Evan Coleman 6bfd620549 Support external target dependencies via subprojects (#701)
* Allow external target dependencies via subprojects

* Update CHANGELOG

* Update ProjectSpec

* Fix test

* Use existing fixture for test

* Sort subprojects by name

* Throw subproject generation error instead of crashing

* Cleanup target dependency generation

* Update test fixture project

* Combine extentions in Linkage

* Update XcodeProj to 7.7.0

* Update CHANGELOG.md

* Update ProjectSpec.md

Co-authored-by: Yonas Kolb <yonaskolb@users.noreply.github.com>
2020-02-02 09:44:56 +11:00
Yuta Saito 8fe5c0cd16 Validate project reference path 2020-01-06 20:51:58 +09:00
yonaskolb 203d96e343 fix some build errors 2019-10-30 11:40:55 +11:00
Yuta Saito c4305dd02e Add validation for project reference 2019-10-27 09:00:21 +09:00
Yuta Saito b96d077252 Merge branch 'master' into external-target-ref 2019-09-30 17:09:04 +09:00
yonaskolb e9193cfb29 add support for localPackages 2019-09-27 21:36:07 +10:00
yonaskolb fe693c7160 add package validation 2019-09-27 17:10:55 +10:00
Yuta Saito 30fc642b04 Introduce ProjectName/Target syntax to reference target 2019-09-23 00:23:11 +09:00
Yuta Saito 599a2c8ead Add test case for scheme generation 2019-09-14 18:43:59 +09:00
Yuta Saito 900e3a1934 Allow dylib extension for SDK linkage 2019-09-09 11:42:24 +09:00
Tom Quist aaae772d0e Add ability to define templateAttributes within a target
This allows parameterizing templates. Also change
placeholder syntax to `${placeholderName}` also for
existing placeholders `$target_name`and `$platform`
and generate warnings when using the old placeholder
syntax.
2019-03-17 14:55:15 +01:00
Elliott Williams 224def7a09 Rename missingFiles to missingConfigFiles 2019-02-12 13:39:24 -08:00
Elliott Williams 751ecec14e Add missingFiles disabled validation 2019-02-11 19:08:44 -08:00
Yonas Kolb 1631236b7a format_code 2018-11-04 22:30:34 +11:00
Yonas Kolb 7e92db5346 add sdk dependency type 2018-11-04 21:38:07 +11:00
Yonas Kolb e8feba21ef add TestTarget with parallelizable and randomExecutionOrder 2018-11-03 19:04:28 +11:00
Yonas Kolb 3eaed1ec7c validate incorrect config settings definitions 2018-11-02 18:50:13 +11:00
Vlad Gorloff eba2e3ab86 Fix for issue https://github.com/yonaskolb/XcodeGen/issues/392. 2018-09-11 16:57:23 +02:00
Yonas Kolb a1418fe4dd allow aggregateTargets to be dependencies 2018-08-19 13:47:27 +10:00
Brentley Jones 96ac557b96 Refactor minimumXcodeGenVersion to be less pervasive 2018-08-02 07:19:37 -05:00
Brentley Jones 76192fb944 Add minimumXcodeGenVersion option
If XcodeGen's version is less than this version validation will fail.
2018-08-02 07:19:37 -05:00
Yonas Kolb 884490f955 add attributes to AggregateTarget 2018-07-24 22:05:29 +10:00
Yonas Kolb 3b17164bbf add aggregate targets 2018-07-24 22:05:29 +10:00
Yonas Kolb e589364ae8 rename ProjectSpec to Project and Project.Options to SpecOptions 2018-04-12 23:13:12 +10:00
Keith Smiley 6f95e57f45 Rename to defaultConfig 2018-03-19 15:18:46 -07:00
Keith Smiley e636664aaa Add defaultConfigurationName to options
This allows users to set the defaultConfigurationName project wide. This
setting corresponds to the drop down in the project settings that says
"Use CONFIG for command line builds". This affects which configuration
Xcode looks in for some settings, even if you pass `-configuration FOO`.
2018-03-19 13:47:02 -07:00
Dave Lee dc1356a474 Make scheme action config optional 2018-02-02 12:59:05 -08:00
Keith Smiley b6ef82b3df Add new option for disabling validations
This gives us an entry point for disabling specific project.yml
validations that sometimes shouldn't apply. The first example is
missingConfigs, which, if you use your .yml file in multiple projects,
can be too strict if the projects have different top level
configurations.
2018-01-05 11:41:33 -08:00
Yonas Kolb 0bc2f3415e minor 2017-12-26 22:46:36 +08:00