Copy & filter repo files into android app resources

This commit is contained in:
Gregor Santner 2016-08-27 15:17:02 +02:00
parent 8ae74d97d4
commit 89ee0450e9
4 changed files with 33 additions and 10 deletions

8
.gitignore vendored
View File

@ -1,5 +1,13 @@
*~
# Project specific
app/src/main/res/raw/changelog.md
app/src/main/res/raw/contributors.md
app/src/main/res/raw/license.md
app/src/main/res/raw/readme.md
# Gradle
.gradle/
.gradle

11
CONTRIBUTORS.md Normal file
View File

@ -0,0 +1,11 @@
00l>> This file contains references to people who contributed to the app.
01l>> Send a message to [gdev AT live to de](https://gsantner.github.io/about/email/) to get included
02l>> If you helped by translating the app, please send a message on crowdin
03l>>
04l>> Schemes:
05l>> Firstname Lastname (Link)
06l>> Firstname Lastname (E-Mail)
07l>> Username (Link)
08l>> Username (E-Mail)
## 99l CONTRIBUTORS
Abhijith Balan (abhijithb21@openmailbox.org): Malayalam translation

View File

@ -1,9 +0,0 @@
00l>> This file contains references to people who helped translating the app
01l>> Please send a message on crowdin, and you will get included in the next commit
02l>>
03l>> Schemes:
04l>> Firstname Lastname (Link)
05l>> Firstname Lastname (E-Mail)
06l>> Username (Link)
07l>> Username (E-Mail)
## 99l TRANSLATORS

View File

@ -49,5 +49,18 @@ dependencies {
compile 'info.guardianproject.netcipher:netcipher:2.0.0-alpha1'
compile 'info.guardianproject.netcipher:netcipher-webkit:2.0.0-alpha1'
apt 'com.jakewharton:butterknife-compiler:8.0.1'
}
task copyRepoFiles(type: Copy) {
String[] copyFiles = ["README.md", "CONTRIBUTORS.md", "LICENSE.md", "CHANGELOG.md"]
from rootProject.files(copyFiles)
into 'src/main/res/raw'
rename { String fileName ->
fileName.replace(fileName, fileName.toLowerCase())
}
filter { line -> (line.toString().matches("..l>>.*") || line.toString().startsWith("## 99l CONTRIBUTORS")) \
? null : line.toString().trim()
}
}
tasks.copyRepoFiles.execute()