forked from organicmaps/organicmaps
[android] Re-organize flavors in proper way
Follow up 331b030
"Use module project structure"
Signed-off-by: Roman Tsisyk <roman@tsisyk.com>
This commit is contained in:
parent
bd1d9147b7
commit
a6ede2b146
545 changed files with 76 additions and 88 deletions
|
@ -4,8 +4,8 @@ on:
|
|||
pull_request:
|
||||
paths:
|
||||
- .github/workflows/android-check-metadata.yaml # Run check on self change
|
||||
- android/app/src/main/fdroid/**
|
||||
- android/app/src/main/google/**
|
||||
- android/app/src/fdroid/**
|
||||
- android/app/src/google/**
|
||||
- tools/python/check_store_metadata.py
|
||||
|
||||
jobs:
|
||||
|
|
4
.github/workflows/android-check.yaml
vendored
4
.github/workflows/android-check.yaml
vendored
|
@ -14,8 +14,8 @@ on:
|
|||
- LICENSE
|
||||
- NOTICE
|
||||
- README.md
|
||||
- android/app/src/main/fdroid/**
|
||||
- android/app/src/main/google/**
|
||||
- android/app/src/fdroid/**
|
||||
- android/app/src/google/**
|
||||
- iphone/**
|
||||
- data/strings/**
|
||||
- docs/**
|
||||
|
|
4
.github/workflows/android-release.yaml
vendored
4
.github/workflows/android-release.yaml
vendored
|
@ -3,8 +3,8 @@ on:
|
|||
workflow_dispatch: # Manual trigger
|
||||
|
||||
env:
|
||||
RELEASE_NOTES: android/app/src/main/google/play/release-notes/en-US/default.txt
|
||||
FDROID_VERSION: android/app/src/main/fdroid/play/version.yaml
|
||||
RELEASE_NOTES: android/app/src/google/play/release-notes/en-US/default.txt
|
||||
FDROID_VERSION: android/app/src/fdroid/play/version.yaml
|
||||
JAVA_HOME: /usr/lib/jvm/temurin-17-jdk-amd64 # Java 17 is required for Android Gradle 8 plugin
|
||||
|
||||
jobs:
|
||||
|
|
3
android/app/.gitignore
vendored
3
android/app/.gitignore
vendored
|
@ -27,3 +27,6 @@
|
|||
/src/main/res/drawable-mdpi/uk_northern_ireland.png
|
||||
/src/main/res/drawable-mdpi/uk_scotland.png
|
||||
/src/main/res/drawable-mdpi/uk_wales.png
|
||||
|
||||
# ignore autogenerated metadata (see prepareGoogleReleaseListing in build.gradle)
|
||||
/src/google/play/listings
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
../../../data/00_NotoNaskhArabic-Regular.ttf
|
|
@ -1 +0,0 @@
|
|||
../../../data/00_NotoSansThai-Regular.ttf
|
|
@ -1 +0,0 @@
|
|||
../../../data/00_NotoSerifDevanagari-Regular.ttf
|
|
@ -1 +0,0 @@
|
|||
../../../data/01_dejavusans.ttf
|
|
@ -1 +0,0 @@
|
|||
../../../data/02_droidsans-fallback.ttf
|
|
@ -1 +0,0 @@
|
|||
../../../data/03_jomolhari-id-a3d.ttf
|
|
@ -1 +0,0 @@
|
|||
../../../data/04_padauk.ttf
|
|
@ -1 +0,0 @@
|
|||
../../../data/05_khmeros.ttf
|
|
@ -1 +0,0 @@
|
|||
../../../data/06_code2000.ttf
|
|
@ -1 +0,0 @@
|
|||
../../../data/07_roboto_medium.ttf
|
|
@ -1 +0,0 @@
|
|||
../../../data/categories.txt
|
|
@ -1 +0,0 @@
|
|||
../../../data/categories_brands.txt
|
|
@ -1 +0,0 @@
|
|||
../../../data/categories_cuisines.txt
|
|
@ -1 +0,0 @@
|
|||
../../../data/classificator.txt
|
|
@ -1 +0,0 @@
|
|||
../../../data/colors.txt
|
|
@ -1 +0,0 @@
|
|||
../../../data/copyright.html
|
|
@ -1 +0,0 @@
|
|||
../../../data/countries-strings/
|
|
@ -1 +0,0 @@
|
|||
../../../data/countries.txt
|
|
@ -1 +0,0 @@
|
|||
../../../data/drules_proto_clear.bin
|
|
@ -1 +0,0 @@
|
|||
../../../data/drules_proto_dark.bin
|
|
@ -1 +0,0 @@
|
|||
../../../data/drules_proto_vehicle_clear.bin
|
|
@ -1 +0,0 @@
|
|||
../../../data/drules_proto_vehicle_dark.bin
|
|
@ -1 +0,0 @@
|
|||
../../../data/editor.config
|
|
@ -1 +0,0 @@
|
|||
../../../data/faq.html
|
|
@ -1 +0,0 @@
|
|||
../../../data/fonts_blacklist.txt
|
|
@ -1 +0,0 @@
|
|||
../../../data/fonts_whitelist.txt
|
|
@ -1 +0,0 @@
|
|||
../../../data/icudt73l.dat
|
|
@ -1 +0,0 @@
|
|||
../../../data/languages.txt
|
|
@ -1 +0,0 @@
|
|||
../../../data/opening_hours_how_to_edit.html
|
|
@ -1 +0,0 @@
|
|||
../../../data/packed_polygons.bin
|
|
@ -1 +0,0 @@
|
|||
../../../data/patterns.txt
|
|
@ -1 +0,0 @@
|
|||
../../../data/resources-6plus_clear
|
|
@ -1 +0,0 @@
|
|||
../../../data/resources-6plus_dark
|
|
@ -1 +0,0 @@
|
|||
../../../data/resources-default
|
|
@ -1 +0,0 @@
|
|||
../../../data/resources-hdpi_clear
|
|
@ -1 +0,0 @@
|
|||
../../../data/resources-hdpi_dark
|
|
@ -1 +0,0 @@
|
|||
../../../data/resources-mdpi_clear
|
|
@ -1 +0,0 @@
|
|||
../../../data/resources-mdpi_dark
|
|
@ -1 +0,0 @@
|
|||
../../../data/resources-xhdpi_clear
|
|
@ -1 +0,0 @@
|
|||
../../../data/resources-xhdpi_dark
|
|
@ -1 +0,0 @@
|
|||
../../../data/resources-xxhdpi_clear
|
|
@ -1 +0,0 @@
|
|||
../../../data/resources-xxhdpi_dark
|
|
@ -1 +0,0 @@
|
|||
../../../data/resources-xxxhdpi_clear
|
|
@ -1 +0,0 @@
|
|||
../../../data/resources-xxxhdpi_dark
|
|
@ -1 +0,0 @@
|
|||
../../../data/sound-strings
|
|
@ -1 +0,0 @@
|
|||
../../../data/transit_colors.txt
|
|
@ -1 +0,0 @@
|
|||
../../../data/types.txt
|
|
@ -1 +0,0 @@
|
|||
../../../data/unicode_blocks.txt
|
|
@ -1 +0,0 @@
|
|||
../../../data/vulkan_shaders
|
|
@ -14,10 +14,14 @@ buildscript {
|
|||
def isFdroid = taskName.contains('fdroid')
|
||||
def isBeta = taskName.contains('beta')
|
||||
|
||||
// Enable Google Mobile Services for all flavors except fdroid.
|
||||
def googleMobileServicesDefault = !isFdroid
|
||||
// Add a parameter to force GMS.
|
||||
ext.googleMobileServicesEnabled = project.hasProperty('gms') ?: googleMobileServicesDefault
|
||||
//
|
||||
// Please add symlinks to google/java/app/organicmaps/location for each new gms-enabled flavor below:
|
||||
// ```
|
||||
// mkdir -p src/$flavor/java/app/organicmaps/
|
||||
// ln -sf ../../../../google/java/app/organicmaps/location src/$flavor/java/app/organicmaps/
|
||||
// ls -la src/$flavor/java/app/organicmaps/location/GoogleFusedLocationProvider.java
|
||||
// ```
|
||||
ext.googleMobileServicesEnabled = taskName.contains('google') || taskName.contains('huawei') || taskName.contains('web')
|
||||
|
||||
// Enable Firebase for all beta flavors except fdroid only if google-services.json exists.
|
||||
def googleFirebaseServicesDefault = isBeta && !isFdroid && file('google-services.json').exists()
|
||||
|
@ -211,19 +215,7 @@ android {
|
|||
setProperty("archivesBaseName", appName.replaceAll("\\s","") + "-" + defaultConfig.versionCode)
|
||||
}
|
||||
|
||||
sourceSets.main {
|
||||
// manifest.srcFile 'AndroidManifest.xml'
|
||||
// res.srcDirs = ['res']
|
||||
// java.srcDirs = ['src']
|
||||
if (googleMobileServicesEnabled) {
|
||||
java.srcDirs += 'src/flavors/gms-enabled'
|
||||
} else {
|
||||
java.srcDirs += 'src/flavors/gms-disabled'
|
||||
}
|
||||
assets.srcDirs = ['assets']
|
||||
}
|
||||
|
||||
flavorDimensions 'default'
|
||||
flavorDimensions += 'default'
|
||||
|
||||
productFlavors {
|
||||
// 01 is a historical artefact, sorry.
|
||||
|
@ -234,21 +226,18 @@ android {
|
|||
versionName = android.defaultConfig.versionName + '-Google'
|
||||
buildConfigField 'String', 'SUPPORT_MAIL', '"googleplay@organicmaps.app"'
|
||||
buildConfigField 'String', 'REVIEW_URL', '"market://details?id=app.organicmaps"'
|
||||
android.sourceSets.google.assets.srcDirs = ['flavors/world-enabled']
|
||||
}
|
||||
|
||||
web {
|
||||
dimension "default"
|
||||
versionName = android.defaultConfig.versionName + '-Web'
|
||||
buildConfigField 'String', 'SUPPORT_MAIL', '"apk@organicmaps.app"'
|
||||
//android.sourceSets.web.assets.srcDirs = ['flavors/world-enabled']
|
||||
}
|
||||
|
||||
fdroid {
|
||||
dimension "default"
|
||||
versionName = android.defaultConfig.versionName + '-FDroid'
|
||||
buildConfigField 'String', 'SUPPORT_MAIL', '"fdroid@organicmaps.app"'
|
||||
//android.sourceSets.fdroid.assets.srcDirs = ['flavors/world-enabled']
|
||||
}
|
||||
|
||||
huawei {
|
||||
|
@ -257,7 +246,6 @@ android {
|
|||
versionCode = HUAWEI_VERSION_CODE_BASE + android.defaultConfig.versionCode
|
||||
buildConfigField 'String', 'SUPPORT_MAIL', '"huawei@organicmaps.app"'
|
||||
buildConfigField 'String', 'REVIEW_URL', '"appmarket://details?id=app.organicmaps"'
|
||||
android.sourceSets.huawei.assets.srcDirs = ['flavors/world-enabled']
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -436,8 +424,8 @@ task prepareGoogleReleaseListing {
|
|||
final sourceFlavor = 'fdroid'
|
||||
final targetFlavor = 'google'
|
||||
doLast {
|
||||
final sourceDir = new File("${projectDir}/src/main/$sourceFlavor/play/listings")
|
||||
final targetDir = new File("${projectDir}/src/main/$targetFlavor/play/listings")
|
||||
final sourceDir = new File("${projectDir}/src/$sourceFlavor/play/listings")
|
||||
final targetDir = new File("${projectDir}/src/$targetFlavor/play/listings")
|
||||
final sourceFiles = fileTree(dir: sourceDir,
|
||||
include: "**/*.txt", exclude: "**/*-${targetFlavor}.txt")
|
||||
sourceFiles.each { File sourceFile ->
|
||||
|
@ -484,7 +472,7 @@ huaweiPublish {
|
|||
'ta-IN': 'ta_IN',
|
||||
'te-IN': 'te_IN',
|
||||
]
|
||||
def files = fileTree(dir: "$projectDir/src/main/fdroid/play/listings",
|
||||
def files = fileTree(dir: "$projectDir/src/fdroid/play/listings",
|
||||
include: '**/release-notes.txt')
|
||||
files.each { File file ->
|
||||
def path = file.getPath()
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue