7

I have a structure like this

target_files/
├──target1/
├──target2/
└──target3/

And I want to include only "target2" for example and exclude the other targets. How I write the spec.exclude_files?

I found this example for excluding files, but I can't understand how to write it for whole folders.

spec.exclude_files = '_private/**/*.{h,m}'

asked Jan 12, 2018 at 10:20

2 Answers 2

11
spec.source_files = [ 'target_files/**' ]
spec.exclude_files = [ 'target_files/target1/**', 'target_files/target3/**' ]

or for the case you ask about, more simply:

spec.source_files = [ 'target_files/target2/**' ]

Reference

answered Jan 12, 2018 at 23:24
Sign up to request clarification or add additional context in comments.

1 Comment

My fault. I didn't explain that I must write it in an "exclude form", because that target2 is variable. I can't simply choose what to include, because tomorrow I can add a target3, target4... and I don't want to add things there. I only want to write something like "pick targetX and exclude all other targets".
5

CocoaPods exclude_files

[CocoaPods]

Pattern: ** - Matches directories recursively.

s.exclude_files = 'target_files/target1/', 'target_files/target3/'

The opposite is source_files[About]

answered Sep 5, 2019 at 11:35

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.