gradle-native
gradle-native copied to clipboard
Handle case difference between Xcode targets
Xcode doesn't allow users to specify a target with the same name. However, users can still specify targets with the same name in different cases. The most important one is when the case of the first letter of the target name differs. When creating additional tasks, we usually concatenate and capitalize the target. For example, verbTarget
. For the same verb with two targets, say Foo
and foo
, the resulting task name will be the same verbFoo
.
I feel this is a general issue throughout Nokee (and Gradle in general). We could create a bootstring encoding in those specific cases. The rules should be as follow:
- When used as a standalone (no prefix), use the string as is.
- When prefixed, if the first letter is already capitalized, there should be a unique identifier appended to the end (bootstring use
-
+ encoding - If we use a dash (
-
) delimiter, we will always have to include a dash delimiter when the string already includes dashes
We should also consider strange characters in the task name. Although spaces and parenthesis are allowed, it may be a bit too strange.
A quick note to say that emoji are accepted in task names :-)