mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-15 18:12:54 +00:00
[fenix] Add new BuildConfig variables to support AMO non-production envs
This commit is contained in:
parent
60586d8c37
commit
cd40b8510e
@ -37,7 +37,12 @@ android {
|
|||||||
testInstrumentationRunnerArguments clearPackageData: 'true'
|
testInstrumentationRunnerArguments clearPackageData: 'true'
|
||||||
resValue "bool", "IS_DEBUG", "false"
|
resValue "bool", "IS_DEBUG", "false"
|
||||||
buildConfigField "boolean", "USE_RELEASE_VERSIONING", "false"
|
buildConfigField "boolean", "USE_RELEASE_VERSIONING", "false"
|
||||||
buildConfigField "String", "AMO_COLLECTION", "\"7dfae8669acc4312a65e8ba5553036\""
|
// This should be the "public" base URL of AMO.
|
||||||
|
buildConfigField "String", "AMO_BASE_URL", "\"https://addons.mozilla.org\""
|
||||||
|
buildConfigField "String", "AMO_COLLECTION_NAME", "\"7dfae8669acc4312a65e8ba5553036\""
|
||||||
|
buildConfigField "String", "AMO_COLLECTION_USER", "\"mozilla\""
|
||||||
|
// This should be the base URL used to call the AMO API.
|
||||||
|
buildConfigField "String", "AMO_SERVER_URL", "\"https://services.addons.mozilla.org\""
|
||||||
def deepLinkSchemeValue = "fenix-dev"
|
def deepLinkSchemeValue = "fenix-dev"
|
||||||
buildConfigField "String", "DEEP_LINK_SCHEME", "\"$deepLinkSchemeValue\""
|
buildConfigField "String", "DEEP_LINK_SCHEME", "\"$deepLinkSchemeValue\""
|
||||||
manifestPlaceholders = [
|
manifestPlaceholders = [
|
||||||
|
@ -168,7 +168,7 @@ class AppRequestInterceptor(
|
|||||||
companion object {
|
companion object {
|
||||||
internal const val LOW_AND_MEDIUM_RISK_ERROR_PAGES = "low_and_medium_risk_error_pages.html"
|
internal const val LOW_AND_MEDIUM_RISK_ERROR_PAGES = "low_and_medium_risk_error_pages.html"
|
||||||
internal const val HIGH_RISK_ERROR_PAGES = "high_risk_error_pages.html"
|
internal const val HIGH_RISK_ERROR_PAGES = "high_risk_error_pages.html"
|
||||||
internal const val AMO_BASE_URL = "https://addons.mozilla.org"
|
internal const val AMO_BASE_URL = BuildConfig.AMO_BASE_URL
|
||||||
internal const val AMO_INSTALL_URL_REGEX = "$AMO_BASE_URL/android/downloads/file/([^\\s]+)/([^\\s]+\\.xpi)"
|
internal const val AMO_INSTALL_URL_REGEX = "$AMO_BASE_URL/android/downloads/file/([^\\s]+)/([^\\s]+\\.xpi)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -93,11 +93,15 @@ class Components(private val context: Context) {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
// Use build config otherwise
|
// Use build config otherwise
|
||||||
else if (!BuildConfig.AMO_COLLECTION.isNullOrEmpty()) {
|
else if (!BuildConfig.AMO_COLLECTION_USER.isNullOrEmpty() &&
|
||||||
|
!BuildConfig.AMO_COLLECTION_NAME.isNullOrEmpty()
|
||||||
|
) {
|
||||||
AddonCollectionProvider(
|
AddonCollectionProvider(
|
||||||
context,
|
context,
|
||||||
core.client,
|
core.client,
|
||||||
collectionName = BuildConfig.AMO_COLLECTION,
|
serverURL = BuildConfig.AMO_SERVER_URL,
|
||||||
|
collectionUser = BuildConfig.AMO_COLLECTION_USER,
|
||||||
|
collectionName = BuildConfig.AMO_COLLECTION_NAME,
|
||||||
maxCacheAgeInMinutes = DAY_IN_MINUTES
|
maxCacheAgeInMinutes = DAY_IN_MINUTES
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user