diff --git a/README.md b/README.md index a9c954305..c29aceeee 100644 --- a/README.md +++ b/README.md @@ -81,10 +81,9 @@ Pre-requisites: 2. **Import** the project into Android Studio **or** build on the command line: ```shell - ./gradlew clean app:assembleGeckoBetaDebug + ./gradlew clean app:assembleDebug ``` - Use app:assembleGeckoNightlyDebug to build with the Gecko Nightly version instead. If this errors out, make sure that you have an `ANDROID_SDK_ROOT` environment variable pointing to the right path. @@ -94,39 +93,29 @@ Pre-requisites: We have a lot of build variants. Each variant is composed of two flavors. One flavor is the version of Gecko to use and the other describes which app id and settings to use. Here is a description of what each means: -- **geckoBeta** (recommended) uses the Beta variant of the Gecko rendering engine, which corresponds to the next version of Gecko which will go to production -- **geckoNightly** uses the Nightly variant of the Gecko rendering engine, which is the version which will arrive after beta and is less stable - -
-
- - **debug** uses debug symbols and debug signing, adds tools like LeakCanary for troubleshooting, and does not strip unused or wasteful code -- **fenixNightly** is a release build with nightly signing which uses the org.mozilla.fenix.nightly app id for nightly releases to Google Play -- **fenixBeta** is a release build with beta signing which uses the org.mozilla.fenix.beta app id for beta releases to Google Play -- **fenixProduction** is a release build with release signing which uses the org.mozilla.fenix app id for production releases to Google Play -- **fennecProduction** is an experimental build with release signing which uses the org.mozilla.firefox app id and supports upgrading the older Firefox. **WARNING** Pre-production versions of this may result in data loss. -- **forPerformanceTest**: see "Performance Build Variants" below. +- **nightly** uses the Nightly variant of the Gecko rendering engine, which is the version which will arrive after beta and is less stable +- **beta** (recommended) uses the Beta variant of the Gecko rendering engine, which corresponds to the next version of Gecko which will go to production +- **release** is a release build with release signing which uses the org.mozilla.firefox app id for production releases to Google Play #### Performance Build Variants For accurate performance measurements, read this section! If you want to analyze performance during **local development** (note: there is a non-trivial performance impact - see caveats): -- Recommendation: use a `forPerformanceTest` variant with local Leanplum, Adjust, & Sentry API tokens: contact the front-end perf group for access to them -- Rationale: `forPerformanceTest` is a release variant with `debuggable` set to true. There are numerous performance-impacting differences between debug and release variants so we need a release variant. To profile, we also need debuggable, which is disabled on other release variants. If API tokens are not provided, the SDKs may change their behavior in non-trivial ways. +- Recommendation: use a debuggable variant (see "local.properties helpers" below) with local Leanplum, Adjust, & Sentry API tokens: contact the front-end perf group for access to them +- Rationale: There are numerous performance-impacting differences between debug and release variants so we need a release variant. To profile, we also need debuggable, which is disabled by default for release variants. If API tokens are not provided, the SDKs may change their behavior in non-trivial ways. - Caveats: - debuggable has a non-trivial & variable impact on performance but is needed to take profiles. - Random experiment opt-in & feature flags may impact performance (see [perf-frontend-issues#45](https://github.com/mozilla-mobile/perf-frontend-issues/issues/45) for mitigation). - This is slower to build than debug builds because it does additional tasks (e.g. minification) similar to other release builds -Nightly `forPerformanceTest` variants with API tokens already added [are also available from Taskcluster](https://firefox-ci-tc.services.mozilla.com/tasks/index/project.mobile.fenix.v2.performance-test/). - If you want to run **performance tests/benchmarks** in automation or locally: - Recommendation: production builds. If debuggable is required, use recommendation above but note the caveat above. If your needs are not met, please contact the front-end perf group to identify a new solution. - Rationale: like the rationale above, we need release variants so the choice is based on the debuggable flag. For additional context on these recommendations, see [the perf build variant analysis](https://docs.google.com/document/d/1aW-m0HYncTDDiRz_2x6EjcYkjBpL9SHhhYix13Vil30/edit#). -Before you can install any release variants including `forPerformanceTest`, **you will need to sign them:** see [Automatically signing release builds](#automatically-sign-release-builds) for details. +Before you can install any release variants, **you will need to sign them:** see [Automatically signing release builds](#automatically-sign-release-builds) for details. ## Pre-push hooks To reduce review turn-around time, we'd like all pushes to run tests locally. We'd @@ -181,6 +170,22 @@ With this line, release build variants will automatically be signed with your de This is helpful when you're building release variants frequently, for example to test feature flags and or do performance analyses. +### Building debuggable release variants + +Nightly, Beta and Release variants are getting published to Google Play and therefore are not debuggable. To locally create debuggable builds of those variants, add the following to `/local.properties`: + +```sh +debuggable +``` + +### Setting raptor manifest flag + +To set the raptor manifest flag in Nightly, Beta and Release variants, add the following to `/local.properties`: + +```sh +raptorEnabled +``` + ### Auto-publication workflow for android-components and application-services If you're making changes to these projects and want to test them in Fenix, auto-publication workflow is the fastest, most reliable way to do that. diff --git a/app/build.gradle b/app/build.gradle index da39bfdcd..2035810be 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -6,7 +6,6 @@ apply plugin: 'com.android.application' apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' apply plugin: 'jacoco' -apply from: "$project.rootDir/automation/gradle/versionCode.gradle" apply plugin: 'androidx.navigation.safeargs.kotlin' apply plugin: 'com.google.android.gms.oss-licenses-plugin' @@ -48,6 +47,10 @@ android { if (gradle.hasProperty("localProperties.autosignReleaseWithDebugKey")) { signingConfig signingConfigs.debug } + + if (gradle.hasProperty("localProperties.debuggable")) { + debuggable true + } } buildTypes { @@ -58,25 +61,31 @@ android { resValue "bool", "IS_DEBUG", "true" pseudoLocalesEnabled true } - forPerformanceTest releaseTemplate >> { // the ">>" concatenates the raptor-specific options with the template - applicationIdSuffix ".fenix.performancetest" - debuggable true - manifestPlaceholders = [ - // Since we configure this build to behave like a "fennec" flavored build, we need - // to set a shared user id for the manifest. The actual values does not matter. - // However we pick a unique value to not "clash" with other Fenix/Fennec builds - // installed on the device. - "sharedUserId": "org.mozilla.fenix.performancetest.sharedID" - ] - } - fenixProduction releaseTemplate >> { + nightly releaseTemplate >> { applicationIdSuffix ".fenix" buildConfigField "boolean", "USE_RELEASE_VERSIONING", "true" def deepLinkSchemeValue = "fenix-nightly" buildConfigField "String", "DEEP_LINK_SCHEME", "\"$deepLinkSchemeValue\"" manifestPlaceholders = ["deepLinkScheme": deepLinkSchemeValue] } - fennecProduction releaseTemplate >> { + beta releaseTemplate >> { + buildConfigField "boolean", "USE_RELEASE_VERSIONING", "true" + applicationIdSuffix ".firefox_beta" + def deepLinkSchemeValue = "fenix-beta" + buildConfigField "String", "DEEP_LINK_SCHEME", "\"$deepLinkSchemeValue\"" + manifestPlaceholders = [ + // This release type is meant to replace Firefox (Beta channel) and therefore needs to inherit + // its sharedUserId for all eternity. See: + // https://searchfox.org/mozilla-central/search?q=moz_android_shared_id&case=false®exp=false&path= + // Shipping an app update without sharedUserId can have + // fatal consequences. For example see: + // - https://issuetracker.google.com/issues/36924841 + // - https://issuetracker.google.com/issues/36905922 + "sharedUserId": "org.mozilla.firefox.sharedID", + "deepLinkScheme": deepLinkSchemeValue + ] + } + release releaseTemplate >> { buildConfigField "boolean", "USE_RELEASE_VERSIONING", "true" applicationIdSuffix ".firefox" def deepLinkSchemeValue = "fenix" @@ -93,49 +102,6 @@ android { "deepLinkScheme": deepLinkSchemeValue ] } - fennecBeta releaseTemplate >> { - buildConfigField "boolean", "USE_RELEASE_VERSIONING", "true" - applicationIdSuffix ".firefox_beta" - def deepLinkSchemeValue = "fenix-beta" - buildConfigField "String", "DEEP_LINK_SCHEME", "\"$deepLinkSchemeValue\"" - manifestPlaceholders = [ - // This release type is meant to replace Firefox (Release channel) and therefore needs to inherit - // its sharedUserId for all eternity. See: - // https://searchfox.org/mozilla-central/search?q=moz_android_shared_id&case=false®exp=false&path= - // Shipping an app update without sharedUserId can have - // fatal consequences. For example see: - // - https://issuetracker.google.com/issues/36924841 - // - https://issuetracker.google.com/issues/36905922 - "sharedUserId": "org.mozilla.firefox.sharedID", - "deepLinkScheme": deepLinkSchemeValue - ] - } - } - - variantFilter { // There's a "release" build type that exists by default that we don't use (it's replaced by "nightly" and "beta") - if (buildType.name == 'release') { - setIgnore true - } - - // Current build variant setup: - // - // | geckoNightly | geckoBeta | - // |--------------------|---------------|-----------| - // | debug | ✅ | ✅ | Both variants for testing and development. - // | forPerformanceTest | ✅ | ✅ | Both variants unless the perf team only cares about Nightly (TBD). - // | fenixProduction | ✅ | ❌ | Fenix Production (to be renamed `Nightly`) ships with GV Nightly - // | fennecProduction | ❌ | ✅ | Fenix build to replace production Firefox builds - // | fennecBeta | ❌ | ✅ | Fenix build to replace beta Firefox builds - - def flavors = flavors*.name.toString().toLowerCase() - - if (buildType.name == 'fenixProduction' && flavors.contains("geckobeta")) { - setIgnore true - } - - if ((buildType.name == 'fennecProduction' || buildType.name == 'fennecBeta') && flavors.contains("geckonightly")) { - setIgnore true - } } aaptOptions { @@ -162,30 +128,20 @@ android { androidTest { resources.srcDirs += ['src/androidTest/resources'] } - fennecBeta { - java.srcDirs = ['src/migration/java'] + debug { + java.srcDirs = ['src/geckoNightly/java'] + } + nightly { + java.srcDirs = ['src/geckoNightly/java'] + } + beta { + java.srcDirs = ['src/migration/java', 'src/geckoBeta/java'] manifest.srcFile "src/migration/AndroidManifest.xml" } - fennecProduction { - java.srcDirs = ['src/migration/java'] + release { + java.srcDirs = ['src/migration/java', 'src/geckoRelease/java'] manifest.srcFile "src/migration/AndroidManifest.xml" } - forPerformanceTest { - // We want our performance test builds to use the same code as our "fennec" flavor builds - // since those builds will ship to our large user base. - java.srcDirs = ['src/migration/java'] - manifest.srcFile "src/migration/AndroidManifest.xml" - } - } - - productFlavors { - geckoNightly { - dimension "engine" - } - - geckoBeta { - dimension "engine" - } } splits { @@ -216,8 +172,6 @@ android { } } -def baseVersionCode = generatedVersionCode - android.applicationVariants.all { variant -> // ------------------------------------------------------------------------------------------------- @@ -252,27 +206,11 @@ android.applicationVariants.all { variant -> // same version code. Therefore we need to have different version codes for our ARM and x86 // builds. - // Our generated version code now has a length of 9 (See automation/gradle/versionCode.gradle). - // Our x86 builds need a higher version code to avoid installing ARM builds on an x86 device - // with ARM compatibility mode. - variant.outputs.each { output -> def abi = output.getFilter(OutputFile.ABI) - - def versionCodeOverride - if (variant.name.contains("Fennec")) { - versionCodeOverride = Config.generateFennecVersionCode(abi) - } else if (abi == "x86_64") { - versionCodeOverride = baseVersionCode + 3 - } else if (abi == "x86") { - versionCodeOverride = baseVersionCode + 2 - } else if (abi == "arm64-v8a") { - versionCodeOverride = baseVersionCode + 1 - } else if (abi == "armeabi-v7a") { - versionCodeOverride = baseVersionCode - } else { - throw RuntimeException("Unknown ABI: $abi") - } + // We use the same version code generator, that we inherited from Fennec, across all channels - even on + // channels that never shipped a Fennec build. + def versionCodeOverride = Config.generateFennecVersionCode(abi) println("versionCode for $abi = $versionCodeOverride") @@ -377,8 +315,11 @@ ext.gleanDocsDirectory = "$rootDir/docs" apply plugin: "org.mozilla.telemetry.glean-gradle-plugin" dependencies { - geckoNightlyImplementation Deps.mozilla_browser_engine_gecko_nightly - geckoBetaImplementation Deps.mozilla_browser_engine_gecko_beta + debugImplementation Deps.mozilla_browser_engine_gecko_nightly + + nightlyImplementation Deps.mozilla_browser_engine_gecko_nightly + betaImplementation Deps.mozilla_browser_engine_gecko_beta + releaseImplementation Deps.mozilla_browser_engine_gecko_release implementation Deps.kotlin_stdlib implementation Deps.kotlin_coroutines @@ -604,17 +545,15 @@ task printVariants { fileName: it.outputFileName, ]}, build_type: it.buildType.name, - engine: it.productFlavors.find { it.dimension == 'engine' }.name, name: it.name, ]} // AndroidTest is a special case not included above variants.add([ apks: [[ abi: 'noarch', - fileName: 'app-geckoNightly-debug-androidTest.apk', + fileName: 'app-debug-androidTest.apk', ]], build_type: 'androidTest', - engine: 'geckoNightly', name: 'androidTest', ]) println 'variants: ' + groovy.json.JsonOutput.toJson(variants) diff --git a/app/src/fennecBeta/res/drawable-hdpi/fenix_search_widget.png b/app/src/beta/res/drawable-hdpi/fenix_search_widget.png similarity index 100% rename from app/src/fennecBeta/res/drawable-hdpi/fenix_search_widget.png rename to app/src/beta/res/drawable-hdpi/fenix_search_widget.png diff --git a/app/src/fennecBeta/res/drawable-hdpi/ic_logo_wordmark_normal.png b/app/src/beta/res/drawable-hdpi/ic_logo_wordmark_normal.png similarity index 100% rename from app/src/fennecBeta/res/drawable-hdpi/ic_logo_wordmark_normal.png rename to app/src/beta/res/drawable-hdpi/ic_logo_wordmark_normal.png diff --git a/app/src/fennecBeta/res/drawable-hdpi/ic_logo_wordmark_private.png b/app/src/beta/res/drawable-hdpi/ic_logo_wordmark_private.png similarity index 100% rename from app/src/fennecBeta/res/drawable-hdpi/ic_logo_wordmark_private.png rename to app/src/beta/res/drawable-hdpi/ic_logo_wordmark_private.png diff --git a/app/src/fennecBeta/res/drawable-mdpi/ic_logo_wordmark_normal.png b/app/src/beta/res/drawable-mdpi/ic_logo_wordmark_normal.png similarity index 100% rename from app/src/fennecBeta/res/drawable-mdpi/ic_logo_wordmark_normal.png rename to app/src/beta/res/drawable-mdpi/ic_logo_wordmark_normal.png diff --git a/app/src/fennecBeta/res/drawable-mdpi/ic_logo_wordmark_private.png b/app/src/beta/res/drawable-mdpi/ic_logo_wordmark_private.png similarity index 100% rename from app/src/fennecBeta/res/drawable-mdpi/ic_logo_wordmark_private.png rename to app/src/beta/res/drawable-mdpi/ic_logo_wordmark_private.png diff --git a/app/src/fennecBeta/res/drawable-xhdpi/ic_logo_wordmark_normal.png b/app/src/beta/res/drawable-xhdpi/ic_logo_wordmark_normal.png similarity index 100% rename from app/src/fennecBeta/res/drawable-xhdpi/ic_logo_wordmark_normal.png rename to app/src/beta/res/drawable-xhdpi/ic_logo_wordmark_normal.png diff --git a/app/src/fennecBeta/res/drawable-xhdpi/ic_logo_wordmark_private.png b/app/src/beta/res/drawable-xhdpi/ic_logo_wordmark_private.png similarity index 100% rename from app/src/fennecBeta/res/drawable-xhdpi/ic_logo_wordmark_private.png rename to app/src/beta/res/drawable-xhdpi/ic_logo_wordmark_private.png diff --git a/app/src/fennecBeta/res/drawable-xxhdpi/ic_logo_wordmark_normal.png b/app/src/beta/res/drawable-xxhdpi/ic_logo_wordmark_normal.png similarity index 100% rename from app/src/fennecBeta/res/drawable-xxhdpi/ic_logo_wordmark_normal.png rename to app/src/beta/res/drawable-xxhdpi/ic_logo_wordmark_normal.png diff --git a/app/src/fennecBeta/res/drawable-xxhdpi/ic_logo_wordmark_private.png b/app/src/beta/res/drawable-xxhdpi/ic_logo_wordmark_private.png similarity index 100% rename from app/src/fennecBeta/res/drawable-xxhdpi/ic_logo_wordmark_private.png rename to app/src/beta/res/drawable-xxhdpi/ic_logo_wordmark_private.png diff --git a/app/src/fennecBeta/res/drawable-xxxhdpi/ic_logo_wordmark_normal.png b/app/src/beta/res/drawable-xxxhdpi/ic_logo_wordmark_normal.png similarity index 100% rename from app/src/fennecBeta/res/drawable-xxxhdpi/ic_logo_wordmark_normal.png rename to app/src/beta/res/drawable-xxxhdpi/ic_logo_wordmark_normal.png diff --git a/app/src/fennecBeta/res/drawable-xxxhdpi/ic_logo_wordmark_private.png b/app/src/beta/res/drawable-xxxhdpi/ic_logo_wordmark_private.png similarity index 100% rename from app/src/fennecBeta/res/drawable-xxxhdpi/ic_logo_wordmark_private.png rename to app/src/beta/res/drawable-xxxhdpi/ic_logo_wordmark_private.png diff --git a/app/src/fennecBeta/res/drawable/ic_launcher_foreground.xml b/app/src/beta/res/drawable/ic_launcher_foreground.xml similarity index 100% rename from app/src/fennecBeta/res/drawable/ic_launcher_foreground.xml rename to app/src/beta/res/drawable/ic_launcher_foreground.xml diff --git a/app/src/fennecBeta/res/mipmap-hdpi/ic_launcher.png b/app/src/beta/res/mipmap-hdpi/ic_launcher.png similarity index 100% rename from app/src/fennecBeta/res/mipmap-hdpi/ic_launcher.png rename to app/src/beta/res/mipmap-hdpi/ic_launcher.png diff --git a/app/src/fennecBeta/res/mipmap-hdpi/ic_launcher_round.png b/app/src/beta/res/mipmap-hdpi/ic_launcher_round.png similarity index 100% rename from app/src/fennecBeta/res/mipmap-hdpi/ic_launcher_round.png rename to app/src/beta/res/mipmap-hdpi/ic_launcher_round.png diff --git a/app/src/fennecBeta/res/mipmap-mdpi/ic_launcher.png b/app/src/beta/res/mipmap-mdpi/ic_launcher.png similarity index 100% rename from app/src/fennecBeta/res/mipmap-mdpi/ic_launcher.png rename to app/src/beta/res/mipmap-mdpi/ic_launcher.png diff --git a/app/src/fennecBeta/res/mipmap-mdpi/ic_launcher_round.png b/app/src/beta/res/mipmap-mdpi/ic_launcher_round.png similarity index 100% rename from app/src/fennecBeta/res/mipmap-mdpi/ic_launcher_round.png rename to app/src/beta/res/mipmap-mdpi/ic_launcher_round.png diff --git a/app/src/fennecBeta/res/mipmap-xhdpi/ic_launcher.png b/app/src/beta/res/mipmap-xhdpi/ic_launcher.png similarity index 100% rename from app/src/fennecBeta/res/mipmap-xhdpi/ic_launcher.png rename to app/src/beta/res/mipmap-xhdpi/ic_launcher.png diff --git a/app/src/fennecBeta/res/mipmap-xhdpi/ic_launcher_round.png b/app/src/beta/res/mipmap-xhdpi/ic_launcher_round.png similarity index 100% rename from app/src/fennecBeta/res/mipmap-xhdpi/ic_launcher_round.png rename to app/src/beta/res/mipmap-xhdpi/ic_launcher_round.png diff --git a/app/src/fennecBeta/res/mipmap-xxhdpi/ic_launcher.png b/app/src/beta/res/mipmap-xxhdpi/ic_launcher.png similarity index 100% rename from app/src/fennecBeta/res/mipmap-xxhdpi/ic_launcher.png rename to app/src/beta/res/mipmap-xxhdpi/ic_launcher.png diff --git a/app/src/fennecBeta/res/mipmap-xxhdpi/ic_launcher_round.png b/app/src/beta/res/mipmap-xxhdpi/ic_launcher_round.png similarity index 100% rename from app/src/fennecBeta/res/mipmap-xxhdpi/ic_launcher_round.png rename to app/src/beta/res/mipmap-xxhdpi/ic_launcher_round.png diff --git a/app/src/fennecBeta/res/mipmap-xxxhdpi/ic_launcher.png b/app/src/beta/res/mipmap-xxxhdpi/ic_launcher.png similarity index 100% rename from app/src/fennecBeta/res/mipmap-xxxhdpi/ic_launcher.png rename to app/src/beta/res/mipmap-xxxhdpi/ic_launcher.png diff --git a/app/src/fennecBeta/res/mipmap-xxxhdpi/ic_launcher_round.png b/app/src/beta/res/mipmap-xxxhdpi/ic_launcher_round.png similarity index 100% rename from app/src/fennecBeta/res/mipmap-xxxhdpi/ic_launcher_round.png rename to app/src/beta/res/mipmap-xxxhdpi/ic_launcher_round.png diff --git a/app/src/fennecBeta/res/values/colors.xml b/app/src/beta/res/values/colors.xml similarity index 100% rename from app/src/fennecBeta/res/values/colors.xml rename to app/src/beta/res/values/colors.xml diff --git a/app/src/fennecBeta/res/values/static_strings.xml b/app/src/beta/res/values/static_strings.xml similarity index 100% rename from app/src/fennecBeta/res/values/static_strings.xml rename to app/src/beta/res/values/static_strings.xml diff --git a/app/src/fennecBeta/res/xml/shortcuts.xml b/app/src/beta/res/xml/shortcuts.xml similarity index 100% rename from app/src/fennecBeta/res/xml/shortcuts.xml rename to app/src/beta/res/xml/shortcuts.xml diff --git a/app/src/fenixBeta/res/drawable/ic_launcher_foreground.xml b/app/src/fenixBeta/res/drawable/ic_launcher_foreground.xml deleted file mode 100644 index ab9a124b6..000000000 --- a/app/src/fenixBeta/res/drawable/ic_launcher_foreground.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/src/fenixBeta/res/ic_launcher-web.png b/app/src/fenixBeta/res/ic_launcher-web.png deleted file mode 100644 index bc2f41460..000000000 Binary files a/app/src/fenixBeta/res/ic_launcher-web.png and /dev/null differ diff --git a/app/src/fenixBeta/res/mipmap-hdpi/ic_launcher.png b/app/src/fenixBeta/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index 0564332d6..000000000 Binary files a/app/src/fenixBeta/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/app/src/fenixBeta/res/mipmap-hdpi/ic_launcher_round.png b/app/src/fenixBeta/res/mipmap-hdpi/ic_launcher_round.png deleted file mode 100644 index 781f0edb0..000000000 Binary files a/app/src/fenixBeta/res/mipmap-hdpi/ic_launcher_round.png and /dev/null differ diff --git a/app/src/fenixBeta/res/mipmap-mdpi/ic_launcher.png b/app/src/fenixBeta/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index 45b21a392..000000000 Binary files a/app/src/fenixBeta/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/app/src/fenixBeta/res/mipmap-mdpi/ic_launcher_round.png b/app/src/fenixBeta/res/mipmap-mdpi/ic_launcher_round.png deleted file mode 100644 index 61fcb71f5..000000000 Binary files a/app/src/fenixBeta/res/mipmap-mdpi/ic_launcher_round.png and /dev/null differ diff --git a/app/src/fenixBeta/res/mipmap-xhdpi/ic_launcher.png b/app/src/fenixBeta/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index 4e06f0a53..000000000 Binary files a/app/src/fenixBeta/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/app/src/fenixBeta/res/mipmap-xhdpi/ic_launcher_round.png b/app/src/fenixBeta/res/mipmap-xhdpi/ic_launcher_round.png deleted file mode 100644 index 87e06aad7..000000000 Binary files a/app/src/fenixBeta/res/mipmap-xhdpi/ic_launcher_round.png and /dev/null differ diff --git a/app/src/fenixBeta/res/mipmap-xxhdpi/ic_launcher.png b/app/src/fenixBeta/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index c45f25453..000000000 Binary files a/app/src/fenixBeta/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/app/src/fenixBeta/res/mipmap-xxhdpi/ic_launcher_round.png b/app/src/fenixBeta/res/mipmap-xxhdpi/ic_launcher_round.png deleted file mode 100644 index 292c8670b..000000000 Binary files a/app/src/fenixBeta/res/mipmap-xxhdpi/ic_launcher_round.png and /dev/null differ diff --git a/app/src/fenixBeta/res/mipmap-xxxhdpi/ic_launcher.png b/app/src/fenixBeta/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index bc2f41460..000000000 Binary files a/app/src/fenixBeta/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/app/src/fenixBeta/res/mipmap-xxxhdpi/ic_launcher_round.png b/app/src/fenixBeta/res/mipmap-xxxhdpi/ic_launcher_round.png deleted file mode 100644 index bb60459b4..000000000 Binary files a/app/src/fenixBeta/res/mipmap-xxxhdpi/ic_launcher_round.png and /dev/null differ diff --git a/app/src/fenixBeta/res/xml/shortcuts.xml b/app/src/fenixBeta/res/xml/shortcuts.xml deleted file mode 100644 index 488d2ddda..000000000 --- a/app/src/fenixBeta/res/xml/shortcuts.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/app/src/fenixNightly/res/drawable/ic_launcher_foreground.xml b/app/src/fenixNightly/res/drawable/ic_launcher_foreground.xml deleted file mode 100644 index 1e3b546ce..000000000 --- a/app/src/fenixNightly/res/drawable/ic_launcher_foreground.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - diff --git a/app/src/fenixNightly/res/ic_launcher-web.png b/app/src/fenixNightly/res/ic_launcher-web.png deleted file mode 100644 index 872099fde..000000000 Binary files a/app/src/fenixNightly/res/ic_launcher-web.png and /dev/null differ diff --git a/app/src/fenixNightly/res/mipmap-hdpi/ic_launcher.png b/app/src/fenixNightly/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index 5b017a545..000000000 Binary files a/app/src/fenixNightly/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/app/src/fenixNightly/res/mipmap-hdpi/ic_launcher_round.png b/app/src/fenixNightly/res/mipmap-hdpi/ic_launcher_round.png deleted file mode 100644 index 66cb587b5..000000000 Binary files a/app/src/fenixNightly/res/mipmap-hdpi/ic_launcher_round.png and /dev/null differ diff --git a/app/src/fenixNightly/res/mipmap-mdpi/ic_launcher.png b/app/src/fenixNightly/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index 079117be9..000000000 Binary files a/app/src/fenixNightly/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/app/src/fenixNightly/res/mipmap-mdpi/ic_launcher_round.png b/app/src/fenixNightly/res/mipmap-mdpi/ic_launcher_round.png deleted file mode 100644 index 02755d9d1..000000000 Binary files a/app/src/fenixNightly/res/mipmap-mdpi/ic_launcher_round.png and /dev/null differ diff --git a/app/src/fenixNightly/res/mipmap-xhdpi/ic_launcher.png b/app/src/fenixNightly/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index 3a1117b60..000000000 Binary files a/app/src/fenixNightly/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/app/src/fenixNightly/res/mipmap-xhdpi/ic_launcher_round.png b/app/src/fenixNightly/res/mipmap-xhdpi/ic_launcher_round.png deleted file mode 100644 index 814740c15..000000000 Binary files a/app/src/fenixNightly/res/mipmap-xhdpi/ic_launcher_round.png and /dev/null differ diff --git a/app/src/fenixNightly/res/mipmap-xxhdpi/ic_launcher.png b/app/src/fenixNightly/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index 6be395ba3..000000000 Binary files a/app/src/fenixNightly/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/app/src/fenixNightly/res/mipmap-xxhdpi/ic_launcher_round.png b/app/src/fenixNightly/res/mipmap-xxhdpi/ic_launcher_round.png deleted file mode 100644 index 44ffba047..000000000 Binary files a/app/src/fenixNightly/res/mipmap-xxhdpi/ic_launcher_round.png and /dev/null differ diff --git a/app/src/fenixNightly/res/mipmap-xxxhdpi/ic_launcher.png b/app/src/fenixNightly/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index a6c5e03b5..000000000 Binary files a/app/src/fenixNightly/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/app/src/fenixNightly/res/mipmap-xxxhdpi/ic_launcher_round.png b/app/src/fenixNightly/res/mipmap-xxxhdpi/ic_launcher_round.png deleted file mode 100644 index 653dea8f0..000000000 Binary files a/app/src/fenixNightly/res/mipmap-xxxhdpi/ic_launcher_round.png and /dev/null differ diff --git a/app/src/fenixNightly/res/xml/shortcuts.xml b/app/src/fenixNightly/res/xml/shortcuts.xml deleted file mode 100644 index b087f805c..000000000 --- a/app/src/fenixNightly/res/xml/shortcuts.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/app/src/fenixProduction/AndroidManifest.xml b/app/src/fenixProduction/AndroidManifest.xml deleted file mode 100644 index 5fdb32de4..000000000 --- a/app/src/fenixProduction/AndroidManifest.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/app/src/fenixProduction/res/values/colors.xml b/app/src/fenixProduction/res/values/colors.xml deleted file mode 100644 index 55f8481dc..000000000 --- a/app/src/fenixProduction/res/values/colors.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - @color/nightly_launcher_background - diff --git a/app/src/fenixProduction/res/values/static_strings.xml b/app/src/fenixProduction/res/values/static_strings.xml deleted file mode 100644 index 9e477567e..000000000 --- a/app/src/fenixProduction/res/values/static_strings.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - Firefox Nightly - diff --git a/app/src/fennecNightly/res/mipmap-anydpi-v26/ic_launcher.xml b/app/src/fennecNightly/res/mipmap-anydpi-v26/ic_launcher.xml deleted file mode 100644 index 823c9353c..000000000 --- a/app/src/fennecNightly/res/mipmap-anydpi-v26/ic_launcher.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - diff --git a/app/src/fennecNightly/res/mipmap-anydpi-v26/ic_launcher_round.xml b/app/src/fennecNightly/res/mipmap-anydpi-v26/ic_launcher_round.xml deleted file mode 100644 index 823c9353c..000000000 --- a/app/src/fennecNightly/res/mipmap-anydpi-v26/ic_launcher_round.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - diff --git a/app/src/fennecNightly/res/mipmap-hdpi/ic_launcher.png b/app/src/fennecNightly/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index 68e024ad2..000000000 Binary files a/app/src/fennecNightly/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/app/src/fennecNightly/res/mipmap-hdpi/ic_launcher_foreground_fennec_nightly.png b/app/src/fennecNightly/res/mipmap-hdpi/ic_launcher_foreground_fennec_nightly.png deleted file mode 100644 index 10aaf635e..000000000 Binary files a/app/src/fennecNightly/res/mipmap-hdpi/ic_launcher_foreground_fennec_nightly.png and /dev/null differ diff --git a/app/src/fennecNightly/res/mipmap-hdpi/ic_launcher_round.png b/app/src/fennecNightly/res/mipmap-hdpi/ic_launcher_round.png deleted file mode 100644 index 03b9f09a1..000000000 Binary files a/app/src/fennecNightly/res/mipmap-hdpi/ic_launcher_round.png and /dev/null differ diff --git a/app/src/fennecNightly/res/mipmap-mdpi/ic_launcher.png b/app/src/fennecNightly/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index 7b396b0c9..000000000 Binary files a/app/src/fennecNightly/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/app/src/fennecNightly/res/mipmap-mdpi/ic_launcher_foreground_fennec_nightly.png b/app/src/fennecNightly/res/mipmap-mdpi/ic_launcher_foreground_fennec_nightly.png deleted file mode 100644 index ccdb78084..000000000 Binary files a/app/src/fennecNightly/res/mipmap-mdpi/ic_launcher_foreground_fennec_nightly.png and /dev/null differ diff --git a/app/src/fennecNightly/res/mipmap-mdpi/ic_launcher_round.png b/app/src/fennecNightly/res/mipmap-mdpi/ic_launcher_round.png deleted file mode 100644 index c063275cf..000000000 Binary files a/app/src/fennecNightly/res/mipmap-mdpi/ic_launcher_round.png and /dev/null differ diff --git a/app/src/fennecNightly/res/mipmap-xhdpi/ic_launcher.png b/app/src/fennecNightly/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index 0b5e1a175..000000000 Binary files a/app/src/fennecNightly/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/app/src/fennecNightly/res/mipmap-xhdpi/ic_launcher_foreground_fennec_nightly.png b/app/src/fennecNightly/res/mipmap-xhdpi/ic_launcher_foreground_fennec_nightly.png deleted file mode 100644 index c9ddd161b..000000000 Binary files a/app/src/fennecNightly/res/mipmap-xhdpi/ic_launcher_foreground_fennec_nightly.png and /dev/null differ diff --git a/app/src/fennecNightly/res/mipmap-xhdpi/ic_launcher_round.png b/app/src/fennecNightly/res/mipmap-xhdpi/ic_launcher_round.png deleted file mode 100644 index 43786bae7..000000000 Binary files a/app/src/fennecNightly/res/mipmap-xhdpi/ic_launcher_round.png and /dev/null differ diff --git a/app/src/fennecNightly/res/mipmap-xxhdpi/ic_launcher.png b/app/src/fennecNightly/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index 1ee12f241..000000000 Binary files a/app/src/fennecNightly/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/app/src/fennecNightly/res/mipmap-xxhdpi/ic_launcher_foreground_fennec_nightly.png b/app/src/fennecNightly/res/mipmap-xxhdpi/ic_launcher_foreground_fennec_nightly.png deleted file mode 100644 index 9c4caed87..000000000 Binary files a/app/src/fennecNightly/res/mipmap-xxhdpi/ic_launcher_foreground_fennec_nightly.png and /dev/null differ diff --git a/app/src/fennecNightly/res/mipmap-xxhdpi/ic_launcher_round.png b/app/src/fennecNightly/res/mipmap-xxhdpi/ic_launcher_round.png deleted file mode 100644 index 88ac2b23b..000000000 Binary files a/app/src/fennecNightly/res/mipmap-xxhdpi/ic_launcher_round.png and /dev/null differ diff --git a/app/src/fennecNightly/res/mipmap-xxxhdpi/ic_launcher.png b/app/src/fennecNightly/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index 9128552b3..000000000 Binary files a/app/src/fennecNightly/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/app/src/fennecNightly/res/mipmap-xxxhdpi/ic_launcher_foreground_fennec_nightly.png b/app/src/fennecNightly/res/mipmap-xxxhdpi/ic_launcher_foreground_fennec_nightly.png deleted file mode 100644 index 9d899ba29..000000000 Binary files a/app/src/fennecNightly/res/mipmap-xxxhdpi/ic_launcher_foreground_fennec_nightly.png and /dev/null differ diff --git a/app/src/fennecNightly/res/mipmap-xxxhdpi/ic_launcher_round.png b/app/src/fennecNightly/res/mipmap-xxxhdpi/ic_launcher_round.png deleted file mode 100644 index 83f95ff74..000000000 Binary files a/app/src/fennecNightly/res/mipmap-xxxhdpi/ic_launcher_round.png and /dev/null differ diff --git a/app/src/fennecNightly/res/values/colors.xml b/app/src/fennecNightly/res/values/colors.xml deleted file mode 100644 index 608bd8ced..000000000 --- a/app/src/fennecNightly/res/values/colors.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - @color/debug_launcher_background - diff --git a/app/src/fennecNightly/res/values/static_strings.xml b/app/src/fennecNightly/res/values/static_strings.xml deleted file mode 100644 index 9e477567e..000000000 --- a/app/src/fennecNightly/res/values/static_strings.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - Firefox Nightly - diff --git a/app/src/fennecNightly/res/xml/shortcuts.xml b/app/src/fennecNightly/res/xml/shortcuts.xml deleted file mode 100644 index 4fce218bb..000000000 --- a/app/src/fennecNightly/res/xml/shortcuts.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/app/src/geckoRelease/java/org/mozilla/fenix/engine/GeckoProvider.kt b/app/src/geckoRelease/java/org/mozilla/fenix/engine/GeckoProvider.kt new file mode 100644 index 000000000..f2f715078 --- /dev/null +++ b/app/src/geckoRelease/java/org/mozilla/fenix/engine/GeckoProvider.kt @@ -0,0 +1,72 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +import android.content.Context +import android.os.Bundle +import mozilla.components.browser.engine.gecko.autofill.GeckoLoginDelegateWrapper +import mozilla.components.browser.engine.gecko.glean.GeckoAdapter +import mozilla.components.concept.engine.EngineSession.TrackingProtectionPolicy +import mozilla.components.concept.storage.LoginsStorage +import mozilla.components.lib.crash.handler.CrashHandlerService +import mozilla.components.service.sync.logins.GeckoLoginStorageDelegate +import org.mozilla.fenix.Config +import org.mozilla.fenix.ext.components +import org.mozilla.geckoview.GeckoRuntime +import org.mozilla.geckoview.GeckoRuntimeSettings + +object GeckoProvider { + var testConfig: Bundle? = null + private var runtime: GeckoRuntime? = null + + @Synchronized + fun getOrCreateRuntime( + context: Context, + storage: Lazy, + trackingProtectionPolicy: TrackingProtectionPolicy + ): GeckoRuntime { + if (runtime == null) { + runtime = createRuntime(context, storage, trackingProtectionPolicy) + } + + return runtime!! + } + + private fun createRuntime( + context: Context, + storage: Lazy, + policy: TrackingProtectionPolicy + ): GeckoRuntime { + val builder = GeckoRuntimeSettings.Builder() + + testConfig?.let { + builder.extras(it) + .remoteDebuggingEnabled(true) + } + + // Use meeee. + policy.hashCode() + + val runtimeSettings = builder + .crashHandler(CrashHandlerService::class.java) + .telemetryDelegate(GeckoAdapter()) + // TODO: Fix me! + // .contentBlocking(policy.toContentBlockingSetting()) + .aboutConfigEnabled(Config.channel.isBeta) + .debugLogging(Config.channel.isDebug) + .build() + + val settings = context.components.settings + if (!settings.shouldUseAutoSize) { + runtimeSettings.automaticFontSizeAdjustment = false + val fontSize = settings.fontSizeFactor + runtimeSettings.fontSizeFactor = fontSize + } + + val geckoRuntime = GeckoRuntime.create(context, runtimeSettings) + val loginStorageDelegate = GeckoLoginStorageDelegate(storage) + geckoRuntime.loginStorageDelegate = GeckoLoginDelegateWrapper(loginStorageDelegate) + + return geckoRuntime + } +} diff --git a/app/src/main/java/org/mozilla/fenix/Config.kt b/app/src/main/java/org/mozilla/fenix/Config.kt index 52454b373..5ee692e40 100644 --- a/app/src/main/java/org/mozilla/fenix/Config.kt +++ b/app/src/main/java/org/mozilla/fenix/Config.kt @@ -5,14 +5,14 @@ package org.mozilla.fenix enum class ReleaseChannel { - FenixDebug, - FenixProduction, - FennecProduction, - FennecBeta; + Debug, + Nightly, + Beta, + Release; val isReleased: Boolean get() = when (this) { - FenixDebug -> false + Debug -> false else -> true } @@ -27,51 +27,39 @@ enum class ReleaseChannel { get() = !this.isReleased val isReleaseOrBeta: Boolean - get() = when (this) { - FennecProduction -> true - FennecBeta -> true - else -> false - } + get() = this == Release || this == Beta val isRelease: Boolean get() = when (this) { - FennecProduction -> true + Release -> true else -> false } val isBeta: Boolean - get() = when (this) { - FennecBeta -> true - else -> false - } + get() = this == Beta val isNightlyOrDebug: Boolean - get() = when (this) { - FenixDebug -> true - FenixProduction -> true - else -> false - } + get() = this == Debug || this == Nightly + /** + * Is this a build for a release channel that we used to ship Fennec on? + */ val isFennec: Boolean get() = this in fennecChannels + /** + * Is this build for a "pure" Fenix channel that we never shipped Fennec on? + */ val isFenix: Boolean get() = !isFennec } object Config { val channel = when (BuildConfig.BUILD_TYPE) { - "fenixProduction" -> ReleaseChannel.FenixProduction - "debug" -> ReleaseChannel.FenixDebug - "fennecProduction" -> ReleaseChannel.FennecProduction - "fennecBeta" -> ReleaseChannel.FennecBeta - - // Builds for local performance analysis, recording benchmarks, automation, etc. - // This should be treated like a released channel because we want to test - // what users experience and there are performance-impacting changes in debug - // release channels (e.g. logging) that are never intended to be shipped. - "forPerformanceTest" -> ReleaseChannel.FenixProduction - + "debug" -> ReleaseChannel.Debug + "nightly" -> ReleaseChannel.Nightly + "beta" -> ReleaseChannel.Beta + "release" -> ReleaseChannel.Release else -> { throw IllegalStateException("Unknown build type: ${BuildConfig.BUILD_TYPE}") } @@ -79,6 +67,6 @@ object Config { } private val fennecChannels: List = listOf( - ReleaseChannel.FennecBeta, - ReleaseChannel.FennecProduction + ReleaseChannel.Beta, + ReleaseChannel.Release ) diff --git a/app/src/main/java/org/mozilla/fenix/components/Analytics.kt b/app/src/main/java/org/mozilla/fenix/components/Analytics.kt index 10ddbd2ca..d95125796 100644 --- a/app/src/main/java/org/mozilla/fenix/components/Analytics.kt +++ b/app/src/main/java/org/mozilla/fenix/components/Analytics.kt @@ -102,9 +102,9 @@ fun isSentryEnabled() = !BuildConfig.SENTRY_TOKEN.isNullOrEmpty() private fun getSentryProjectUrl(): String? { val baseUrl = "https://sentry.prod.mozaws.net/operations" return when (Config.channel) { - ReleaseChannel.FenixProduction -> "$baseUrl/fenix" - ReleaseChannel.FennecProduction -> "$baseUrl/fenix-fennec" - ReleaseChannel.FennecBeta -> "$baseUrl/fenix-fennec-beta" + ReleaseChannel.Nightly -> "$baseUrl/fenix" + ReleaseChannel.Release -> "$baseUrl/fenix-fennec" + ReleaseChannel.Beta -> "$baseUrl/fenix-fennec-beta" else -> null } } diff --git a/app/src/fenixNightly/AndroidManifest.xml b/app/src/nightly/AndroidManifest.xml similarity index 100% rename from app/src/fenixNightly/AndroidManifest.xml rename to app/src/nightly/AndroidManifest.xml diff --git a/app/src/fenixProduction/res/drawable-hdpi/ic_logo_wordmark_normal.png b/app/src/nightly/res/drawable-hdpi/ic_logo_wordmark_normal.png similarity index 100% rename from app/src/fenixProduction/res/drawable-hdpi/ic_logo_wordmark_normal.png rename to app/src/nightly/res/drawable-hdpi/ic_logo_wordmark_normal.png diff --git a/app/src/fenixProduction/res/drawable-hdpi/ic_logo_wordmark_private.png b/app/src/nightly/res/drawable-hdpi/ic_logo_wordmark_private.png similarity index 100% rename from app/src/fenixProduction/res/drawable-hdpi/ic_logo_wordmark_private.png rename to app/src/nightly/res/drawable-hdpi/ic_logo_wordmark_private.png diff --git a/app/src/fenixProduction/res/drawable-mdpi/ic_logo_wordmark_normal.png b/app/src/nightly/res/drawable-mdpi/ic_logo_wordmark_normal.png similarity index 100% rename from app/src/fenixProduction/res/drawable-mdpi/ic_logo_wordmark_normal.png rename to app/src/nightly/res/drawable-mdpi/ic_logo_wordmark_normal.png diff --git a/app/src/fenixProduction/res/drawable-mdpi/ic_logo_wordmark_private.png b/app/src/nightly/res/drawable-mdpi/ic_logo_wordmark_private.png similarity index 100% rename from app/src/fenixProduction/res/drawable-mdpi/ic_logo_wordmark_private.png rename to app/src/nightly/res/drawable-mdpi/ic_logo_wordmark_private.png diff --git a/app/src/fenixProduction/res/drawable-xhdpi/ic_logo_wordmark_normal.png b/app/src/nightly/res/drawable-xhdpi/ic_logo_wordmark_normal.png similarity index 100% rename from app/src/fenixProduction/res/drawable-xhdpi/ic_logo_wordmark_normal.png rename to app/src/nightly/res/drawable-xhdpi/ic_logo_wordmark_normal.png diff --git a/app/src/fenixProduction/res/drawable-xhdpi/ic_logo_wordmark_private.png b/app/src/nightly/res/drawable-xhdpi/ic_logo_wordmark_private.png similarity index 100% rename from app/src/fenixProduction/res/drawable-xhdpi/ic_logo_wordmark_private.png rename to app/src/nightly/res/drawable-xhdpi/ic_logo_wordmark_private.png diff --git a/app/src/fenixProduction/res/drawable-xxhdpi/ic_logo_wordmark_normal.png b/app/src/nightly/res/drawable-xxhdpi/ic_logo_wordmark_normal.png similarity index 100% rename from app/src/fenixProduction/res/drawable-xxhdpi/ic_logo_wordmark_normal.png rename to app/src/nightly/res/drawable-xxhdpi/ic_logo_wordmark_normal.png diff --git a/app/src/fenixProduction/res/drawable-xxhdpi/ic_logo_wordmark_private.png b/app/src/nightly/res/drawable-xxhdpi/ic_logo_wordmark_private.png similarity index 100% rename from app/src/fenixProduction/res/drawable-xxhdpi/ic_logo_wordmark_private.png rename to app/src/nightly/res/drawable-xxhdpi/ic_logo_wordmark_private.png diff --git a/app/src/fenixProduction/res/drawable-xxxhdpi/ic_logo_wordmark_normal.png b/app/src/nightly/res/drawable-xxxhdpi/ic_logo_wordmark_normal.png similarity index 100% rename from app/src/fenixProduction/res/drawable-xxxhdpi/ic_logo_wordmark_normal.png rename to app/src/nightly/res/drawable-xxxhdpi/ic_logo_wordmark_normal.png diff --git a/app/src/fenixProduction/res/drawable-xxxhdpi/ic_logo_wordmark_private.png b/app/src/nightly/res/drawable-xxxhdpi/ic_logo_wordmark_private.png similarity index 100% rename from app/src/fenixProduction/res/drawable-xxxhdpi/ic_logo_wordmark_private.png rename to app/src/nightly/res/drawable-xxxhdpi/ic_logo_wordmark_private.png diff --git a/app/src/fenixProduction/res/drawable/ic_launcher_foreground.xml b/app/src/nightly/res/drawable/ic_launcher_foreground.xml similarity index 100% rename from app/src/fenixProduction/res/drawable/ic_launcher_foreground.xml rename to app/src/nightly/res/drawable/ic_launcher_foreground.xml diff --git a/app/src/fenixProduction/res/ic_launcher-web.png b/app/src/nightly/res/ic_launcher-web.png similarity index 100% rename from app/src/fenixProduction/res/ic_launcher-web.png rename to app/src/nightly/res/ic_launcher-web.png diff --git a/app/src/fenixProduction/res/mipmap-hdpi/ic_launcher.png b/app/src/nightly/res/mipmap-hdpi/ic_launcher.png similarity index 100% rename from app/src/fenixProduction/res/mipmap-hdpi/ic_launcher.png rename to app/src/nightly/res/mipmap-hdpi/ic_launcher.png diff --git a/app/src/fenixProduction/res/mipmap-hdpi/ic_launcher_round.png b/app/src/nightly/res/mipmap-hdpi/ic_launcher_round.png similarity index 100% rename from app/src/fenixProduction/res/mipmap-hdpi/ic_launcher_round.png rename to app/src/nightly/res/mipmap-hdpi/ic_launcher_round.png diff --git a/app/src/fenixProduction/res/mipmap-mdpi/ic_launcher.png b/app/src/nightly/res/mipmap-mdpi/ic_launcher.png similarity index 100% rename from app/src/fenixProduction/res/mipmap-mdpi/ic_launcher.png rename to app/src/nightly/res/mipmap-mdpi/ic_launcher.png diff --git a/app/src/fenixProduction/res/mipmap-mdpi/ic_launcher_round.png b/app/src/nightly/res/mipmap-mdpi/ic_launcher_round.png similarity index 100% rename from app/src/fenixProduction/res/mipmap-mdpi/ic_launcher_round.png rename to app/src/nightly/res/mipmap-mdpi/ic_launcher_round.png diff --git a/app/src/fenixProduction/res/mipmap-xhdpi/ic_launcher.png b/app/src/nightly/res/mipmap-xhdpi/ic_launcher.png similarity index 100% rename from app/src/fenixProduction/res/mipmap-xhdpi/ic_launcher.png rename to app/src/nightly/res/mipmap-xhdpi/ic_launcher.png diff --git a/app/src/fenixProduction/res/mipmap-xhdpi/ic_launcher_round.png b/app/src/nightly/res/mipmap-xhdpi/ic_launcher_round.png similarity index 100% rename from app/src/fenixProduction/res/mipmap-xhdpi/ic_launcher_round.png rename to app/src/nightly/res/mipmap-xhdpi/ic_launcher_round.png diff --git a/app/src/fenixProduction/res/mipmap-xxhdpi/ic_launcher.png b/app/src/nightly/res/mipmap-xxhdpi/ic_launcher.png similarity index 100% rename from app/src/fenixProduction/res/mipmap-xxhdpi/ic_launcher.png rename to app/src/nightly/res/mipmap-xxhdpi/ic_launcher.png diff --git a/app/src/fenixProduction/res/mipmap-xxhdpi/ic_launcher_round.png b/app/src/nightly/res/mipmap-xxhdpi/ic_launcher_round.png similarity index 100% rename from app/src/fenixProduction/res/mipmap-xxhdpi/ic_launcher_round.png rename to app/src/nightly/res/mipmap-xxhdpi/ic_launcher_round.png diff --git a/app/src/fenixProduction/res/mipmap-xxxhdpi/ic_launcher.png b/app/src/nightly/res/mipmap-xxxhdpi/ic_launcher.png similarity index 100% rename from app/src/fenixProduction/res/mipmap-xxxhdpi/ic_launcher.png rename to app/src/nightly/res/mipmap-xxxhdpi/ic_launcher.png diff --git a/app/src/fenixProduction/res/mipmap-xxxhdpi/ic_launcher_round.png b/app/src/nightly/res/mipmap-xxxhdpi/ic_launcher_round.png similarity index 100% rename from app/src/fenixProduction/res/mipmap-xxxhdpi/ic_launcher_round.png rename to app/src/nightly/res/mipmap-xxxhdpi/ic_launcher_round.png diff --git a/app/src/fenixNightly/res/values/colors.xml b/app/src/nightly/res/values/colors.xml similarity index 100% rename from app/src/fenixNightly/res/values/colors.xml rename to app/src/nightly/res/values/colors.xml diff --git a/app/src/fenixNightly/res/values/static_strings.xml b/app/src/nightly/res/values/static_strings.xml similarity index 100% rename from app/src/fenixNightly/res/values/static_strings.xml rename to app/src/nightly/res/values/static_strings.xml diff --git a/app/src/fenixProduction/res/xml/shortcuts.xml b/app/src/nightly/res/xml/shortcuts.xml similarity index 100% rename from app/src/fenixProduction/res/xml/shortcuts.xml rename to app/src/nightly/res/xml/shortcuts.xml diff --git a/app/src/fennecProduction/res/drawable-hdpi/fenix_search_widget.png b/app/src/release/res/drawable-hdpi/fenix_search_widget.png similarity index 100% rename from app/src/fennecProduction/res/drawable-hdpi/fenix_search_widget.png rename to app/src/release/res/drawable-hdpi/fenix_search_widget.png diff --git a/app/src/fennecProduction/res/drawable-hdpi/ic_logo_wordmark_normal.png b/app/src/release/res/drawable-hdpi/ic_logo_wordmark_normal.png similarity index 100% rename from app/src/fennecProduction/res/drawable-hdpi/ic_logo_wordmark_normal.png rename to app/src/release/res/drawable-hdpi/ic_logo_wordmark_normal.png diff --git a/app/src/fennecProduction/res/drawable-hdpi/ic_logo_wordmark_private.png b/app/src/release/res/drawable-hdpi/ic_logo_wordmark_private.png similarity index 100% rename from app/src/fennecProduction/res/drawable-hdpi/ic_logo_wordmark_private.png rename to app/src/release/res/drawable-hdpi/ic_logo_wordmark_private.png diff --git a/app/src/fennecProduction/res/drawable-mdpi/ic_logo_wordmark_normal.png b/app/src/release/res/drawable-mdpi/ic_logo_wordmark_normal.png similarity index 100% rename from app/src/fennecProduction/res/drawable-mdpi/ic_logo_wordmark_normal.png rename to app/src/release/res/drawable-mdpi/ic_logo_wordmark_normal.png diff --git a/app/src/fennecProduction/res/drawable-mdpi/ic_logo_wordmark_private.png b/app/src/release/res/drawable-mdpi/ic_logo_wordmark_private.png similarity index 100% rename from app/src/fennecProduction/res/drawable-mdpi/ic_logo_wordmark_private.png rename to app/src/release/res/drawable-mdpi/ic_logo_wordmark_private.png diff --git a/app/src/fennecProduction/res/drawable-xhdpi/ic_logo_wordmark_normal.png b/app/src/release/res/drawable-xhdpi/ic_logo_wordmark_normal.png similarity index 100% rename from app/src/fennecProduction/res/drawable-xhdpi/ic_logo_wordmark_normal.png rename to app/src/release/res/drawable-xhdpi/ic_logo_wordmark_normal.png diff --git a/app/src/fennecProduction/res/drawable-xhdpi/ic_logo_wordmark_private.png b/app/src/release/res/drawable-xhdpi/ic_logo_wordmark_private.png similarity index 100% rename from app/src/fennecProduction/res/drawable-xhdpi/ic_logo_wordmark_private.png rename to app/src/release/res/drawable-xhdpi/ic_logo_wordmark_private.png diff --git a/app/src/fennecProduction/res/drawable-xxhdpi/ic_logo_wordmark_normal.png b/app/src/release/res/drawable-xxhdpi/ic_logo_wordmark_normal.png similarity index 100% rename from app/src/fennecProduction/res/drawable-xxhdpi/ic_logo_wordmark_normal.png rename to app/src/release/res/drawable-xxhdpi/ic_logo_wordmark_normal.png diff --git a/app/src/fennecProduction/res/drawable-xxhdpi/ic_logo_wordmark_private.png b/app/src/release/res/drawable-xxhdpi/ic_logo_wordmark_private.png similarity index 100% rename from app/src/fennecProduction/res/drawable-xxhdpi/ic_logo_wordmark_private.png rename to app/src/release/res/drawable-xxhdpi/ic_logo_wordmark_private.png diff --git a/app/src/fennecProduction/res/drawable-xxxhdpi/ic_logo_wordmark_normal.png b/app/src/release/res/drawable-xxxhdpi/ic_logo_wordmark_normal.png similarity index 100% rename from app/src/fennecProduction/res/drawable-xxxhdpi/ic_logo_wordmark_normal.png rename to app/src/release/res/drawable-xxxhdpi/ic_logo_wordmark_normal.png diff --git a/app/src/fennecProduction/res/drawable-xxxhdpi/ic_logo_wordmark_private.png b/app/src/release/res/drawable-xxxhdpi/ic_logo_wordmark_private.png similarity index 100% rename from app/src/fennecProduction/res/drawable-xxxhdpi/ic_logo_wordmark_private.png rename to app/src/release/res/drawable-xxxhdpi/ic_logo_wordmark_private.png diff --git a/app/src/fennecProduction/res/drawable/ic_launcher_foreground.xml b/app/src/release/res/drawable/ic_launcher_foreground.xml similarity index 100% rename from app/src/fennecProduction/res/drawable/ic_launcher_foreground.xml rename to app/src/release/res/drawable/ic_launcher_foreground.xml diff --git a/app/src/fennecProduction/res/mipmap-hdpi/ic_launcher.png b/app/src/release/res/mipmap-hdpi/ic_launcher.png similarity index 100% rename from app/src/fennecProduction/res/mipmap-hdpi/ic_launcher.png rename to app/src/release/res/mipmap-hdpi/ic_launcher.png diff --git a/app/src/fennecProduction/res/mipmap-hdpi/ic_launcher_round.png b/app/src/release/res/mipmap-hdpi/ic_launcher_round.png similarity index 100% rename from app/src/fennecProduction/res/mipmap-hdpi/ic_launcher_round.png rename to app/src/release/res/mipmap-hdpi/ic_launcher_round.png diff --git a/app/src/fennecProduction/res/mipmap-mdpi/ic_launcher.png b/app/src/release/res/mipmap-mdpi/ic_launcher.png similarity index 100% rename from app/src/fennecProduction/res/mipmap-mdpi/ic_launcher.png rename to app/src/release/res/mipmap-mdpi/ic_launcher.png diff --git a/app/src/fennecProduction/res/mipmap-mdpi/ic_launcher_round.png b/app/src/release/res/mipmap-mdpi/ic_launcher_round.png similarity index 100% rename from app/src/fennecProduction/res/mipmap-mdpi/ic_launcher_round.png rename to app/src/release/res/mipmap-mdpi/ic_launcher_round.png diff --git a/app/src/fennecProduction/res/mipmap-xhdpi/ic_launcher.png b/app/src/release/res/mipmap-xhdpi/ic_launcher.png similarity index 100% rename from app/src/fennecProduction/res/mipmap-xhdpi/ic_launcher.png rename to app/src/release/res/mipmap-xhdpi/ic_launcher.png diff --git a/app/src/fennecProduction/res/mipmap-xhdpi/ic_launcher_round.png b/app/src/release/res/mipmap-xhdpi/ic_launcher_round.png similarity index 100% rename from app/src/fennecProduction/res/mipmap-xhdpi/ic_launcher_round.png rename to app/src/release/res/mipmap-xhdpi/ic_launcher_round.png diff --git a/app/src/fennecProduction/res/mipmap-xxhdpi/ic_launcher.png b/app/src/release/res/mipmap-xxhdpi/ic_launcher.png similarity index 100% rename from app/src/fennecProduction/res/mipmap-xxhdpi/ic_launcher.png rename to app/src/release/res/mipmap-xxhdpi/ic_launcher.png diff --git a/app/src/fennecProduction/res/mipmap-xxhdpi/ic_launcher_round.png b/app/src/release/res/mipmap-xxhdpi/ic_launcher_round.png similarity index 100% rename from app/src/fennecProduction/res/mipmap-xxhdpi/ic_launcher_round.png rename to app/src/release/res/mipmap-xxhdpi/ic_launcher_round.png diff --git a/app/src/fennecProduction/res/mipmap-xxxhdpi/ic_launcher.png b/app/src/release/res/mipmap-xxxhdpi/ic_launcher.png similarity index 100% rename from app/src/fennecProduction/res/mipmap-xxxhdpi/ic_launcher.png rename to app/src/release/res/mipmap-xxxhdpi/ic_launcher.png diff --git a/app/src/fennecProduction/res/mipmap-xxxhdpi/ic_launcher_round.png b/app/src/release/res/mipmap-xxxhdpi/ic_launcher_round.png similarity index 100% rename from app/src/fennecProduction/res/mipmap-xxxhdpi/ic_launcher_round.png rename to app/src/release/res/mipmap-xxxhdpi/ic_launcher_round.png diff --git a/app/src/fennecProduction/res/values/colors.xml b/app/src/release/res/values/colors.xml similarity index 100% rename from app/src/fennecProduction/res/values/colors.xml rename to app/src/release/res/values/colors.xml diff --git a/app/src/fennecProduction/res/values/static_strings.xml b/app/src/release/res/values/static_strings.xml similarity index 100% rename from app/src/fennecProduction/res/values/static_strings.xml rename to app/src/release/res/values/static_strings.xml diff --git a/app/src/fennecProduction/res/xml/shortcuts.xml b/app/src/release/res/xml/shortcuts.xml similarity index 100% rename from app/src/fennecProduction/res/xml/shortcuts.xml rename to app/src/release/res/xml/shortcuts.xml diff --git a/app/src/test/java/org/mozilla/fenix/ReleaseChannelTest.kt b/app/src/test/java/org/mozilla/fenix/ReleaseChannelTest.kt index 959a91513..6b9b41ebe 100644 --- a/app/src/test/java/org/mozilla/fenix/ReleaseChannelTest.kt +++ b/app/src/test/java/org/mozilla/fenix/ReleaseChannelTest.kt @@ -7,14 +7,14 @@ package org.mozilla.fenix import org.junit.Assert.assertFalse import org.junit.Assert.assertTrue import org.junit.Test -import org.mozilla.fenix.ReleaseChannel.FenixDebug +import org.mozilla.fenix.ReleaseChannel.Debug class ReleaseChannelTest { @Test fun `isReleased and isDebug channels are mutually exclusive`() { val debugChannels = setOf( - FenixDebug + Debug ) val nonDebugChannels = ReleaseChannel.values().toSet() - debugChannels diff --git a/app/src/test/java/org/mozilla/fenix/StrictModeManagerTest.kt b/app/src/test/java/org/mozilla/fenix/StrictModeManagerTest.kt index 0ddd003d9..560787384 100644 --- a/app/src/test/java/org/mozilla/fenix/StrictModeManagerTest.kt +++ b/app/src/test/java/org/mozilla/fenix/StrictModeManagerTest.kt @@ -43,7 +43,7 @@ class StrictModeManagerTest { @Test fun `test enableStrictMode in release`() { - every { Config.channel } returns ReleaseChannel.FenixProduction + every { Config.channel } returns ReleaseChannel.Release StrictModeManager.enableStrictMode(false) verify(exactly = 0) { StrictMode.setThreadPolicy(any()) } @@ -52,7 +52,7 @@ class StrictModeManagerTest { @Test fun `test enableStrictMode in debug`() { - every { Config.channel } returns ReleaseChannel.FenixDebug + every { Config.channel } returns ReleaseChannel.Debug StrictModeManager.enableStrictMode(false) verify { StrictMode.setThreadPolicy(any()) } diff --git a/app/src/test/java/org/mozilla/fenix/ext/LogTest.kt b/app/src/test/java/org/mozilla/fenix/ext/LogTest.kt index 201b75e72..1dc43726e 100644 --- a/app/src/test/java/org/mozilla/fenix/ext/LogTest.kt +++ b/app/src/test/java/org/mozilla/fenix/ext/LogTest.kt @@ -32,35 +32,35 @@ class LogTest { @Test fun `Test log debug function`() { - every { Config.channel } returns ReleaseChannel.FenixDebug + every { Config.channel } returns ReleaseChannel.Debug logDebug("hi", "hi") verify { Log.d("hi", "hi") } } @Test fun `Test log warn function with tag and message args`() { - every { Config.channel } returns ReleaseChannel.FenixDebug + every { Config.channel } returns ReleaseChannel.Debug logWarn("hi", "hi") verify { Log.w("hi", "hi") } } @Test fun `Test log warn function with tag, message, and exception args`() { - every { Config.channel } returns ReleaseChannel.FenixDebug + every { Config.channel } returns ReleaseChannel.Debug logWarn("hi", "hi", mockThrowable) verify { Log.w("hi", "hi", mockThrowable) } } @Test fun `Test log error function with tag, message, and exception args`() { - every { Config.channel } returns ReleaseChannel.FenixDebug + every { Config.channel } returns ReleaseChannel.Debug logErr("hi", "hi", mockThrowable) verify { Log.e("hi", "hi", mockThrowable) } } @Test fun `Test no log in production channel`() { - every { Config.channel } returns ReleaseChannel.FenixProduction + every { Config.channel } returns ReleaseChannel.Release logDebug("hi", "hi") logWarn("hi", "hi") diff --git a/app/src/test/java/org/mozilla/fenix/ext/StrictModeTest.kt b/app/src/test/java/org/mozilla/fenix/ext/StrictModeTest.kt index 515949d2a..26854c46d 100644 --- a/app/src/test/java/org/mozilla/fenix/ext/StrictModeTest.kt +++ b/app/src/test/java/org/mozilla/fenix/ext/StrictModeTest.kt @@ -49,21 +49,21 @@ class StrictModeTest { @Test fun `runs function block in release`() { - every { Config.channel } returns ReleaseChannel.FenixProduction + every { Config.channel } returns ReleaseChannel.Release assertEquals("Hello world", threadPolicy.resetPoliciesAfter(functionBlock)) verify(exactly = 0) { StrictMode.setThreadPolicy(any()) } } @Test fun `runs function block in debug`() { - every { Config.channel } returns ReleaseChannel.FenixDebug + every { Config.channel } returns ReleaseChannel.Debug assertEquals("Hello world", threadPolicy.resetPoliciesAfter(functionBlock)) verify { StrictMode.setThreadPolicy(threadPolicy) } } @Test fun `sets thread policy even if function throws`() { - every { Config.channel } returns ReleaseChannel.FenixDebug + every { Config.channel } returns ReleaseChannel.Debug every { functionBlock() } throws IllegalStateException() var exception: IllegalStateException? = null diff --git a/automation/gradle/versionCode.gradle b/automation/gradle/versionCode.gradle deleted file mode 100644 index 219609dfe..000000000 --- a/automation/gradle/versionCode.gradle +++ /dev/null @@ -1,44 +0,0 @@ -// This Source Code Form is subject to the terms of the Mozilla Public -// License, v. 2.0. If a copy of the MPL was not distributed with this -// file, You can obtain one at http://mozilla.org/MPL/2.0/. - -import java.text.SimpleDateFormat - -// This gradle scripts generates a "unique" version code for our release versions. -// -// The result of the version code depends on the timezone. We assume that this script will only be used -// for release versions and running on our build servers with a fixed timezone. -// -// The version code is composed like: yDDDHHmm -// * y = Double digit year, with 18 subtracted: 2018 -> 18 -> 0 -// * DDD = Day of the year, pad with zeros if needed: September 6th -> 249 -// * HH = Hour in day (00-23) -// * mm = Minute in hour -// -// For September 6th, 2018, 9:41 am this will generate the versionCode: 2490941 (0-249-09-41). -// -// Note that we only use this generated version code for builds we want to distribute. For local -// debug builds we use a fixed versionCode to not mess with the caching mechanism of the build -// system. - -ext { - def today = new Date() - - // We use the current year (double digit) and subtract 18. We first released Fenix in - // 2018 so this value will start counting at 0 and increment by one every year. - def year = String.valueOf((new SimpleDateFormat("yy").format(today) as int) - 18) - - // We use the day in the Year (e.g. 248) as opposed to month + day (0510) because it's one digit shorter. - // If needed we pad with zeros (e.g. 25 -> 025) - def day = String.format("%03d", (new SimpleDateFormat("D").format(today) as int)) - - // We append the hour in day (24h) and minute in hour (7:26 pm -> 1926). We do not append - // seconds. This assumes that we do not need to build multiple release(!) builds the same - // minute. - def time = new SimpleDateFormat("HHmm").format(today) - - generatedVersionCode = (year + day + time) as int - - println("Generated versionCode: $generatedVersionCode") - println() -} diff --git a/taskcluster/ci/build/kind.yml b/taskcluster/ci/build/kind.yml index 91299a9c8..bf412f1fc 100644 --- a/taskcluster/ci/build/kind.yml +++ b/taskcluster/ci/build/kind.yml @@ -20,8 +20,8 @@ job-defaults: # `name` and `path`. apk-artifact-template: type: file - name: public/build/{abi}/{geckoview_engine}/target.apk - path: '/builds/worker/checkouts/src/app/build/outputs/apk/{geckoview_engine}/{gradle_build_type}/{fileName}' + name: public/build/{abi}/target.apk + path: '/builds/worker/checkouts/src/app/build/outputs/apk/{gradle_build_type}/{fileName}' description: Build Fenix from source code. fetches: toolchain: @@ -49,7 +49,6 @@ jobs: code-review: true run-on-tasks-for: [github-pull-request, github-push] run: - geckoview-engine: geckoNightly gradle-build-type: debug treeherder: symbol: debug(B) @@ -59,11 +58,10 @@ jobs: code-review: true run-on-tasks-for: [github-pull-request, github-push] run: - geckoview-engine: geckoNightly gradle-build-type: androidTest apk-artifact-template: # 2 differences here: "androidTest/" is added and "{gradle_build_type}" is forced to "debug" - path: '/builds/worker/checkouts/src/app/build/outputs/apk/androidTest/{geckoview_engine}/debug/{fileName}' + path: '/builds/worker/checkouts/src/app/build/outputs/apk/androidTest/debug/{fileName}' treeherder: symbol: debug(Bat) @@ -78,21 +76,13 @@ jobs: attributes: nightly: true run: - geckoview-engine: geckoNightly gradle-build-type: androidTest apk-artifact-template: # 2 differences here: "androidTest/" is added and "{gradle_build_type}" is forced to "debug" - path: '/builds/worker/checkouts/src/app/build/outputs/apk/androidTest/{geckoview_engine}/debug/{fileName}' + path: '/builds/worker/checkouts/src/app/build/outputs/apk/androidTest/debug/{fileName}' treeherder: symbol: nightly(Bat) - performance-test: - run: - geckoview-engine: geckoNightly - gradle-build-type: forPerformanceTest - treeherder: - symbol: forPerformanceTest(B) - nightly-simulation: attributes: nightly: false @@ -100,8 +90,7 @@ jobs: include-nightly-version: true include-shippable-secrets: true run: - geckoview-engine: geckoNightly - gradle-build-type: fenixProduction + gradle-build-type: nightly treeherder: symbol: nightlySim(B) @@ -111,33 +100,29 @@ jobs: include-nightly-version: true include-shippable-secrets: true run: - geckoview-engine: geckoNightly - # XXX `fenixProduction` is now the new nightly. - gradle-build-type: fenixProduction + gradle-build-type: nightly run-on-tasks-for: [] treeherder: symbol: nightly(B) - fennec-beta: + beta: attributes: release-type: beta include-release-version: true include-shippable-secrets: true filter-incomplete-translations: true run: - geckoview-engine: geckoBeta - gradle-build-type: fennecBeta + gradle-build-type: beta treeherder: - symbol: betaFennec(B) + symbol: beta(B) - fennec-production: + release: attributes: - release-type: production + release-type: release include-release-version: true include-shippable-secrets: true filter-incomplete-translations: true run: - geckoview-engine: geckoBeta - gradle-build-type: fennecProduction + gradle-build-type: release treeherder: - symbol: productionFennec(B) + symbol: release(B) diff --git a/taskcluster/ci/config.yml b/taskcluster/ci/config.yml index d524794fe..6981d4f26 100644 --- a/taskcluster/ci/config.yml +++ b/taskcluster/ci/config.yml @@ -2,7 +2,7 @@ trust-domain: mobile treeherder: group-names: - 'betaFennec': 'Beta-related tasks with same APK configuration as Fennec' + 'beta': 'Beta-related tasks with same APK configuration as Fennec' 'Btime': 'Raptor-Browsertime tests' 'bump': 'Bump dependencies' 'debug': 'Builds made for testing' @@ -11,8 +11,7 @@ treeherder: 'I': 'Docker Image Builds' 'nightly': 'Nightly-related tasks' 'nightlySim': 'Nightly-related tasks that run on each github push' - 'production': 'Release-related tasks' - 'productionFennec': 'Production-related tasks with same APK configuration as Fennec' + 'release': 'Production-related tasks with same APK configuration as Fennec' 'Rap': 'Raptor tests' 'Rap-P': 'Raptor power tests' 'TL': 'Toolchain builds for Linux 64-bits' diff --git a/taskcluster/ci/lint/kind.yml b/taskcluster/ci/lint/kind.yml index b636e1e98..bbcc3cd65 100644 --- a/taskcluster/ci/lint/kind.yml +++ b/taskcluster/ci/lint/kind.yml @@ -69,7 +69,7 @@ jobs: description: 'Running lint over all modules' run: using: gradlew - gradlew: ['lintGeckoNightlyDebug', 'githubLintAndroidDetails'] + gradlew: ['lintDebug', 'githubLintAndroidDetails'] treeherder: symbol: lint worker: diff --git a/taskcluster/ci/mark-as-shipped/kind.yml b/taskcluster/ci/mark-as-shipped/kind.yml index b7cc1772c..cd6ebd2c3 100644 --- a/taskcluster/ci/mark-as-shipped/kind.yml +++ b/taskcluster/ci/mark-as-shipped/kind.yml @@ -17,8 +17,8 @@ primary-dependency: push-apk group-by: build-type only-for-build-types: - - fennec-beta - - fennec-production + - beta + - release job-template: description: Mark Fenix as shipped in ship-it diff --git a/taskcluster/ci/push-apk/kind.yml b/taskcluster/ci/push-apk/kind.yml index 4135e4ac6..6311e5f9d 100644 --- a/taskcluster/ci/push-apk/kind.yml +++ b/taskcluster/ci/push-apk/kind.yml @@ -17,19 +17,25 @@ primary-dependency: signing group-by: build-type only-for-build-types: - - fennec-beta - - fennec-production + - beta + - release - nightly job-template: description: Publish Fenix worker-type: push-apk worker: + certificate-alias: + # TODO rename these values to use non-legacy terms. + by-build-type: + nightly: fenix-production + beta: fennec-beta + release: fennec-production commit: true channel: by-build-type: - fennec-beta: fennec-beta - fennec-production: fennec-production + beta: fennec-beta + release: fennec-production nightly: production dep: by-level: diff --git a/taskcluster/ci/signing/kind.yml b/taskcluster/ci/signing/kind.yml index 1436c1efb..8d6efef30 100644 --- a/taskcluster/ci/signing/kind.yml +++ b/taskcluster/ci/signing/kind.yml @@ -20,7 +20,7 @@ job-template: description: Sign Fenix worker-type: by-build-type: - (fennec-.+|nightly|android-test-nightly): + (nightly|beta|release|android-test-nightly): by-level: '3': signing default: dep-signing @@ -28,7 +28,7 @@ job-template: worker: signing-type: by-build-type: - fennec-(beta|production): + (beta|release): by-level: '3': fennec-production-signing default: dep-signing @@ -45,7 +45,7 @@ job-template: signing-format: autograph_apk index: by-build-type: - (fennec-.+|performance-test|nightly|debug|nightly-simulation): + (nightly|debug|nightly-simulation|beta|release): type: signing default: {} run-on-tasks-for: diff --git a/taskcluster/ci/startup-test/kind.yml b/taskcluster/ci/startup-test/kind.yml index e4bdbf9ef..e9cbfea16 100644 --- a/taskcluster/ci/startup-test/kind.yml +++ b/taskcluster/ci/startup-test/kind.yml @@ -48,16 +48,16 @@ jobs: nightly-x86: run: commands: - - [wget, {artifact-reference: ''}, '-O', app-x86.apk] - - [wget, {artifact-reference: ''}, '-O', android-test.apk] + - [wget, {artifact-reference: ''}, '-O', app-x86.apk] + - [wget, {artifact-reference: ''}, '-O', android-test.apk] - [automation/taskcluster/androidTest/ui-test.sh, x86-start-test, app-x86.apk, android-test.apk, '-1'] treeherder: symbol: nightly(startup-x86) nightly-arm: run: commands: - - [wget, {artifact-reference: ''}, '-O', app-arm.apk] - - [wget, {artifact-reference: ''}, '-O', android-test.apk] + - [wget, {artifact-reference: ''}, '-O', app-arm.apk] + - [wget, {artifact-reference: ''}, '-O', android-test.apk] - [automation/taskcluster/androidTest/ui-test.sh, arm-start-test, app-arm.apk, android-test.apk, '-1'] treeherder: symbol: nightly(startup-arm) diff --git a/taskcluster/ci/test/kind.yml b/taskcluster/ci/test/kind.yml index a1809e8ff..6f3a83aaa 100644 --- a/taskcluster/ci/test/kind.yml +++ b/taskcluster/ci/test/kind.yml @@ -37,13 +37,12 @@ jobs: debug: attributes: build-type: debug - geckoview-engine: geckoNightly code-review: true run: gradlew: - 'clean' - '-Pcoverage' - - 'jacocoGeckoNightlyDebugTestReport' + - 'jacocoDebugTestReport' - 'githubTestDetails' post-gradlew: - ['automation/taskcluster/upload_coverage_report.sh'] @@ -58,7 +57,7 @@ jobs: worker: artifacts: - name: public/reports/index.html - path: /builds/worker/checkouts/src/app/build/reports/tests/testGeckoNightlyDebugUnitTest/index.html + path: /builds/worker/checkouts/src/app/build/reports/tests/testDebugUnitTest/index.html type: file - name: public/reports/test path: /builds/worker/checkouts/src/app/build/reports/tests diff --git a/taskcluster/ci/ui-test/kind.yml b/taskcluster/ci/ui-test/kind.yml index 66665abb2..bcb9dc9e5 100644 --- a/taskcluster/ci/ui-test/kind.yml +++ b/taskcluster/ci/ui-test/kind.yml @@ -20,8 +20,8 @@ job-defaults: include-pull-request-number: true run: commands: - - [wget, {artifact-reference: ''}, '-O', app.apk] - - [wget, {artifact-reference: ''}, '-O', android-test.apk] + - [wget, {artifact-reference: ''}, '-O', app.apk] + - [wget, {artifact-reference: ''}, '-O', android-test.apk] secrets: - name: project/mobile/fenix/firebase key: firebaseToken diff --git a/taskcluster/fenix_taskgraph/gradle.py b/taskcluster/fenix_taskgraph/gradle.py index bc9b34655..f4eea1159 100644 --- a/taskcluster/fenix_taskgraph/gradle.py +++ b/taskcluster/fenix_taskgraph/gradle.py @@ -11,20 +11,20 @@ from taskgraph.util.memoize import memoize -def get_variant(build_type, engine): +def get_variant(build_type): all_variants = _fetch_all_variants() matching_variants = [ variant for variant in all_variants - if variant["build_type"] == build_type and variant["engine"] == engine + if variant["build_type"] == build_type ] number_of_matching_variants = len(matching_variants) if number_of_matching_variants == 0: - raise ValueError('No variant found for build type "{}" and engine "{}"'.format( - build_type, engine + raise ValueError('No variant found for build type "{}"'.format( + build_type )) elif number_of_matching_variants > 1: - raise ValueError('Too many variants found for build type "{}" and engine "{}": {}'.format( - build_type, engine, matching_variants + raise ValueError('Too many variants found for build type "{}"": {}'.format( + build_type, matching_variants )) return matching_variants.pop() diff --git a/taskcluster/fenix_taskgraph/transforms/build.py b/taskcluster/fenix_taskgraph/transforms/build.py index 399a4c006..ebc4b94de 100644 --- a/taskcluster/fenix_taskgraph/transforms/build.py +++ b/taskcluster/fenix_taskgraph/transforms/build.py @@ -67,8 +67,7 @@ def add_shippable_secrets(config, tasks): def build_gradle_command(config, tasks): for task in tasks: gradle_build_type = task["run"]["gradle-build-type"] - geckoview_engine = task["run"]["geckoview-engine"] - variant_config = get_variant(gradle_build_type, geckoview_engine) + variant_config = get_variant(gradle_build_type) task["run"]["gradlew"] = [ "clean", @@ -104,8 +103,7 @@ def add_release_version(config, tasks): def add_artifacts(config, tasks): for task in tasks: gradle_build_type = task["run"].pop("gradle-build-type") - geckoview_engine = task["run"].pop("geckoview-engine") - variant_config = get_variant(gradle_build_type, geckoview_engine) + variant_config = get_variant(gradle_build_type) artifacts = task.setdefault("worker", {}).setdefault("artifacts", []) task["attributes"]["apks"] = apks = {} @@ -113,13 +111,12 @@ def add_artifacts(config, tasks): artifact_template = task.pop("apk-artifact-template") for apk in variant_config["apks"]: apk_name = artifact_template["name"].format( - geckoview_engine=geckoview_engine, **apk + **apk ) artifacts.append({ "type": artifact_template["type"], "name": apk_name, "path": artifact_template["path"].format( - geckoview_engine=geckoview_engine, gradle_build_type=gradle_build_type, **apk ), diff --git a/taskcluster/fenix_taskgraph/transforms/push_apk.py b/taskcluster/fenix_taskgraph/transforms/push_apk.py index 1de559aad..ea06d6263 100644 --- a/taskcluster/fenix_taskgraph/transforms/push_apk.py +++ b/taskcluster/fenix_taskgraph/transforms/push_apk.py @@ -18,7 +18,7 @@ transforms = TransformSequence() @transforms.add def resolve_keys(config, tasks): for task in tasks: - for key in ("worker.channel", "worker.dep"): + for key in ("worker.channel", "worker.dep", "worker.certificate-alias"): resolve_keyed_by( task, key, @@ -29,24 +29,3 @@ def resolve_keys(config, tasks): } ) yield task - - -@transforms.add -def build_worker_definition(config, tasks): - for task in tasks: - worker_definition = {} - worker_definition["certificate-alias"] = "{}-{}".format( - task["worker"]["product"], task["worker"]["channel"] - ) - - build_type = task["attributes"]["build-type"] - # Fenix production doesn't follow the rule {product}-{channel} - if build_type == "production": - worker_definition["certificate-alias"] = "fenix" - # Neither do Fennec flavored builds - elif build_type.startswith("fennec-"): - worker_definition["certificate-alias"] = build_type - - task["worker"].update(worker_definition) - - yield task