Added missing flavors and store links

This commit is contained in:
Sad Ellie 2023-01-18 22:01:05 +04:00
parent c7c9c557bb
commit 35961e8629
3 changed files with 25 additions and 19 deletions

View File

@ -61,7 +61,9 @@ android {
productFlavors { productFlavors {
create("playStore") {} create("playStore") {}
create("appGallery") {} create("appGallery") {}
create("ruPlayStore") {} create("ruStore") {}
create("nashStore") {}
create("ruMarket") {}
create("fdroid") {} create("fdroid") {}
} }

View File

@ -38,7 +38,9 @@ internal fun Project.configureKotlinAndroid(
productFlavors { productFlavors {
create("playStore") {} create("playStore") {}
create("appGallery") {} create("appGallery") {}
create("ruPlayStore") {} create("ruStore") {}
create("nashStore") {}
create("ruMarket") {}
create("fdroid") {} create("fdroid") {}
} }

View File

@ -30,28 +30,22 @@ android {
productFlavors { productFlavors {
getByName("playStore") { getByName("playStore") {
buildConfigField( storeLink("http://play.google.com/store/apps/details?id=com.sadellie.unitto")
"String",
"STORE_LINK",
"\"http://play.google.com/store/apps/details?id=com.sadellie.unitto\""
)
} }
getByName("appGallery") { getByName("appGallery") {
buildConfigField( storeLink("https://appgallery.huawei.com/app/C105740875")
"String",
"STORE_LINK",
"\"https://appgallery.huawei.com/app/C105740875\""
)
} }
getByName("ruPlayStore") { getByName("nashStore") {
buildConfigField("String", "STORE_LINK", "\"\"") storeLink("https://store.nashstore.ru/store/627de8394891a527a6efe56a")
}
getByName("ruStore") {
storeLink("https://apps.rustore.ru/app/com.sadellie.unitto")
}
getByName("ruMarket") {
storeLink("https://store.ruplay.market/app/com.sadellie.unitto")
} }
getByName("fdroid") { getByName("fdroid") {
buildConfigField( storeLink("https://github.com/sadellie/unitto")
"String",
"STORE_LINK",
"\"https://github.com/sadellie/unitto\""
)
} }
} }
@ -63,3 +57,11 @@ android {
this.warning.add("MissingTranslation") this.warning.add("MissingTranslation")
} }
} }
fun com.android.build.api.dsl.VariantDimension.storeLink(url: String) {
buildConfigField(
"String",
"STORE_LINK",
"\"${url}\""
)
}