From 89ee0450e90b8db7223da710ac41aad0e09c8938 Mon Sep 17 00:00:00 2001 From: Gregor Santner Date: Sat, 27 Aug 2016 15:17:02 +0200 Subject: [PATCH] Copy & filter repo files into android app resources --- .gitignore | 8 ++++++++ CONTRIBUTORS.md | 11 +++++++++++ TRANSLATORS.md | 9 --------- app/build.gradle | 15 ++++++++++++++- 4 files changed, 33 insertions(+), 10 deletions(-) create mode 100644 CONTRIBUTORS.md delete mode 100644 TRANSLATORS.md diff --git a/.gitignore b/.gitignore index 60b55eeb..c3ed3407 100644 --- a/.gitignore +++ b/.gitignore @@ -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 diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md new file mode 100644 index 00000000..29187ae8 --- /dev/null +++ b/CONTRIBUTORS.md @@ -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 diff --git a/TRANSLATORS.md b/TRANSLATORS.md deleted file mode 100644 index 8b67e47b..00000000 --- a/TRANSLATORS.md +++ /dev/null @@ -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 diff --git a/app/build.gradle b/app/build.gradle index abe0374b..e99874b3 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -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() \ No newline at end of file