Introducing the PhraseApp Gradle Plugin

Stefan M.
2 min readMay 15, 2019

We at grandcentrix use PhraseApp to localize our iOS and Android apps.

When we started to use PhraseApp we added the .phraseapp.yml to all of our repositories. This configuration file will be used together with the awesome PhraseApp CLI tool. The tool was then installed to all of our developers machines.

With this setup we are able to download (and upload of course) our strings to PhraseApp. This worked as long as we received a ticket:

Pull strings more regularly

The problem, which the author of the ticket had, was that he received an App version for testing with outdated strings.

This happened because each time “someone” (which could be a developer, project manager, scrum master or even our customer) changes a string he has to inform the Android and iOS developers to run the “strings update process”.

As you can imagine this is very error prone. As soon as someone forgets to inform the devs before a version is released the outdated string get delivered.

Because we are using Jenkins heavily our solution to fix the ticket was easy. Create a nightly routine to fetch the strings and — if something has changed — create a pull request.

But the solution required to install the CLI tool on all of our Jenkins slaves. Additionally it requires maintenances to update the tool if needed for instance. But the main reasons why we don’t like it was because we add a new dependency to our CI server which is not managed by us, the devs, but by our internal IT team.

Our Android team then decided to use the power of Gradle and the PhraseApp API.

Therefore I’m happy to introduce the PhraseAppGradlePlugin

The plugin does only one thing. It will download the strings from PhraseApp and place it to the correct place in your Android project. You only have to setup the phraseApp extension with some PhraseApp information and you are done. A task called updateStrings can then be used to download the strings.

I don’t want to show you here how it’s work because I think the readme in the repository explain it enough.

Maintainance

I feel like a little bit strange to mention the maintenance of the project in the announcement. But I think I owe it to you (as the plugin user) to inform you about it.

At the time of writing this article, the plugin can do everything we need. There is currently no intention to add more features from our side, but we will of course fix bugs and are happy to merge pull requests with features you need!

--

--