@@ -104,6 +104,15 @@ def isWebKitAvailable = {
104
104
def GECKO_RELEASE_VERSION_NAME = ' 1.8.1'
105
105
def CHROMIUM_RELEASE_VERSION_NAME = ' 1.2.1'
106
106
107
+ // Homepage and new tab URLs. HOMEPAGE_URL points at a website
108
+ // and NEW_TAB_DEFAULT_URL determines the default content of a new tab.
109
+ def localNewTabUrl = " about://newtab"
110
+ def homepageDefaultUrl = " https://wolvic.com/start"
111
+ def homepageChinaUrl = " https://wolvic.com/zh/start/index.html"
112
+ def homepageChinaHvgUrl = " https://wolvic.com/zh/start/hvg.html"
113
+ def homepageChinaPicoUrl = " https://wolvic.com/zh/start/pico.html"
114
+ def homepageChinaPfdmUrl = " https://wolvic.com/zh/start/pfdm.html"
115
+
107
116
android {
108
117
namespace ' com.igalia.wolvic'
109
118
compileSdkVersion 35
@@ -131,7 +140,8 @@ android {
131
140
132
141
testInstrumentationRunner " androidx.test.runner.AndroidJUnitRunner"
133
142
resValue ' string' , ' app_name' , ' Wolvic'
134
- resValue ' string' , ' HOMEPAGE_URL' , " https://wolvic.com/start"
143
+ resValue ' string' , ' HOMEPAGE_URL' , homepageDefaultUrl
144
+ resValue ' string' , ' NEW_TAB_DEFAULT_URL' , localNewTabUrl
135
145
externalNativeBuild {
136
146
cmake {
137
147
cppFlags " -std=c++14 -fexceptions -frtti -Werror" +
@@ -751,16 +761,20 @@ android.applicationVariants.configureEach { variant ->
751
761
// HVR packages for mainland china must only use HVR speech recognition system.
752
762
if (store == " mainlandChina" ) {
753
763
if (platform. toLowerCase(). startsWith(' hvr' )) {
754
- variant. resValue ' string' , ' HOMEPAGE_URL' , ' "https://wolvic.com/zh/start/index.html"'
764
+ variant. resValue ' string' , ' HOMEPAGE_URL' , homepageChinaUrl
765
+ variant. resValue ' string' , ' NEW_TAB_DEFAULT_URL' , homepageChinaUrl
755
766
variant. buildConfigField " String[]" , " SPEECH_SERVICES" , " { com.igalia.wolvic.speech.SpeechServices.HUAWEI_ASR }"
756
767
} else if (platform. toLowerCase(). startsWith(' visionglass' )) {
757
- variant. resValue ' string' , ' HOMEPAGE_URL' , ' "https://wolvic.com/zh/start/hvg.html"'
768
+ variant. resValue ' string' , ' HOMEPAGE_URL' , homepageChinaHvgUrl
769
+ variant. resValue ' string' , ' NEW_TAB_DEFAULT_URL' , homepageChinaHvgUrl
758
770
variant. buildConfigField " String[]" , " SPEECH_SERVICES" , " { com.igalia.wolvic.speech.SpeechServices.HUAWEI_ASR }"
759
771
} else if (platform. toLowerCase(). startsWith(' picoxr' )) {
760
- variant. resValue ' string' , ' HOMEPAGE_URL' , ' "https://wolvic.com/zh/start/pico.html"'
772
+ variant. resValue ' string' , ' HOMEPAGE_URL' , homepageChinaPicoUrl
773
+ variant. resValue ' string' , ' NEW_TAB_DEFAULT_URL' , homepageChinaPicoUrl
761
774
variant. buildConfigField " String[]" , " SPEECH_SERVICES" , " { com.igalia.wolvic.speech.SpeechServices.MEETKAI }"
762
775
} else if (platform. toLowerCase(). startsWith(' pfdmxr' )) {
763
- variant. resValue ' string' , ' HOMEPAGE_URL' , ' "https://wolvic.com/zh/start/pfdm.html"'
776
+ variant. resValue ' string' , ' HOMEPAGE_URL' , homepageChinaPfdmUrl
777
+ variant. resValue ' string' , ' NEW_TAB_DEFAULT_URL' , homepageChinaPfdmUrl
764
778
variant. buildConfigField " String[]" , " SPEECH_SERVICES" , " { com.igalia.wolvic.speech.SpeechServices.MEETKAI }"
765
779
}
766
780
}
0 commit comments