Gradle Plugin for OneSky
The below tasks are added when you apply this plugin.
Translation tasks
-----------------
downloadTranslation - Download specified translation files (values-*/strings.xml)
showTranslationProgress - Show translation progress
uploadTranslation - Upload the default translation file (values/strings.xml)
// build.gradle
buildscript {
dependencies {
classpath 'rejasupotaro:onesky-gradle-plugin:<latest-version>'
}
}// app/build.gradle
apply plugin: 'rejasupotaro.onesky.plugin'
onesky {
apiKey "<api-key>"
apiSecret "<api-secret>"
projectId <project_id>
}On first run you should disable :app project - This is a sample of plugin use.
Open settings.gradle and comment line include ':app'
Publish SNAPSHOT version of the PLUGIN to local repository:
./gradlew uploadArchivesNow you can uncomment line in settings.gradle and run project as usual.
./gradlew uploadTranslationit will execute upload of files from multiple threads (reduce time needed for upload)
./gradlew downloadTranslationDownload translations for all specified locales. Plugin no more supporting automatic locales finding. Download started in multi-thread mode, to economy time.
-
Developer do all strings modifications in
valuesfolder -
CIS call
uploadTranslationon each commit/build -
When needed update of translations, developer do proper configuration of
localesplugin property/extension:onesky { locales = ['en', 'ca', 'de', 'es', 'fi', 'fr', 'it', 'nl', 'nb', 'no', 'sv', 'da'] } -
Execute
downloadTranslation -
developer merge downloaded translations manually, resolving conflicts if needed.
NOTE: 'en' locale allows to prevent modification of strings defined by developer, that greatly reduce risks of merge conflicts.