mirror of
https://github.com/gsantner/dandelion
synced 2024-11-22 04:12:08 +01:00
Download podlist at build time
This commit is contained in:
parent
95dbb2cd34
commit
e95082cefb
5 changed files with 28 additions and 1288 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -5,6 +5,7 @@ app/src/main/res/raw/contributors.md
|
||||||
app/src/main/res/raw/license.md
|
app/src/main/res/raw/license.md
|
||||||
app/src/main/res/raw/readme.md
|
app/src/main/res/raw/readme.md
|
||||||
app/src/main/res/raw/contributors.txt
|
app/src/main/res/raw/contributors.txt
|
||||||
|
app/src/main/res/raw/podlist.json
|
||||||
|
|
||||||
##############
|
##############
|
||||||
### Common ###
|
### Common ###
|
||||||
|
|
|
@ -12,4 +12,5 @@ Abhijith Balan (abhijithb21 AT openmailbox DOT org): Malayalam translation
|
||||||
Airon90 (https://diasp.eu/u/airon90): Italian translation
|
Airon90 (https://diasp.eu/u/airon90): Italian translation
|
||||||
Gaukler Faun (https://github.com/scoute-dich): Diaspora Native WebApp additions
|
Gaukler Faun (https://github.com/scoute-dich): Diaspora Native WebApp additions
|
||||||
Martín Vukovic (martinvukovic@protonmail.com): Diaspora Native WebApp
|
Martín Vukovic (martinvukovic@protonmail.com): Diaspora Native WebApp
|
||||||
|
Paweł Szymon Kosiński (pskosinski): Polish translation
|
||||||
SansPseudoFix (https://github.com/SansPseudoFix): French translation
|
SansPseudoFix (https://github.com/SansPseudoFix): French translation
|
||||||
|
|
|
@ -76,5 +76,29 @@ task copyRepoFiles(type: Copy) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Download Podlist
|
||||||
|
final String PODLIST_PATH = "app/src/main/res/raw/podlist.json"
|
||||||
|
final String PODLIST_URL = 'https://raw.githubusercontent.com/Diaspora-for-Android/diaspora-android-extras/master/podList/podlist.json'
|
||||||
|
downloadFile(PODLIST_PATH, PODLIST_URL, false)
|
||||||
|
|
||||||
|
// Do if we build in release (signed apk) mode
|
||||||
|
android.applicationVariants.all { v ->
|
||||||
|
if (v.buildType.name == "release"){
|
||||||
|
v.assemble.doFirst {
|
||||||
|
downloadFile(PODLIST_PATH, PODLIST_URL, true)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def downloadFile(filePath, url, downloadIfExists ) {
|
||||||
|
def f = new File(filePath)
|
||||||
|
if (f.exists() && downloadIfExists){
|
||||||
|
f.delete();
|
||||||
|
}
|
||||||
|
if (!f.exists()) {
|
||||||
|
new URL(url).withInputStream{ i -> f.withOutputStream{ it << i }}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
tasks.copyRepoFiles.execute()
|
tasks.copyRepoFiles.execute()
|
File diff suppressed because it is too large
Load diff
|
@ -15,7 +15,7 @@
|
||||||
<string name="fragment_debug__android_version">Wersja systemu Android: %1$s</string>
|
<string name="fragment_debug__android_version">Wersja systemu Android: %1$s</string>
|
||||||
<string name="fragment_debug__device_name">Nazwa urządzenia: %1$s</string>
|
<string name="fragment_debug__device_name">Nazwa urządzenia: %1$s</string>
|
||||||
<string name="fragment_debug__app_codename">Nazwa kodowa: %1$s</string>
|
<string name="fragment_debug__app_codename">Nazwa kodowa: %1$s</string>
|
||||||
<string name="fragment_debug__pod_profile_name">Nazwa profilu na Podzie: %1$s</string>
|
<string name="fragment_debug__pod_profile_name">Alias Poda: %1$s</string>
|
||||||
<string name="fragment_debug__pod_profile_url">Domena Poda: %1$s</string>
|
<string name="fragment_debug__pod_profile_url">Domena Poda: %1$s</string>
|
||||||
<string name="fragment_debug__toast_log_copied">Log debugowania został skopiowany do schowka</string>
|
<string name="fragment_debug__toast_log_copied">Log debugowania został skopiowany do schowka</string>
|
||||||
<string name="fragment_license__3rd_party_libs_title">Lista bibliotek zewnętrznych</string>
|
<string name="fragment_license__3rd_party_libs_title">Lista bibliotek zewnętrznych</string>
|
||||||
|
|
Loading…
Reference in a new issue