Add all icons that are compatible - Add remaining custom apps - update hooks/ci commands

This commit is contained in:
Sean Mac Gillicuddy 2019-11-18 13:32:19 +00:00
parent fda852ad73
commit df9305e3ca
163 changed files with 253 additions and 20 deletions

View File

@ -52,7 +52,7 @@ before_script:
- adb shell input keyevent 82 &
script:
- ./gradlew jacocoInstrumentationTestReport ktlintCheck lint jacocoTestReport app:assembleRelease
- ./gradlew jacocoInstrumentationTestReport ktlintCheck app:lintDebug core:lintDebug custom:lintCustomexampleDebug jacocoTestReport app:assembleRelease
after_success:
- bash <(curl -s https://codecov.io/bash)

View File

@ -26,34 +26,155 @@ import java.util.Date
import java.util.Locale
object CustomApps {
private val example = CustomApp(
name = "customexample",
url = "http://download.kiwix.org/zim/wikipedia_fr_test.zim",
enforcedLanguage = "en",
displayName = "Test Custom App"
)
private val phet = CustomApp(
name = "phet",
url = "http://download.kiwix.org/zim/phet/phet_mul_2018-09.zim",
enforcedLanguage = "en",
displayName = "PhET"
)
private val tunisie = CustomApp(
name = "tunisie",
url = "http://download.kiwix.org/zim/wikipedia_fr_tunisie_novid.zim",
enforcedLanguage = "fr",
displayName = "Encyclopédie de la Tunisie"
)
private val venezuela = CustomApp(
name = "venezuela",
url = "https://download.kiwix.org/zim/wikipedia/wikipedia_es_venezuela_2018-07.zim",
enforcedLanguage = "es",
displayName = "Enciclopedia de Venezuela"
)
private val wikimed = CustomApp(
name = "wikimed",
url = "http://download.kiwix.org/zim/wikipedia_en_medicine_novid.zim",
enforcedLanguage = "en",
displayName = "Medical Wikipedia"
)
private val wikimedar = CustomApp(
name = "wikimedar",
url = "http://download.kiwix.org/zim/wikipedia/wikipedia_ar_medicine_novid_2018-08.zim",
enforcedLanguage = "ar",
displayName = "وِيكيبيديا الطبية (بلا اتصال بالانترنت)"
)
private val wikimedde = CustomApp(
name = "wikimedde",
url = "http://download.kiwix.org/zim/wikipedia/wikipedia_de_medicine_novid_2018-10.zim",
enforcedLanguage = "de",
displayName = "Wikipedia Medizin (Offline)"
)
private val wikimedes = CustomApp(
name = "wikimedes",
url = "http://download.kiwix.org/zim/wikipedia/wikipedia_es_medicine_novid_2018-10.zim",
enforcedLanguage = "es",
displayName = "Wikipedia Médica (Offline)"
)
private val wikimedfa = CustomApp(
name = "wikimedfa",
url = "http://download.kiwix.org/zim/wikipedia/wikipedia_fa_medicine_novid_2018-07.zim",
enforcedLanguage = "fa",
displayName = "ویکی‌پدیای پزشکی (آفلاین)"
)
private val wikimedfr = CustomApp(
name = "wikimedfr",
url = "http://download.kiwix.org/zim/wikipedia/wikipedia_fr_medicine_novid_2018-07.zim",
enforcedLanguage = "fr",
displayName = "Wikipédia médicale"
)
private val wikimedja = CustomApp(
name = "wikimedja",
url = "http://download.kiwix.org/zim/wikipedia/wikipedia_ja_medicine_novid_2018-07.zim",
enforcedLanguage = "ja",
displayName = "医療ウィキペディア(オフライン)"
)
private val wikimedmini = CustomApp(
name = "wikimedmini",
url = "http://download.kiwix.org/zim/wikipedia/wikipedia_en_medicine_nodet_2018-07.zim",
enforcedLanguage = "en",
displayName = "Offline WikiMed mini"
)
private val wikimedor = CustomApp(
name = "wikimedor",
url = "http://download.kiwix.org/zim/wikipedia/wikipedia_or_medicine_novid_2018-07.zim",
enforcedLanguage = "or",
displayName = "ମେଡିକାଲ ଉଇକିପିଡିଆ (ଅଫଲାଇନ)"
)
private val wikimedpt = CustomApp(
name = "wikimedpt",
url = "http://download.kiwix.org/zim/wikipedia/wikipedia_pt_medicine_2018-10.zim",
enforcedLanguage = "pt",
displayName = "Wikipédia Médica (Offline)"
)
private val wikimedzh = CustomApp(
name = "wikimedzh",
url = "http://download.kiwix.org/zim/wikipedia/wikipedia_zh_medicine_novid_2018-07.zim",
enforcedLanguage = "zh",
displayName = "醫學維基百科(離線版)"
)
private val wikispecies = CustomApp(
name = "wikispecies",
url = "http://download.kiwix.org/zim/wikispecies/wikispecies_en_all_novid_2018-08.zim",
enforcedLanguage = "en",
displayName = "WikiSpecies"
)
private val wikivoyage = CustomApp(
name = "wikivoyage",
url = "http://download.kiwix.org/zim/wikivoyage/wikivoyage_en_all_novid_2018-10.zim",
enforcedLanguage = "en",
displayName = "Wikivoyage"
)
private val wikivoyageeurope = CustomApp(
name = "wikivoyageeurope",
url = "http://download.kiwix.org/zim/wikivoyage/wikivoyage_en_europe_novid_2018-10.zim",
enforcedLanguage = "en",
displayName = "Wikivoyage European Travels"
)
private val wikivoyagede = CustomApp(
name = "wikivoyagede",
url = "http://download.kiwix.org/zim/wikivoyage/wikivoyage_de_all_novid_2018-10.zim",
enforcedLanguage = "de",
displayName = "Wikivoyage auf Deutsch"
)
val all = listOf(
CustomApp(
name = "customexample",
versionName = "2017-07",
url = "http://download.kiwix.org/zim/wikipedia_fr_test.zim",
enforcedLanguage = "en",
displayName = "Test Custom App"
),
CustomApp(
name = "wikimed",
versionName = "2018-08",
url = "http://download.kiwix.org/zim/wikipedia_en_medicine_novid.zim",
enforcedLanguage = "en",
displayName = "Medical Wikipedia"
)
example,
phet,
tunisie,
venezuela,
wikimed,
wikimedar,
wikimedde,
wikimedes,
wikimedfa,
wikimedfr,
wikimedja,
wikimedmini,
wikimedor,
wikimedpt,
wikimedzh,
wikispecies,
wikivoyage,
wikivoyageeurope,
wikivoyagede
)
data class CustomApp(
val name: String,
val versionName: String,
val versionCode: Int = Date().let {
SimpleDateFormat("YYDDD0", Locale.ROOT).format(it).toInt()
},
val versionName: String = formatDate("YYYY-MM"),
val versionCode: Int = formatDate("YYDDD0").toInt(),
val url: String,
val enforcedLanguage: String,
val displayName: String
)
private fun formatDate(pattern: String) =
Date().let(SimpleDateFormat(pattern, Locale.ROOT)::format)
}
fun NamedDomainObjectContainer<ProductFlavor>.create(customApps: List<CustomApp>) {
customApps.forEach { customFlavor ->
create(customFlavor.name) {

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">#FFFFFF</color>
</resources>

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">#FFFFFF</color>
</resources>

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">#FFFFFF</color>
</resources>

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">#FFFFFF</color>
</resources>

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Some files were not shown because too many files have changed in this diff Show More