Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support multiple configurations e.g for flavors #9

Open
jakobulbrich opened this issue Feb 2, 2022 · 0 comments
Open

Support multiple configurations e.g for flavors #9

jakobulbrich opened this issue Feb 2, 2022 · 0 comments

Comments

@jakobulbrich
Copy link

Currently it is not easily possible to have different phrase configurations per flavor or multiple configurations for e.g. common strings and flavor specific strings.

The plugin relies one one phrase config that needs to be present when the tasks (check, clean, download, upload) are created. Therefore we cannot create custom tasks (e.g. <flavor>PhraseappDownload).

There are several issues:

  1. A global phrase config needs to be present, even if I don't know what credentials to put in when I have different ones for different flavors
// Global definition needed
phraseapp { ... }
  1. A custom phraseappDownload task won't take the specified custom phrase config, because the original task was already created with the global config before.
// Custom task
tasks.register<DefaultTask>("flavorPhraseappDownload") {
    phraseapp { ... }
    finalizedBy("phraseappDownload")
}
  1. When registering a new task of the same type as the original task with e.g. tasks.register<phraseapp.DownloadTask>, it will complain about all the missing properties that would normally be passed in to the original task during its creation in the PhraseAppPlugin class. So we would need to set every single value and not only the mandatory ones. This could probably be a solution to achieve flavor specific configs but is cumbersome
// Task of same type
tasks.register<phraseapp.DownloadTask>("flavorPhraseappDownload") {
  baseUrl.set(...)
  projectId.set(...)
  authToken.set(...)
  resFolders.set(...)
  platform.set(...)
  output.set(...)
  overrideDefaultFile.set(...)
  exceptions.set(...)
  placeholder.set(...)
  localeNameRegex.set(...)
}
@jakobulbrich jakobulbrich changed the title Support multiple configurations for e.g for flavors Support multiple configurations e.g for flavors Feb 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant