Skip to content
A Gradle plugin to download strings from PhraseApp
Branch: master
Clone or download
Latest commit a91a1e9 May 17, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
gradle/wrapper Init commit May 14, 2019
src Init commit May 14, 2019
.gitignore Init commit May 14, 2019
.travis.yml
LICENSE Init commit May 14, 2019
README.md Update README.md May 17, 2019
build.gradle.kts
gradle.properties Init commit May 14, 2019
gradlew Init commit May 14, 2019
gradlew.bat Init commit May 14, 2019
settings.gradle.kts Init commit May 14, 2019

README.md

License Download Build Status

PhraseAppGradlePlugin

A Gradle plugin for PhraseApp to receive/download/update strings in your Android application.

Usage

You have to apply this plugin into your top-level build.gradle[.kts] file and set up the phraseApp extension:

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'net.grandcentrix:PhraseAppGradlePlugin:1.0.0'
    }
}

apply plugin: 'net.grandcentrix.phraseapp'

phraseApp {
    projectId = "projectId"
    userToken = "userToken"
    destinationDir = file("app/src/main/res/")
    languages = [new Language("phraseapp-en-id-xxx", "values"), new Language("phraseapp-de-id-xxx", "values-de")]
    tags = ["android", "common"]
}
Kotlin DSL:
buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath("net.grandcentrix:PhraseAppGradlePlugin:1.0.0")
    }
}
    
apply(plugin = "net.grandcentrix.phraseapp")
    
configure<PhraseAppExtension> {
    projectId.set("projectId")
    userToken.set("userToken")
    destinationDir.set(file("app/src/main/res/"))
    languages.set(listOf(Language("phraseapp-en-id-xxx", "values"), Language("phraseapp-de-id-xxx", "values-de")))
    tags.set(listOf("android", "common"))
}

Beside of the tags all properties are required!

You can then update your strings with the updateStrings tasks.

Note: This task does always a network call an can't be cached! Therefore make sure you use it only if required.

License

Copyright 2019 grandcentrix GmbH

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
You can’t perform that action at this time.