From 8eff51cfb6d39f27f2060ef4cabc84f2e0d20000 Mon Sep 17 00:00:00 2001 From: Marvin W Date: Thu, 9 Jul 2020 09:53:37 +0200 Subject: [PATCH] Use flavors for mapbox vs vtm --- play-services-core/build.gradle | 41 +++++++++++-------- .../microg-ui-tools}/build.gradle | 0 .../src/main/AndroidManifest.xml | 0 .../tools/selfcheck/PermissionCheckGroup.java | 0 .../tools/selfcheck/SelfCheckGroup.java | 0 .../tools/ui/AbstractAboutFragment.java | 0 .../tools/ui/AbstractDashboardActivity.java | 0 .../tools/ui/AbstractSelfCheckFragment.java | 0 .../tools/ui/AbstractSettingsActivity.java | 0 .../tools/ui/AbstractSettingsFragment.java | 0 .../java/org/microg/tools/ui/Condition.java | 0 .../org/microg/tools/ui/DialogPreference.java | 0 .../tools/ui/DimmableIconPreference.java | 0 .../microg/tools/ui/LongTextPreference.java | 0 .../tools/ui/RadioButtonPreference.java | 0 .../tools/ui/ResourceSettingsFragment.java | 0 .../java/org/microg/tools/ui/SwitchBar.java | 0 .../ui/SwitchBarResourceSettingsFragment.java | 0 .../microg/tools/ui/TintIconPreference.java | 0 .../org/microg/tools/ui/ToggleSwitch.java | 0 .../res/drawable-v21/switchbar_background.xml | 0 .../src/main/res/drawable/empty.xml | 0 .../src/main/res/drawable/ic_expand_less.xml | 0 .../src/main/res/drawable/ic_expand_more.xml | 0 .../src/main/res/drawable/self_check.xml | 0 .../res/drawable/switchbar_background.xml | 0 .../preference_category_dashboard.xml | 0 .../res/layout-v21/preference_material.xml | 0 .../src/main/res/layout/about_root.xml | 0 .../src/main/res/layout/app_bar.xml | 0 .../src/main/res/layout/condition_card.xml | 0 .../main/res/layout/dashboard_activity.xml | 0 .../layout/preference_widget_radiobutton.xml | 0 .../src/main/res/layout/self_check.xml | 0 .../src/main/res/layout/self_check_entry.xml | 0 .../src/main/res/layout/self_check_group.xml | 0 .../src/main/res/layout/settings_activity.xml | 0 .../src/main/res/layout/switch_bar.xml | 0 .../src/main/res/layout/toolbar.xml | 0 .../src/main/res/values-de/strings.xml | 0 .../src/main/res/values-eo/strings.xml | 0 .../src/main/res/values-es/strings.xml | 0 .../src/main/res/values-fr/strings.xml | 0 .../src/main/res/values-pl/strings.xml | 0 .../src/main/res/values-ro/strings.xml | 0 .../src/main/res/values-ru/strings.xml | 0 .../src/main/res/values-sr/strings.xml | 0 .../src/main/res/values-uk/strings.xml | 0 .../src/main/res/values-zh-rTW/strings.xml | 0 .../src/main/res/values/colors.xml | 0 .../src/main/res/values/strings.xml | 0 .../java/org/microg/gms/ui/AboutFragment.java | 2 +- play-services-maps-core-vtm/build.gradle | 5 ++- .../gms/maps/internal/CreatorImpl.java | 3 +- .../microg/gms/maps/vtm/GoogleMapImpl.java | 3 +- .../vtm/bitmap/ResourceBitmapDescriptor.java | 3 +- .../vtm-microg-theme}/build.gradle | 0 .../resources/assets/styles/microg.xml | 0 .../resources/assets/symbols/dot_white.svg | 0 .../assets/symbols/transit/train_station.svg | 0 .../symbols/transit/train_station_small.svg | 0 .../src/org/oscim/theme/MicrogThemes.java | 0 settings.gradle | 11 +++-- 63 files changed, 40 insertions(+), 28 deletions(-) rename {microg-ui-tools => play-services-core/microg-ui-tools}/build.gradle (100%) rename {microg-ui-tools => play-services-core/microg-ui-tools}/src/main/AndroidManifest.xml (100%) rename {microg-ui-tools => play-services-core/microg-ui-tools}/src/main/java/org/microg/tools/selfcheck/PermissionCheckGroup.java (100%) rename {microg-ui-tools => play-services-core/microg-ui-tools}/src/main/java/org/microg/tools/selfcheck/SelfCheckGroup.java (100%) rename {microg-ui-tools => play-services-core/microg-ui-tools}/src/main/java/org/microg/tools/ui/AbstractAboutFragment.java (100%) rename {microg-ui-tools => play-services-core/microg-ui-tools}/src/main/java/org/microg/tools/ui/AbstractDashboardActivity.java (100%) rename {microg-ui-tools => play-services-core/microg-ui-tools}/src/main/java/org/microg/tools/ui/AbstractSelfCheckFragment.java (100%) rename {microg-ui-tools => play-services-core/microg-ui-tools}/src/main/java/org/microg/tools/ui/AbstractSettingsActivity.java (100%) rename {microg-ui-tools => play-services-core/microg-ui-tools}/src/main/java/org/microg/tools/ui/AbstractSettingsFragment.java (100%) rename {microg-ui-tools => play-services-core/microg-ui-tools}/src/main/java/org/microg/tools/ui/Condition.java (100%) rename {microg-ui-tools => play-services-core/microg-ui-tools}/src/main/java/org/microg/tools/ui/DialogPreference.java (100%) rename {microg-ui-tools => play-services-core/microg-ui-tools}/src/main/java/org/microg/tools/ui/DimmableIconPreference.java (100%) rename {microg-ui-tools => play-services-core/microg-ui-tools}/src/main/java/org/microg/tools/ui/LongTextPreference.java (100%) rename {microg-ui-tools => play-services-core/microg-ui-tools}/src/main/java/org/microg/tools/ui/RadioButtonPreference.java (100%) rename {microg-ui-tools => play-services-core/microg-ui-tools}/src/main/java/org/microg/tools/ui/ResourceSettingsFragment.java (100%) rename {microg-ui-tools => play-services-core/microg-ui-tools}/src/main/java/org/microg/tools/ui/SwitchBar.java (100%) rename {microg-ui-tools => play-services-core/microg-ui-tools}/src/main/java/org/microg/tools/ui/SwitchBarResourceSettingsFragment.java (100%) rename {microg-ui-tools => play-services-core/microg-ui-tools}/src/main/java/org/microg/tools/ui/TintIconPreference.java (100%) rename {microg-ui-tools => play-services-core/microg-ui-tools}/src/main/java/org/microg/tools/ui/ToggleSwitch.java (100%) rename {microg-ui-tools => play-services-core/microg-ui-tools}/src/main/res/drawable-v21/switchbar_background.xml (100%) rename {microg-ui-tools => play-services-core/microg-ui-tools}/src/main/res/drawable/empty.xml (100%) rename {microg-ui-tools => play-services-core/microg-ui-tools}/src/main/res/drawable/ic_expand_less.xml (100%) rename {microg-ui-tools => play-services-core/microg-ui-tools}/src/main/res/drawable/ic_expand_more.xml (100%) rename {microg-ui-tools => play-services-core/microg-ui-tools}/src/main/res/drawable/self_check.xml (100%) rename {microg-ui-tools => play-services-core/microg-ui-tools}/src/main/res/drawable/switchbar_background.xml (100%) rename {microg-ui-tools => play-services-core/microg-ui-tools}/src/main/res/layout-v14/preference_category_dashboard.xml (100%) rename {microg-ui-tools => play-services-core/microg-ui-tools}/src/main/res/layout-v21/preference_material.xml (100%) rename {microg-ui-tools => play-services-core/microg-ui-tools}/src/main/res/layout/about_root.xml (100%) rename {microg-ui-tools => play-services-core/microg-ui-tools}/src/main/res/layout/app_bar.xml (100%) rename {microg-ui-tools => play-services-core/microg-ui-tools}/src/main/res/layout/condition_card.xml (100%) rename {microg-ui-tools => play-services-core/microg-ui-tools}/src/main/res/layout/dashboard_activity.xml (100%) rename {microg-ui-tools => play-services-core/microg-ui-tools}/src/main/res/layout/preference_widget_radiobutton.xml (100%) rename {microg-ui-tools => play-services-core/microg-ui-tools}/src/main/res/layout/self_check.xml (100%) rename {microg-ui-tools => play-services-core/microg-ui-tools}/src/main/res/layout/self_check_entry.xml (100%) rename {microg-ui-tools => play-services-core/microg-ui-tools}/src/main/res/layout/self_check_group.xml (100%) rename {microg-ui-tools => play-services-core/microg-ui-tools}/src/main/res/layout/settings_activity.xml (100%) rename {microg-ui-tools => play-services-core/microg-ui-tools}/src/main/res/layout/switch_bar.xml (100%) rename {microg-ui-tools => play-services-core/microg-ui-tools}/src/main/res/layout/toolbar.xml (100%) rename {microg-ui-tools => play-services-core/microg-ui-tools}/src/main/res/values-de/strings.xml (100%) rename {microg-ui-tools => play-services-core/microg-ui-tools}/src/main/res/values-eo/strings.xml (100%) rename {microg-ui-tools => play-services-core/microg-ui-tools}/src/main/res/values-es/strings.xml (100%) rename {microg-ui-tools => play-services-core/microg-ui-tools}/src/main/res/values-fr/strings.xml (100%) rename {microg-ui-tools => play-services-core/microg-ui-tools}/src/main/res/values-pl/strings.xml (100%) rename {microg-ui-tools => play-services-core/microg-ui-tools}/src/main/res/values-ro/strings.xml (100%) rename {microg-ui-tools => play-services-core/microg-ui-tools}/src/main/res/values-ru/strings.xml (100%) rename {microg-ui-tools => play-services-core/microg-ui-tools}/src/main/res/values-sr/strings.xml (100%) rename {microg-ui-tools => play-services-core/microg-ui-tools}/src/main/res/values-uk/strings.xml (100%) rename {microg-ui-tools => play-services-core/microg-ui-tools}/src/main/res/values-zh-rTW/strings.xml (100%) rename {microg-ui-tools => play-services-core/microg-ui-tools}/src/main/res/values/colors.xml (100%) rename {microg-ui-tools => play-services-core/microg-ui-tools}/src/main/res/values/strings.xml (100%) rename {vtm-microg-theme => play-services-maps-core-vtm/vtm-microg-theme}/build.gradle (100%) rename {vtm-microg-theme => play-services-maps-core-vtm/vtm-microg-theme}/resources/assets/styles/microg.xml (100%) rename {vtm-microg-theme => play-services-maps-core-vtm/vtm-microg-theme}/resources/assets/symbols/dot_white.svg (100%) rename {vtm-microg-theme => play-services-maps-core-vtm/vtm-microg-theme}/resources/assets/symbols/transit/train_station.svg (100%) rename {vtm-microg-theme => play-services-maps-core-vtm/vtm-microg-theme}/resources/assets/symbols/transit/train_station_small.svg (100%) rename {vtm-microg-theme => play-services-maps-core-vtm/vtm-microg-theme}/src/org/oscim/theme/MicrogThemes.java (100%) diff --git a/play-services-core/build.gradle b/play-services-core/build.gradle index 4074b43c..b55d79ef 100644 --- a/play-services-core/build.gradle +++ b/play-services-core/build.gradle @@ -16,17 +16,12 @@ apply plugin: 'com.android.application' -def useMapbox() { - Properties properties = new Properties() - properties.load(project.rootProject.file('local.properties').newDataInputStream()) - return properties.getProperty("mapbox.enabled", "false") == "true" +configurations { + mapboxImplementation + vtmImplementation } dependencies { - implementation "androidx.multidex:multidex:$multidexVersion" - implementation "androidx.appcompat:appcompat:$appcompatVersion" - implementation "androidx.mediarouter:mediarouter:$mediarouterVersion" - implementation "androidx.preference:preference:$preferenceVersion" implementation "com.squareup.wire:wire-runtime:1.6.1" implementation "de.hdodenhof:circleimageview:1.3.0" implementation "org.conscrypt:conscrypt-android:2.1.0" @@ -42,18 +37,21 @@ dependencies { implementation project(':play-services-base-core') implementation project(':play-services-location-core') - implementation project(':microg-ui-tools') + implementation project(':play-services-core:microg-ui-tools') // deprecated implementation project(':play-services-api') implementation project(':play-services-cast-api') implementation project(':play-services-wearable') implementation "org.microg:wearable:$wearableVersion" implementation "org.microg.gms:remote-droid-guard:$remoteDroidGuardVersion" - if (useMapbox()) { - implementation project(':play-services-maps-core-mapbox') - } else { - implementation project(':play-services-maps-core-vtm') - } + mapboxImplementation project(':play-services-maps-core-mapbox') + vtmImplementation project(':play-services-maps-core-vtm') + + // AndroidX UI + implementation "androidx.multidex:multidex:$multidexVersion" + implementation "androidx.appcompat:appcompat:$appcompatVersion" + implementation "androidx.mediarouter:mediarouter:$mediarouterVersion" + implementation "androidx.preference:preference:$preferenceVersion" // Navigation implementation "androidx.navigation:navigation-fragment:$navigationVersion" @@ -67,13 +65,13 @@ android { buildToolsVersion "$androidBuildVersionTools" defaultConfig { - versionName version + (useMapbox() ? "" : "-vtm") + versionName version versionCode appVersionCode minSdkVersion androidMinSdk targetSdkVersion androidTargetSdk - buildConfigField "boolean", "USE_MAPBOX", "${useMapbox()}" +// buildConfigField "boolean", "USE_MAPBOX", "${useMapbox()}" multiDexEnabled true @@ -103,6 +101,17 @@ android { } } + flavorDimensions 'maps' + productFlavors { + mapbox { + dimension 'maps' + } + vtm { + dimension 'maps' + versionNameSuffix '-vtm' + } + } + compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 diff --git a/microg-ui-tools/build.gradle b/play-services-core/microg-ui-tools/build.gradle similarity index 100% rename from microg-ui-tools/build.gradle rename to play-services-core/microg-ui-tools/build.gradle diff --git a/microg-ui-tools/src/main/AndroidManifest.xml b/play-services-core/microg-ui-tools/src/main/AndroidManifest.xml similarity index 100% rename from microg-ui-tools/src/main/AndroidManifest.xml rename to play-services-core/microg-ui-tools/src/main/AndroidManifest.xml diff --git a/microg-ui-tools/src/main/java/org/microg/tools/selfcheck/PermissionCheckGroup.java b/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/selfcheck/PermissionCheckGroup.java similarity index 100% rename from microg-ui-tools/src/main/java/org/microg/tools/selfcheck/PermissionCheckGroup.java rename to play-services-core/microg-ui-tools/src/main/java/org/microg/tools/selfcheck/PermissionCheckGroup.java diff --git a/microg-ui-tools/src/main/java/org/microg/tools/selfcheck/SelfCheckGroup.java b/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/selfcheck/SelfCheckGroup.java similarity index 100% rename from microg-ui-tools/src/main/java/org/microg/tools/selfcheck/SelfCheckGroup.java rename to play-services-core/microg-ui-tools/src/main/java/org/microg/tools/selfcheck/SelfCheckGroup.java diff --git a/microg-ui-tools/src/main/java/org/microg/tools/ui/AbstractAboutFragment.java b/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/AbstractAboutFragment.java similarity index 100% rename from microg-ui-tools/src/main/java/org/microg/tools/ui/AbstractAboutFragment.java rename to play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/AbstractAboutFragment.java diff --git a/microg-ui-tools/src/main/java/org/microg/tools/ui/AbstractDashboardActivity.java b/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/AbstractDashboardActivity.java similarity index 100% rename from microg-ui-tools/src/main/java/org/microg/tools/ui/AbstractDashboardActivity.java rename to play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/AbstractDashboardActivity.java diff --git a/microg-ui-tools/src/main/java/org/microg/tools/ui/AbstractSelfCheckFragment.java b/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/AbstractSelfCheckFragment.java similarity index 100% rename from microg-ui-tools/src/main/java/org/microg/tools/ui/AbstractSelfCheckFragment.java rename to play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/AbstractSelfCheckFragment.java diff --git a/microg-ui-tools/src/main/java/org/microg/tools/ui/AbstractSettingsActivity.java b/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/AbstractSettingsActivity.java similarity index 100% rename from microg-ui-tools/src/main/java/org/microg/tools/ui/AbstractSettingsActivity.java rename to play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/AbstractSettingsActivity.java diff --git a/microg-ui-tools/src/main/java/org/microg/tools/ui/AbstractSettingsFragment.java b/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/AbstractSettingsFragment.java similarity index 100% rename from microg-ui-tools/src/main/java/org/microg/tools/ui/AbstractSettingsFragment.java rename to play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/AbstractSettingsFragment.java diff --git a/microg-ui-tools/src/main/java/org/microg/tools/ui/Condition.java b/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/Condition.java similarity index 100% rename from microg-ui-tools/src/main/java/org/microg/tools/ui/Condition.java rename to play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/Condition.java diff --git a/microg-ui-tools/src/main/java/org/microg/tools/ui/DialogPreference.java b/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/DialogPreference.java similarity index 100% rename from microg-ui-tools/src/main/java/org/microg/tools/ui/DialogPreference.java rename to play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/DialogPreference.java diff --git a/microg-ui-tools/src/main/java/org/microg/tools/ui/DimmableIconPreference.java b/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/DimmableIconPreference.java similarity index 100% rename from microg-ui-tools/src/main/java/org/microg/tools/ui/DimmableIconPreference.java rename to play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/DimmableIconPreference.java diff --git a/microg-ui-tools/src/main/java/org/microg/tools/ui/LongTextPreference.java b/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/LongTextPreference.java similarity index 100% rename from microg-ui-tools/src/main/java/org/microg/tools/ui/LongTextPreference.java rename to play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/LongTextPreference.java diff --git a/microg-ui-tools/src/main/java/org/microg/tools/ui/RadioButtonPreference.java b/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/RadioButtonPreference.java similarity index 100% rename from microg-ui-tools/src/main/java/org/microg/tools/ui/RadioButtonPreference.java rename to play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/RadioButtonPreference.java diff --git a/microg-ui-tools/src/main/java/org/microg/tools/ui/ResourceSettingsFragment.java b/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/ResourceSettingsFragment.java similarity index 100% rename from microg-ui-tools/src/main/java/org/microg/tools/ui/ResourceSettingsFragment.java rename to play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/ResourceSettingsFragment.java diff --git a/microg-ui-tools/src/main/java/org/microg/tools/ui/SwitchBar.java b/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/SwitchBar.java similarity index 100% rename from microg-ui-tools/src/main/java/org/microg/tools/ui/SwitchBar.java rename to play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/SwitchBar.java diff --git a/microg-ui-tools/src/main/java/org/microg/tools/ui/SwitchBarResourceSettingsFragment.java b/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/SwitchBarResourceSettingsFragment.java similarity index 100% rename from microg-ui-tools/src/main/java/org/microg/tools/ui/SwitchBarResourceSettingsFragment.java rename to play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/SwitchBarResourceSettingsFragment.java diff --git a/microg-ui-tools/src/main/java/org/microg/tools/ui/TintIconPreference.java b/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/TintIconPreference.java similarity index 100% rename from microg-ui-tools/src/main/java/org/microg/tools/ui/TintIconPreference.java rename to play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/TintIconPreference.java diff --git a/microg-ui-tools/src/main/java/org/microg/tools/ui/ToggleSwitch.java b/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/ToggleSwitch.java similarity index 100% rename from microg-ui-tools/src/main/java/org/microg/tools/ui/ToggleSwitch.java rename to play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/ToggleSwitch.java diff --git a/microg-ui-tools/src/main/res/drawable-v21/switchbar_background.xml b/play-services-core/microg-ui-tools/src/main/res/drawable-v21/switchbar_background.xml similarity index 100% rename from microg-ui-tools/src/main/res/drawable-v21/switchbar_background.xml rename to play-services-core/microg-ui-tools/src/main/res/drawable-v21/switchbar_background.xml diff --git a/microg-ui-tools/src/main/res/drawable/empty.xml b/play-services-core/microg-ui-tools/src/main/res/drawable/empty.xml similarity index 100% rename from microg-ui-tools/src/main/res/drawable/empty.xml rename to play-services-core/microg-ui-tools/src/main/res/drawable/empty.xml diff --git a/microg-ui-tools/src/main/res/drawable/ic_expand_less.xml b/play-services-core/microg-ui-tools/src/main/res/drawable/ic_expand_less.xml similarity index 100% rename from microg-ui-tools/src/main/res/drawable/ic_expand_less.xml rename to play-services-core/microg-ui-tools/src/main/res/drawable/ic_expand_less.xml diff --git a/microg-ui-tools/src/main/res/drawable/ic_expand_more.xml b/play-services-core/microg-ui-tools/src/main/res/drawable/ic_expand_more.xml similarity index 100% rename from microg-ui-tools/src/main/res/drawable/ic_expand_more.xml rename to play-services-core/microg-ui-tools/src/main/res/drawable/ic_expand_more.xml diff --git a/microg-ui-tools/src/main/res/drawable/self_check.xml b/play-services-core/microg-ui-tools/src/main/res/drawable/self_check.xml similarity index 100% rename from microg-ui-tools/src/main/res/drawable/self_check.xml rename to play-services-core/microg-ui-tools/src/main/res/drawable/self_check.xml diff --git a/microg-ui-tools/src/main/res/drawable/switchbar_background.xml b/play-services-core/microg-ui-tools/src/main/res/drawable/switchbar_background.xml similarity index 100% rename from microg-ui-tools/src/main/res/drawable/switchbar_background.xml rename to play-services-core/microg-ui-tools/src/main/res/drawable/switchbar_background.xml diff --git a/microg-ui-tools/src/main/res/layout-v14/preference_category_dashboard.xml b/play-services-core/microg-ui-tools/src/main/res/layout-v14/preference_category_dashboard.xml similarity index 100% rename from microg-ui-tools/src/main/res/layout-v14/preference_category_dashboard.xml rename to play-services-core/microg-ui-tools/src/main/res/layout-v14/preference_category_dashboard.xml diff --git a/microg-ui-tools/src/main/res/layout-v21/preference_material.xml b/play-services-core/microg-ui-tools/src/main/res/layout-v21/preference_material.xml similarity index 100% rename from microg-ui-tools/src/main/res/layout-v21/preference_material.xml rename to play-services-core/microg-ui-tools/src/main/res/layout-v21/preference_material.xml diff --git a/microg-ui-tools/src/main/res/layout/about_root.xml b/play-services-core/microg-ui-tools/src/main/res/layout/about_root.xml similarity index 100% rename from microg-ui-tools/src/main/res/layout/about_root.xml rename to play-services-core/microg-ui-tools/src/main/res/layout/about_root.xml diff --git a/microg-ui-tools/src/main/res/layout/app_bar.xml b/play-services-core/microg-ui-tools/src/main/res/layout/app_bar.xml similarity index 100% rename from microg-ui-tools/src/main/res/layout/app_bar.xml rename to play-services-core/microg-ui-tools/src/main/res/layout/app_bar.xml diff --git a/microg-ui-tools/src/main/res/layout/condition_card.xml b/play-services-core/microg-ui-tools/src/main/res/layout/condition_card.xml similarity index 100% rename from microg-ui-tools/src/main/res/layout/condition_card.xml rename to play-services-core/microg-ui-tools/src/main/res/layout/condition_card.xml diff --git a/microg-ui-tools/src/main/res/layout/dashboard_activity.xml b/play-services-core/microg-ui-tools/src/main/res/layout/dashboard_activity.xml similarity index 100% rename from microg-ui-tools/src/main/res/layout/dashboard_activity.xml rename to play-services-core/microg-ui-tools/src/main/res/layout/dashboard_activity.xml diff --git a/microg-ui-tools/src/main/res/layout/preference_widget_radiobutton.xml b/play-services-core/microg-ui-tools/src/main/res/layout/preference_widget_radiobutton.xml similarity index 100% rename from microg-ui-tools/src/main/res/layout/preference_widget_radiobutton.xml rename to play-services-core/microg-ui-tools/src/main/res/layout/preference_widget_radiobutton.xml diff --git a/microg-ui-tools/src/main/res/layout/self_check.xml b/play-services-core/microg-ui-tools/src/main/res/layout/self_check.xml similarity index 100% rename from microg-ui-tools/src/main/res/layout/self_check.xml rename to play-services-core/microg-ui-tools/src/main/res/layout/self_check.xml diff --git a/microg-ui-tools/src/main/res/layout/self_check_entry.xml b/play-services-core/microg-ui-tools/src/main/res/layout/self_check_entry.xml similarity index 100% rename from microg-ui-tools/src/main/res/layout/self_check_entry.xml rename to play-services-core/microg-ui-tools/src/main/res/layout/self_check_entry.xml diff --git a/microg-ui-tools/src/main/res/layout/self_check_group.xml b/play-services-core/microg-ui-tools/src/main/res/layout/self_check_group.xml similarity index 100% rename from microg-ui-tools/src/main/res/layout/self_check_group.xml rename to play-services-core/microg-ui-tools/src/main/res/layout/self_check_group.xml diff --git a/microg-ui-tools/src/main/res/layout/settings_activity.xml b/play-services-core/microg-ui-tools/src/main/res/layout/settings_activity.xml similarity index 100% rename from microg-ui-tools/src/main/res/layout/settings_activity.xml rename to play-services-core/microg-ui-tools/src/main/res/layout/settings_activity.xml diff --git a/microg-ui-tools/src/main/res/layout/switch_bar.xml b/play-services-core/microg-ui-tools/src/main/res/layout/switch_bar.xml similarity index 100% rename from microg-ui-tools/src/main/res/layout/switch_bar.xml rename to play-services-core/microg-ui-tools/src/main/res/layout/switch_bar.xml diff --git a/microg-ui-tools/src/main/res/layout/toolbar.xml b/play-services-core/microg-ui-tools/src/main/res/layout/toolbar.xml similarity index 100% rename from microg-ui-tools/src/main/res/layout/toolbar.xml rename to play-services-core/microg-ui-tools/src/main/res/layout/toolbar.xml diff --git a/microg-ui-tools/src/main/res/values-de/strings.xml b/play-services-core/microg-ui-tools/src/main/res/values-de/strings.xml similarity index 100% rename from microg-ui-tools/src/main/res/values-de/strings.xml rename to play-services-core/microg-ui-tools/src/main/res/values-de/strings.xml diff --git a/microg-ui-tools/src/main/res/values-eo/strings.xml b/play-services-core/microg-ui-tools/src/main/res/values-eo/strings.xml similarity index 100% rename from microg-ui-tools/src/main/res/values-eo/strings.xml rename to play-services-core/microg-ui-tools/src/main/res/values-eo/strings.xml diff --git a/microg-ui-tools/src/main/res/values-es/strings.xml b/play-services-core/microg-ui-tools/src/main/res/values-es/strings.xml similarity index 100% rename from microg-ui-tools/src/main/res/values-es/strings.xml rename to play-services-core/microg-ui-tools/src/main/res/values-es/strings.xml diff --git a/microg-ui-tools/src/main/res/values-fr/strings.xml b/play-services-core/microg-ui-tools/src/main/res/values-fr/strings.xml similarity index 100% rename from microg-ui-tools/src/main/res/values-fr/strings.xml rename to play-services-core/microg-ui-tools/src/main/res/values-fr/strings.xml diff --git a/microg-ui-tools/src/main/res/values-pl/strings.xml b/play-services-core/microg-ui-tools/src/main/res/values-pl/strings.xml similarity index 100% rename from microg-ui-tools/src/main/res/values-pl/strings.xml rename to play-services-core/microg-ui-tools/src/main/res/values-pl/strings.xml diff --git a/microg-ui-tools/src/main/res/values-ro/strings.xml b/play-services-core/microg-ui-tools/src/main/res/values-ro/strings.xml similarity index 100% rename from microg-ui-tools/src/main/res/values-ro/strings.xml rename to play-services-core/microg-ui-tools/src/main/res/values-ro/strings.xml diff --git a/microg-ui-tools/src/main/res/values-ru/strings.xml b/play-services-core/microg-ui-tools/src/main/res/values-ru/strings.xml similarity index 100% rename from microg-ui-tools/src/main/res/values-ru/strings.xml rename to play-services-core/microg-ui-tools/src/main/res/values-ru/strings.xml diff --git a/microg-ui-tools/src/main/res/values-sr/strings.xml b/play-services-core/microg-ui-tools/src/main/res/values-sr/strings.xml similarity index 100% rename from microg-ui-tools/src/main/res/values-sr/strings.xml rename to play-services-core/microg-ui-tools/src/main/res/values-sr/strings.xml diff --git a/microg-ui-tools/src/main/res/values-uk/strings.xml b/play-services-core/microg-ui-tools/src/main/res/values-uk/strings.xml similarity index 100% rename from microg-ui-tools/src/main/res/values-uk/strings.xml rename to play-services-core/microg-ui-tools/src/main/res/values-uk/strings.xml diff --git a/microg-ui-tools/src/main/res/values-zh-rTW/strings.xml b/play-services-core/microg-ui-tools/src/main/res/values-zh-rTW/strings.xml similarity index 100% rename from microg-ui-tools/src/main/res/values-zh-rTW/strings.xml rename to play-services-core/microg-ui-tools/src/main/res/values-zh-rTW/strings.xml diff --git a/microg-ui-tools/src/main/res/values/colors.xml b/play-services-core/microg-ui-tools/src/main/res/values/colors.xml similarity index 100% rename from microg-ui-tools/src/main/res/values/colors.xml rename to play-services-core/microg-ui-tools/src/main/res/values/colors.xml diff --git a/microg-ui-tools/src/main/res/values/strings.xml b/play-services-core/microg-ui-tools/src/main/res/values/strings.xml similarity index 100% rename from microg-ui-tools/src/main/res/values/strings.xml rename to play-services-core/microg-ui-tools/src/main/res/values/strings.xml diff --git a/play-services-core/src/main/java/org/microg/gms/ui/AboutFragment.java b/play-services-core/src/main/java/org/microg/gms/ui/AboutFragment.java index ba534286..0e863358 100644 --- a/play-services-core/src/main/java/org/microg/gms/ui/AboutFragment.java +++ b/play-services-core/src/main/java/org/microg/gms/ui/AboutFragment.java @@ -29,7 +29,7 @@ public class AboutFragment extends AbstractAboutFragment { @Override protected void collectLibraries(List libraries) { - if (BuildConfig.USE_MAPBOX) { + if (BuildConfig.FLAVOR.contains("mapbox")) { libraries.add(new AbstractAboutFragment.Library("com.mapbox.mapboxsdk", "Mapbox Maps SDK for Android", "Three-Clause BSD, Mapbox")); } else { libraries.add(new AbstractAboutFragment.Library("org.oscim.android", "V™", "GNU LGPLv3, Hannes Janetzek and devemux86")); diff --git a/play-services-maps-core-vtm/build.gradle b/play-services-maps-core-vtm/build.gradle index 222be961..1a00c16e 100644 --- a/play-services-maps-core-vtm/build.gradle +++ b/play-services-maps-core-vtm/build.gradle @@ -17,7 +17,6 @@ apply plugin: "com.android.library" dependencies { - implementation project(":microg-ui-tools") implementation project(":play-services-api") implementation "org.microg:vtm-android:0.9.1-mod" @@ -28,7 +27,9 @@ dependencies { implementation "org.microg:vtm-android:0.9.1-mod:natives-x86_64" implementation "org.microg:vtm-extras:0.9.1-mod" implementation "org.microg:vtm-jts:0.9.1-mod" - implementation project(":vtm-microg-theme") + implementation project(":play-services-maps-core-vtm:vtm-microg-theme") + + implementation "androidx.appcompat:appcompat:$appcompatVersion" } def execResult(...args) { diff --git a/play-services-maps-core-vtm/src/main/java/com/google/android/gms/maps/internal/CreatorImpl.java b/play-services-maps-core-vtm/src/main/java/com/google/android/gms/maps/internal/CreatorImpl.java index e6471dfe..42e83ec3 100644 --- a/play-services-maps-core-vtm/src/main/java/com/google/android/gms/maps/internal/CreatorImpl.java +++ b/play-services-maps-core-vtm/src/main/java/com/google/android/gms/maps/internal/CreatorImpl.java @@ -21,9 +21,10 @@ import android.content.Context; import android.content.res.Resources; import android.os.Parcel; import android.os.RemoteException; -import android.support.annotation.Keep; import android.util.Log; +import androidx.annotation.Keep; + import com.google.android.gms.dynamic.IObjectWrapper; import com.google.android.gms.dynamic.ObjectWrapper; import com.google.android.gms.maps.GoogleMapOptions; diff --git a/play-services-maps-core-vtm/src/main/java/org/microg/gms/maps/vtm/GoogleMapImpl.java b/play-services-maps-core-vtm/src/main/java/org/microg/gms/maps/vtm/GoogleMapImpl.java index b18189a4..f34c066e 100644 --- a/play-services-maps-core-vtm/src/main/java/org/microg/gms/maps/vtm/GoogleMapImpl.java +++ b/play-services-maps-core-vtm/src/main/java/org/microg/gms/maps/vtm/GoogleMapImpl.java @@ -27,10 +27,11 @@ import android.os.Handler; import android.os.Looper; import android.os.Parcel; import android.os.RemoteException; -import android.support.v4.content.ContextCompat; import android.util.Log; import android.view.View; +import androidx.core.content.ContextCompat; + import com.google.android.gms.dynamic.IObjectWrapper; import com.google.android.gms.dynamic.ObjectWrapper; import com.google.android.gms.maps.GoogleMapOptions; diff --git a/play-services-maps-core-vtm/src/main/java/org/microg/gms/maps/vtm/bitmap/ResourceBitmapDescriptor.java b/play-services-maps-core-vtm/src/main/java/org/microg/gms/maps/vtm/bitmap/ResourceBitmapDescriptor.java index 9a31d284..d06f38a0 100644 --- a/play-services-maps-core-vtm/src/main/java/org/microg/gms/maps/vtm/bitmap/ResourceBitmapDescriptor.java +++ b/play-services-maps-core-vtm/src/main/java/org/microg/gms/maps/vtm/bitmap/ResourceBitmapDescriptor.java @@ -21,7 +21,8 @@ import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.Drawable; -import android.support.v4.content.ContextCompat; + +import androidx.core.content.ContextCompat; public class ResourceBitmapDescriptor extends AbstractBitmapDescriptor { private int resourceId; diff --git a/vtm-microg-theme/build.gradle b/play-services-maps-core-vtm/vtm-microg-theme/build.gradle similarity index 100% rename from vtm-microg-theme/build.gradle rename to play-services-maps-core-vtm/vtm-microg-theme/build.gradle diff --git a/vtm-microg-theme/resources/assets/styles/microg.xml b/play-services-maps-core-vtm/vtm-microg-theme/resources/assets/styles/microg.xml similarity index 100% rename from vtm-microg-theme/resources/assets/styles/microg.xml rename to play-services-maps-core-vtm/vtm-microg-theme/resources/assets/styles/microg.xml diff --git a/vtm-microg-theme/resources/assets/symbols/dot_white.svg b/play-services-maps-core-vtm/vtm-microg-theme/resources/assets/symbols/dot_white.svg similarity index 100% rename from vtm-microg-theme/resources/assets/symbols/dot_white.svg rename to play-services-maps-core-vtm/vtm-microg-theme/resources/assets/symbols/dot_white.svg diff --git a/vtm-microg-theme/resources/assets/symbols/transit/train_station.svg b/play-services-maps-core-vtm/vtm-microg-theme/resources/assets/symbols/transit/train_station.svg similarity index 100% rename from vtm-microg-theme/resources/assets/symbols/transit/train_station.svg rename to play-services-maps-core-vtm/vtm-microg-theme/resources/assets/symbols/transit/train_station.svg diff --git a/vtm-microg-theme/resources/assets/symbols/transit/train_station_small.svg b/play-services-maps-core-vtm/vtm-microg-theme/resources/assets/symbols/transit/train_station_small.svg similarity index 100% rename from vtm-microg-theme/resources/assets/symbols/transit/train_station_small.svg rename to play-services-maps-core-vtm/vtm-microg-theme/resources/assets/symbols/transit/train_station_small.svg diff --git a/vtm-microg-theme/src/org/oscim/theme/MicrogThemes.java b/play-services-maps-core-vtm/vtm-microg-theme/src/org/oscim/theme/MicrogThemes.java similarity index 100% rename from vtm-microg-theme/src/org/oscim/theme/MicrogThemes.java rename to play-services-maps-core-vtm/vtm-microg-theme/src/org/oscim/theme/MicrogThemes.java diff --git a/settings.gradle b/settings.gradle index a45825e1..72474e43 100644 --- a/settings.gradle +++ b/settings.gradle @@ -13,14 +13,13 @@ include ':play-services-base' include ':play-services-tasks' include ':play-services-wearable' -include ':play-services-maps-core-mapbox' -include ':play-services-maps-core-vtm' include ':play-services-base-core' include ':play-services-location-core' +include ':play-services-maps-core-mapbox' +include ':play-services-maps-core-vtm' +include ':play-services-maps-core-vtm:vtm-microg-theme' + include ':play-services-core' +include ':play-services-core:microg-ui-tools' -include ':microg-ui-tools' -include ':vtm-microg-theme' - -include ':remote-droid-guard-lib'