Skip to content

Commit

Permalink
[Amended 1.4.2] Define the "mainlandChina" store flavour (#836)
Browse files Browse the repository at this point in the history
  • Loading branch information
felipeerias committed Aug 7, 2023
1 parent af6b625 commit ece374d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
assembleOculusvrArm64WorldGeckoGeneric,
assembleOculusvrArm64WorldGeckoMetaStore,
assembleHvrArm64WorldGeckoGeneric,
assembleHvrArm64GeckoMainlandChina
assemblePicoxrArm64WorldGeckoGeneric,
assembleLynxArm64WorldGeckoGeneric,
assembleSpacesArm64WorldGeckoGeneric
Expand Down
23 changes: 13 additions & 10 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,14 @@ android {
}
}
}

mainlandChina {
applicationId "com.cn.igalia.wolvic"
dimension "store"
buildConfigField "Boolean", "FXA_USE_CHINA_SERVER", "true"
buildConfigField "Boolean", "WEBVIEW_IN_PHONE_UI", "true"
buildConfigField "Boolean", "CN_FIRST_RUN_IN_PHONE_UI", "true"
}
}

variantFilter { variant ->
Expand All @@ -365,7 +373,7 @@ android {
variant.setIgnore(platform != 'noapi');

// Create variants for China only for HVR platforms
if (country == 'cn' && !platform.startsWith('hvr'))
if (store == 'mainlandChina' && !platform.startsWith('hvr'))
variant.setIgnore(true);

// Create variants for chromium/webkit, only when they are available
Expand Down Expand Up @@ -711,15 +719,10 @@ android.applicationVariants.all { variant ->
println("X_X")
}

def platform = variant.productFlavors.get(0).name
def country = variant.productFlavors.get(2).name

// HVR packages for mainland china must only use HVR speech recognition system.
// HVR packages for overseas should have 2D phone UI enabled.
if (platform.toLowerCase().startsWith('hvr')) {
if (country != 'cn')
variant.buildConfigField "Boolean", "WEBVIEW_IN_PHONE_UI", "true"
else
variant.buildConfigField "String[]", "SPEECH_SERVICES", "{ com.igalia.wolvic.speech.SpeechServices.HUAWEI_ASR }"
def platform = variant.productFlavors.get(0).name
def store = variant.productFlavors.get(3).name
if (platform.toLowerCase().startsWith('hvr') && store == "mainlandChina") {
variant.buildConfigField "String[]", "SPEECH_SERVICES", "{ com.igalia.wolvic.speech.SpeechServices.HUAWEI_ASR }"
}
}

0 comments on commit ece374d

Please sign in to comment.