Add visibility parameters to control scope of generated extension
Some checks failed
gitea-openium/resgen.swift/pipeline/head There was a failure building this commit
Some checks failed
gitea-openium/resgen.swift/pipeline/head There was a failure building this commit
This commit is contained in:
@ -10,6 +10,11 @@ import Foundation
|
||||
extension StringsConfiguration: Runnable {
|
||||
|
||||
func run(projectDirectory: String, force: Bool) {
|
||||
let args = getArguments(projectDirectory: projectDirectory, force: force)
|
||||
Stringium.main(args)
|
||||
}
|
||||
|
||||
func getArguments(projectDirectory: String, force: Bool) -> [String] {
|
||||
var args = [String]()
|
||||
|
||||
if force {
|
||||
@ -23,18 +28,17 @@ extension StringsConfiguration: Runnable {
|
||||
"--langs",
|
||||
langs,
|
||||
"--default-lang",
|
||||
defaultLang,
|
||||
"--static-members",
|
||||
"\(staticMembersOptions)",
|
||||
"--xc-strings",
|
||||
"\(xcStringsOptions)"
|
||||
defaultLang
|
||||
]
|
||||
|
||||
// Add optional parameters
|
||||
[
|
||||
("--extension-output-path", extensionOutputPath?.prependIfRelativePath(projectDirectory)),
|
||||
("--extension-name", extensionName),
|
||||
("--extension-suffix", extensionSuffix)
|
||||
("--extension-suffix", extensionSuffix),
|
||||
("--visibility", visibility),
|
||||
("--xc-strings", staticMembers?.description),
|
||||
("--static-members", xcStrings?.description)
|
||||
].forEach { argumentName, argumentValue in
|
||||
if let argumentValue {
|
||||
args += [
|
||||
@ -44,6 +48,6 @@ extension StringsConfiguration: Runnable {
|
||||
}
|
||||
}
|
||||
|
||||
Stringium.main(args)
|
||||
return args
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user