Skip to content

Commit

Permalink
removed huawei flavor
Browse files Browse the repository at this point in the history
  • Loading branch information
deckerst committed Jul 9, 2024
1 parent 5577657 commit eb9a001
Show file tree
Hide file tree
Showing 23 changed files with 6 additions and 953 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,6 @@ jobs:
cp build/app/outputs/bundle/playRelease/*.aab outputs
./flutterw build apk -t lib/main_play.dart --flavor play --bundle-sksl-path shaders.sksl.json
cp build/app/outputs/apk/play/release/*.apk outputs
scripts/apply_flavor_huawei.sh
./flutterw build apk -t lib/main_huawei.dart --flavor huawei --bundle-sksl-path shaders.sksl.json
cp build/app/outputs/apk/huawei/release/*.apk outputs
scripts/apply_flavor_izzy.sh
./flutterw build apk -t lib/main_izzy.dart --flavor izzy --split-per-abi
cp build/app/outputs/apk/izzy/release/*.apk outputs
Expand All @@ -65,7 +62,6 @@ jobs:
AVES_KEY_ALIAS: ${{ secrets.AVES_KEY_ALIAS }}
AVES_KEY_PASSWORD: ${{ secrets.AVES_KEY_PASSWORD }}
AVES_GOOGLE_API_KEY: ${{ secrets.AVES_GOOGLE_API_KEY }}
AVES_HUAWEI_API_KEY: ${{ secrets.AVES_HUAWEI_API_KEY }}

- name: Create a release with the APK and App Bundle.
uses: ncipollo/release-action@v1
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.

## <a id="unreleased"></a>[Unreleased]

### Removed

- `huawei` app flavor

## <a id="v1.11.4"></a>[v1.11.4] - 2024-07-09

### Added
Expand Down
19 changes: 1 addition & 18 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ if (keystorePropertiesFile.exists()) {
keystoreProperties["keyAlias"] = System.getenv("AVES_KEY_ALIAS") ?: "<NONE>"
keystoreProperties["keyPassword"] = System.getenv("AVES_KEY_PASSWORD") ?: "<NONE>"
keystoreProperties["googleApiKey"] = System.getenv("AVES_GOOGLE_API_KEY") ?: "<NONE>"
keystoreProperties["huaweiApiKey"] = System.getenv("AVES_HUAWEI_API_KEY") ?: "<NONE>"
}

android {
Expand Down Expand Up @@ -70,8 +69,7 @@ android {
targetSdk 34
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
manifestPlaceholders = [googleApiKey: keystoreProperties["googleApiKey"] ?: "<NONE>",
huaweiApiKey: keystoreProperties["huaweiApiKey"] ?: "<NONE>"]
manifestPlaceholders = [googleApiKey: keystoreProperties["googleApiKey"] ?: "<NONE>"]
multiDexEnabled true
}

Expand All @@ -94,13 +92,6 @@ android {
ext.useNdkAbiFilters = true
}

huawei {
// Huawei AppGallery
dimension "store"
// generate a universal APK without x86 native libs
ext.useNdkAbiFilters = true
}

izzy {
// IzzyOnDroid
// check offending libraries with `scanapk`
Expand Down Expand Up @@ -221,9 +212,6 @@ dependencies {
implementation 'com.github.deckerst.mp4parser:muxer:4cc0c5d06c'
implementation 'com.github.deckerst:pixymeta-android:9ec7097f17'

// huawei flavor only
huaweiImplementation "com.huawei.agconnect:agconnect-core:$huawei_agconnect_version"

testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.10.2'

kapt 'androidx.annotation:annotation:1.8.0'
Expand All @@ -237,8 +225,3 @@ if (useCrashlytics) {
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'
}

if (useHms) {
println("Building flavor with HMS plugin")
apply plugin: 'com.huawei.agconnect'
}
3 changes: 0 additions & 3 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -313,9 +313,6 @@
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="${googleApiKey}" />
<meta-data
android:name="deckers.thibault.aves.huawei.API_KEY"
android:value="${huaweiApiKey}" />
<meta-data
android:name="firebase_crashlytics_collection_enabled"
android:value="false" />
Expand Down
22 changes: 0 additions & 22 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,50 +1,28 @@
buildscript {
ext {
agp_version = '8.5.0' // same as `settings.ext.agp_version` in `/android/settings.gradle`
glide_version = '4.16.0'
// AppGallery Connect plugin versions: https://developer.huawei.com/consumer/en/doc/development/AppGallery-connect-Guides/agc-sdk-changenotes-0000001058732550
huawei_agconnect_version = '1.9.1.300'
abiCodes = ['armeabi-v7a': 1, 'arm64-v8a': 2, 'x86': 3, 'x86_64': 4]
useCrashlytics = gradle.startParameter.taskNames.any { task -> task.containsIgnoreCase("play") }
useHms = gradle.startParameter.taskNames.any { task -> task.containsIgnoreCase("huawei") }
}

repositories {
google()
mavenCentral()

if (useHms) {
// HMS (used by some flavors only)
maven { url 'https://developer.huawei.com/repo/' }
}
}

dependencies {
// necessary when applying plugin `com.huawei.agconnect`
classpath "com.android.tools.build:gradle:$agp_version"

if (useCrashlytics) {
// GMS & Firebase Crashlytics (used by some flavors only)
classpath 'com.google.gms:google-services:4.4.1'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.9'
}

if (useHms) {
// HMS (used by some flavors only)
classpath "com.huawei.agconnect:agcp:$huawei_agconnect_version"
}
}
}

allprojects {
repositories {
google()
mavenCentral()

if (useHms) {
// HMS (used by some flavors only)
maven { url 'https://developer.huawei.com/repo/' }
}
}

// gradle.projectsEvaluated {
Expand Down
4 changes: 0 additions & 4 deletions android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,3 @@ android.nonFinalResIds=false
# full mode is too aggressive and removes essential code
# of `metadata-extractor` even when adding `-keep class com.drew.**{ *; }`
android.enableR8.fullMode=false

# fix for AppGallery Connect plugin which does not support yet Gradle 8
# cf https://developer.huawei.com/consumer/en/doc/development/AppGallery-connect-Guides/agc-common-faq-0000001063210244#section17273113244910
apmsInstrumentationEnabled=false
1 change: 0 additions & 1 deletion android/key_template.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@ storePassword=<KEYSTORE_PASSWORD>
keyAlias=<KEY_ALIAS>
keyPassword=<KEY_PASSWORD>
googleApiKey=<GOOGLE_API_KEY>
huaweiApiKey=<HUAWEI_API_KEY>
4 changes: 1 addition & 3 deletions lib/app_flavor.dart
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
enum AppFlavor { play, huawei, izzy, libre }
enum AppFlavor { play, izzy, libre }

extension ExtraAppFlavor on AppFlavor {
bool get canEnableErrorReporting {
switch (this) {
case AppFlavor.play:
return true;
case AppFlavor.huawei:
case AppFlavor.izzy:
case AppFlavor.libre:
return false;
Expand All @@ -15,7 +14,6 @@ extension ExtraAppFlavor on AppFlavor {
bool get hasMapStyleDefault {
switch (this) {
case AppFlavor.play:
case AppFlavor.huawei:
return true;
case AppFlavor.izzy:
case AppFlavor.libre:
Expand Down
2 changes: 0 additions & 2 deletions lib/l10n/app_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,6 @@
"mapStyleGoogleNormal": "Google Maps",
"mapStyleGoogleHybrid": "Google Maps (Hybrid)",
"mapStyleGoogleTerrain": "Google Maps (Terrain)",
"mapStyleHuaweiNormal": "Petal Maps",
"mapStyleHuaweiTerrain": "Petal Maps (Terrain)",
"mapStyleOsmHot": "Humanitarian OSM",
"mapStyleStamenWatercolor": "Stamen Watercolor",

Expand Down
11 changes: 0 additions & 11 deletions lib/main_huawei.dart

This file was deleted.

14 changes: 0 additions & 14 deletions lib/model/app/dependencies.dart
Original file line number Diff line number Diff line change
Expand Up @@ -169,19 +169,6 @@ class Dependencies {
),
];

static const List<Dependency> _huaweiMobileServices = [
Dependency(
name: 'Huawei Mobile Services (Availability, Map)',
license: apache2,
licenseUrl: 'https://github.com/HMS-Core/hms-flutter-plugin/blob/master/LICENCE',
sourceUrl: 'https://github.com/HMS-Core/hms-flutter-plugin',
),
];

static const List<Dependency> _flutterPluginsHuaweiOnly = [
..._huaweiMobileServices,
];

static const List<Dependency> _flutterPluginsIzzyOnly = [
..._googleMobileServices,
];
Expand All @@ -199,7 +186,6 @@ class Dependencies {

static List<Dependency> flutterPlugins(AppFlavor flavor) => [
..._flutterPluginsCommon,
if (flavor == AppFlavor.huawei) ..._flutterPluginsHuaweiOnly,
if (flavor == AppFlavor.izzy) ..._flutterPluginsIzzyOnly,
if (flavor == AppFlavor.libre) ..._flutterPluginsLibreOnly,
if (flavor == AppFlavor.play) ..._flutterPluginsPlayOnly,
Expand Down
2 changes: 0 additions & 2 deletions lib/model/settings/enums/map_style.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ extension ExtraEntryMapStyle on EntryMapStyle {
case EntryMapStyle.googleNormal:
case EntryMapStyle.googleHybrid:
case EntryMapStyle.googleTerrain:
case EntryMapStyle.hmsNormal:
case EntryMapStyle.hmsTerrain:
return true;
default:
return false;
Expand Down
2 changes: 0 additions & 2 deletions lib/view/src/settings/enums.dart
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@ extension ExtraEntryMapStyleView on EntryMapStyle {
EntryMapStyle.googleNormal => l10n.mapStyleGoogleNormal,
EntryMapStyle.googleHybrid => l10n.mapStyleGoogleHybrid,
EntryMapStyle.googleTerrain => l10n.mapStyleGoogleTerrain,
EntryMapStyle.hmsNormal => l10n.mapStyleHuaweiNormal,
EntryMapStyle.hmsTerrain => l10n.mapStyleHuaweiTerrain,
EntryMapStyle.osmHot => l10n.mapStyleOsmHot,
EntryMapStyle.stamenWatercolor => l10n.mapStyleStamenWatercolor,
};
Expand Down
2 changes: 0 additions & 2 deletions lib/widgets/common/map/geo_map.dart
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,6 @@ class _GeoMapState extends State<GeoMap> {
case EntryMapStyle.googleNormal:
case EntryMapStyle.googleHybrid:
case EntryMapStyle.googleTerrain:
case EntryMapStyle.hmsNormal:
case EntryMapStyle.hmsTerrain:
child = mobileServices.buildMap<AvesEntry>(
controller: controller,
clusterListenable: _clusterChangeNotifier,
Expand Down
3 changes: 0 additions & 3 deletions plugins/aves_map/lib/src/style.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ enum EntryMapStyle {
googleNormal,
googleHybrid,
googleTerrain,
// Huawei
hmsNormal,
hmsTerrain,
// Leaflet
// browse providers at https://leaflet-extras.github.io/leaflet-providers/preview/
osmHot,
Expand Down
30 changes: 0 additions & 30 deletions plugins/aves_services_huawei/.gitignore

This file was deleted.

10 changes: 0 additions & 10 deletions plugins/aves_services_huawei/.metadata

This file was deleted.

1 change: 0 additions & 1 deletion plugins/aves_services_huawei/analysis_options.yaml

This file was deleted.

89 changes: 0 additions & 89 deletions plugins/aves_services_huawei/lib/aves_services_platform.dart

This file was deleted.

Loading

0 comments on commit eb9a001

Please sign in to comment.