Bug 1804785 - Consume AC via gradle build with relative path in Fenix

fenix/112.0
Gabriel Luong 2 years ago committed by mergify[bot]
parent 08aeacd04c
commit 390e980860

@ -1,373 +0,0 @@
Mozilla Public License Version 2.0
==================================
1. Definitions
--------------
1.1. "Contributor"
means each individual or legal entity that creates, contributes to
the creation of, or owns Covered Software.
1.2. "Contributor Version"
means the combination of the Contributions of others (if any) used
by a Contributor and that particular Contributor's Contribution.
1.3. "Contribution"
means Covered Software of a particular Contributor.
1.4. "Covered Software"
means Source Code Form to which the initial Contributor has attached
the notice in Exhibit A, the Executable Form of such Source Code
Form, and Modifications of such Source Code Form, in each case
including portions thereof.
1.5. "Incompatible With Secondary Licenses"
means
(a) that the initial Contributor has attached the notice described
in Exhibit B to the Covered Software; or
(b) that the Covered Software was made available under the terms of
version 1.1 or earlier of the License, but not also under the
terms of a Secondary License.
1.6. "Executable Form"
means any form of the work other than Source Code Form.
1.7. "Larger Work"
means a work that combines Covered Software with other material, in
a separate file or files, that is not Covered Software.
1.8. "License"
means this document.
1.9. "Licensable"
means having the right to grant, to the maximum extent possible,
whether at the time of the initial grant or subsequently, any and
all of the rights conveyed by this License.
1.10. "Modifications"
means any of the following:
(a) any file in Source Code Form that results from an addition to,
deletion from, or modification of the contents of Covered
Software; or
(b) any new file in Source Code Form that contains any Covered
Software.
1.11. "Patent Claims" of a Contributor
means any patent claim(s), including without limitation, method,
process, and apparatus claims, in any patent Licensable by such
Contributor that would be infringed, but for the grant of the
License, by the making, using, selling, offering for sale, having
made, import, or transfer of either its Contributions or its
Contributor Version.
1.12. "Secondary License"
means either the GNU General Public License, Version 2.0, the GNU
Lesser General Public License, Version 2.1, the GNU Affero General
Public License, Version 3.0, or any later versions of those
licenses.
1.13. "Source Code Form"
means the form of the work preferred for making modifications.
1.14. "You" (or "Your")
means an individual or a legal entity exercising rights under this
License. For legal entities, "You" includes any entity that
controls, is controlled by, or is under common control with You. For
purposes of this definition, "control" means (a) the power, direct
or indirect, to cause the direction or management of such entity,
whether by contract or otherwise, or (b) ownership of more than
fifty percent (50%) of the outstanding shares or beneficial
ownership of such entity.
2. License Grants and Conditions
--------------------------------
2.1. Grants
Each Contributor hereby grants You a world-wide, royalty-free,
non-exclusive license:
(a) under intellectual property rights (other than patent or trademark)
Licensable by such Contributor to use, reproduce, make available,
modify, display, perform, distribute, and otherwise exploit its
Contributions, either on an unmodified basis, with Modifications, or
as part of a Larger Work; and
(b) under Patent Claims of such Contributor to make, use, sell, offer
for sale, have made, import, and otherwise transfer either its
Contributions or its Contributor Version.
2.2. Effective Date
The licenses granted in Section 2.1 with respect to any Contribution
become effective for each Contribution on the date the Contributor first
distributes such Contribution.
2.3. Limitations on Grant Scope
The licenses granted in this Section 2 are the only rights granted under
this License. No additional rights or licenses will be implied from the
distribution or licensing of Covered Software under this License.
Notwithstanding Section 2.1(b) above, no patent license is granted by a
Contributor:
(a) for any code that a Contributor has removed from Covered Software;
or
(b) for infringements caused by: (i) Your and any other third party's
modifications of Covered Software, or (ii) the combination of its
Contributions with other software (except as part of its Contributor
Version); or
(c) under Patent Claims infringed by Covered Software in the absence of
its Contributions.
This License does not grant any rights in the trademarks, service marks,
or logos of any Contributor (except as may be necessary to comply with
the notice requirements in Section 3.4).
2.4. Subsequent Licenses
No Contributor makes additional grants as a result of Your choice to
distribute the Covered Software under a subsequent version of this
License (see Section 10.2) or under the terms of a Secondary License (if
permitted under the terms of Section 3.3).
2.5. Representation
Each Contributor represents that the Contributor believes its
Contributions are its original creation(s) or it has sufficient rights
to grant the rights to its Contributions conveyed by this License.
2.6. Fair Use
This License is not intended to limit any rights You have under
applicable copyright doctrines of fair use, fair dealing, or other
equivalents.
2.7. Conditions
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
in Section 2.1.
3. Responsibilities
-------------------
3.1. Distribution of Source Form
All distribution of Covered Software in Source Code Form, including any
Modifications that You create or to which You contribute, must be under
the terms of this License. You must inform recipients that the Source
Code Form of the Covered Software is governed by the terms of this
License, and how they can obtain a copy of this License. You may not
attempt to alter or restrict the recipients' rights in the Source Code
Form.
3.2. Distribution of Executable Form
If You distribute Covered Software in Executable Form then:
(a) such Covered Software must also be made available in Source Code
Form, as described in Section 3.1, and You must inform recipients of
the Executable Form how they can obtain a copy of such Source Code
Form by reasonable means in a timely manner, at a charge no more
than the cost of distribution to the recipient; and
(b) You may distribute such Executable Form under the terms of this
License, or sublicense it under different terms, provided that the
license for the Executable Form does not attempt to limit or alter
the recipients' rights in the Source Code Form under this License.
3.3. Distribution of a Larger Work
You may create and distribute a Larger Work under terms of Your choice,
provided that You also comply with the requirements of this License for
the Covered Software. If the Larger Work is a combination of Covered
Software with a work governed by one or more Secondary Licenses, and the
Covered Software is not Incompatible With Secondary Licenses, this
License permits You to additionally distribute such Covered Software
under the terms of such Secondary License(s), so that the recipient of
the Larger Work may, at their option, further distribute the Covered
Software under the terms of either this License or such Secondary
License(s).
3.4. Notices
You may not remove or alter the substance of any license notices
(including copyright notices, patent notices, disclaimers of warranty,
or limitations of liability) contained within the Source Code Form of
the Covered Software, except that You may alter any license notices to
the extent required to remedy known factual inaccuracies.
3.5. Application of Additional Terms
You may choose to offer, and to charge a fee for, warranty, support,
indemnity or liability obligations to one or more recipients of Covered
Software. However, You may do so only on Your own behalf, and not on
behalf of any Contributor. You must make it absolutely clear that any
such warranty, support, indemnity, or liability obligation is offered by
You alone, and You hereby agree to indemnify every Contributor for any
liability incurred by such Contributor as a result of warranty, support,
indemnity or liability terms You offer. You may include additional
disclaimers of warranty and limitations of liability specific to any
jurisdiction.
4. Inability to Comply Due to Statute or Regulation
---------------------------------------------------
If it is impossible for You to comply with any of the terms of this
License with respect to some or all of the Covered Software due to
statute, judicial order, or regulation then You must: (a) comply with
the terms of this License to the maximum extent possible; and (b)
describe the limitations and the code they affect. Such description must
be placed in a text file included with all distributions of the Covered
Software under this License. Except to the extent prohibited by statute
or regulation, such description must be sufficiently detailed for a
recipient of ordinary skill to be able to understand it.
5. Termination
--------------
5.1. The rights granted under this License will terminate automatically
if You fail to comply with any of its terms. However, if You become
compliant, then the rights granted under this License from a particular
Contributor are reinstated (a) provisionally, unless and until such
Contributor explicitly and finally terminates Your grants, and (b) on an
ongoing basis, if such Contributor fails to notify You of the
non-compliance by some reasonable means prior to 60 days after You have
come back into compliance. Moreover, Your grants from a particular
Contributor are reinstated on an ongoing basis if such Contributor
notifies You of the non-compliance by some reasonable means, this is the
first time You have received notice of non-compliance with this License
from such Contributor, and You become compliant prior to 30 days after
Your receipt of the notice.
5.2. If You initiate litigation against any entity by asserting a patent
infringement claim (excluding declaratory judgment actions,
counter-claims, and cross-claims) alleging that a Contributor Version
directly or indirectly infringes any patent, then the rights granted to
You by any and all Contributors for the Covered Software under Section
2.1 of this License shall terminate.
5.3. In the event of termination under Sections 5.1 or 5.2 above, all
end user license agreements (excluding distributors and resellers) which
have been validly granted by You or Your distributors under this License
prior to termination shall survive termination.
************************************************************************
* *
* 6. Disclaimer of Warranty *
* ------------------------- *
* *
* Covered Software is provided under this License on an "as is" *
* basis, without warranty of any kind, either expressed, implied, or *
* statutory, including, without limitation, warranties that the *
* Covered Software is free of defects, merchantable, fit for a *
* particular purpose or non-infringing. The entire risk as to the *
* quality and performance of the Covered Software is with You. *
* Should any Covered Software prove defective in any respect, You *
* (not any Contributor) assume the cost of any necessary servicing, *
* repair, or correction. This disclaimer of warranty constitutes an *
* essential part of this License. No use of any Covered Software is *
* authorized under this License except under this disclaimer. *
* *
************************************************************************
************************************************************************
* *
* 7. Limitation of Liability *
* -------------------------- *
* *
* Under no circumstances and under no legal theory, whether tort *
* (including negligence), contract, or otherwise, shall any *
* Contributor, or anyone who distributes Covered Software as *
* permitted above, be liable to You for any direct, indirect, *
* special, incidental, or consequential damages of any character *
* including, without limitation, damages for lost profits, loss of *
* goodwill, work stoppage, computer failure or malfunction, or any *
* and all other commercial damages or losses, even if such party *
* shall have been informed of the possibility of such damages. This *
* limitation of liability shall not apply to liability for death or *
* personal injury resulting from such party's negligence to the *
* extent applicable law prohibits such limitation. Some *
* jurisdictions do not allow the exclusion or limitation of *
* incidental or consequential damages, so this exclusion and *
* limitation may not apply to You. *
* *
************************************************************************
8. Litigation
-------------
Any litigation relating to this License may be brought only in the
courts of a jurisdiction where the defendant maintains its principal
place of business and such litigation shall be governed by laws of that
jurisdiction, without reference to its conflict-of-law provisions.
Nothing in this Section shall prevent a party's ability to bring
cross-claims or counter-claims.
9. Miscellaneous
----------------
This License represents the complete agreement concerning the subject
matter hereof. If any provision of this License is held to be
unenforceable, such provision shall be reformed only to the extent
necessary to make it enforceable. Any law or regulation which provides
that the language of a contract shall be construed against the drafter
shall not be used to construe this License against a Contributor.
10. Versions of the License
---------------------------
10.1. New Versions
Mozilla Foundation is the license steward. Except as provided in Section
10.3, no one other than the license steward has the right to modify or
publish new versions of this License. Each version will be given a
distinguishing version number.
10.2. Effect of New Versions
You may distribute the Covered Software under the terms of the version
of the License under which You originally received the Covered Software,
or under the terms of any subsequent version published by the license
steward.
10.3. Modified Versions
If you create software not governed by this License, and you want to
create a new license for such software, you may create and use a
modified version of this License if you rename the license and remove
any references to the name of the license steward (except to note that
such modified license differs from this License).
10.4. Distributing Source Code Form that is Incompatible With Secondary
Licenses
If You choose to distribute Source Code Form that is Incompatible With
Secondary Licenses under the terms of this version of the License, the
notice described in Exhibit B of this License must be attached.
Exhibit A - Source Code Form License Notice
-------------------------------------------
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/.
If it is not possible or desirable to put the notice in a particular
file, then You may include the notice in a location (such as a LICENSE
file in a relevant directory) where a recipient would be likely to look
for such a notice.
You may add additional accurate notices of copyright ownership.
Exhibit B - "Incompatible With Secondary Licenses" Notice
---------------------------------------------------------
This Source Code Form is "Incompatible With Secondary Licenses", as
defined by the Mozilla Public License, v. 2.0.

@ -473,7 +473,7 @@ dependencies {
jnaForTest FenixDependencies.jna
testImplementation files(configurations.jnaForTest.copyRecursive().files)
implementation FenixDependencies.mozilla_browser_engine_gecko
implementation project(':browser-engine-gecko')
implementation FenixDependencies.kotlin_stdlib
implementation FenixDependencies.kotlin_coroutines
@ -487,94 +487,95 @@ dependencies {
implementation FenixDependencies.sentry
implementation FenixDependencies.mozilla_compose_awesomebar
implementation FenixDependencies.mozilla_compose_cfr
implementation FenixDependencies.mozilla_concept_awesomebar
implementation FenixDependencies.mozilla_concept_base
implementation FenixDependencies.mozilla_concept_engine
implementation FenixDependencies.mozilla_concept_menu
implementation FenixDependencies.mozilla_concept_push
implementation FenixDependencies.mozilla_concept_storage
implementation FenixDependencies.mozilla_concept_sync
implementation FenixDependencies.mozilla_concept_toolbar
implementation FenixDependencies.mozilla_concept_tabstray
implementation FenixDependencies.mozilla_browser_domains
implementation FenixDependencies.mozilla_browser_icons
implementation FenixDependencies.mozilla_browser_menu
implementation FenixDependencies.mozilla_browser_menu2
implementation FenixDependencies.mozilla_browser_session_storage
implementation FenixDependencies.mozilla_browser_state
implementation FenixDependencies.mozilla_browser_storage_sync
implementation FenixDependencies.mozilla_browser_tabstray
implementation FenixDependencies.mozilla_browser_thumbnails
implementation FenixDependencies.mozilla_browser_toolbar
implementation FenixDependencies.mozilla_feature_addons
implementation FenixDependencies.mozilla_feature_accounts
implementation FenixDependencies.mozilla_feature_app_links
implementation FenixDependencies.mozilla_feature_autofill
implementation FenixDependencies.mozilla_feature_awesomebar
implementation FenixDependencies.mozilla_feature_contextmenu
implementation FenixDependencies.mozilla_feature_customtabs
implementation FenixDependencies.mozilla_feature_downloads
implementation FenixDependencies.mozilla_feature_intent
implementation FenixDependencies.mozilla_feature_media
implementation FenixDependencies.mozilla_feature_prompts
implementation FenixDependencies.mozilla_feature_push
implementation FenixDependencies.mozilla_feature_privatemode
implementation FenixDependencies.mozilla_feature_pwa
implementation FenixDependencies.mozilla_feature_qr
implementation FenixDependencies.mozilla_feature_search
implementation FenixDependencies.mozilla_feature_session
implementation FenixDependencies.mozilla_feature_syncedtabs
implementation FenixDependencies.mozilla_feature_toolbar
implementation FenixDependencies.mozilla_feature_tabs
implementation FenixDependencies.mozilla_feature_findinpage
implementation FenixDependencies.mozilla_feature_logins
implementation FenixDependencies.mozilla_feature_site_permissions
implementation FenixDependencies.mozilla_feature_readerview
implementation FenixDependencies.mozilla_feature_tab_collections
implementation FenixDependencies.mozilla_feature_recentlyclosed
implementation FenixDependencies.mozilla_feature_top_sites
implementation FenixDependencies.mozilla_feature_share
implementation FenixDependencies.mozilla_feature_accounts_push
implementation FenixDependencies.mozilla_feature_webauthn
implementation FenixDependencies.mozilla_feature_webcompat
implementation FenixDependencies.mozilla_feature_webnotifications
implementation FenixDependencies.mozilla_feature_webcompat_reporter
implementation FenixDependencies.mozilla_service_pocket
implementation FenixDependencies.mozilla_service_contile
implementation FenixDependencies.mozilla_service_digitalassetlinks
implementation FenixDependencies.mozilla_service_sync_autofill
implementation FenixDependencies.mozilla_service_sync_logins
implementation FenixDependencies.mozilla_service_firefox_accounts
implementation(FenixDependencies.mozilla_service_glean)
implementation FenixDependencies.mozilla_service_location
implementation FenixDependencies.mozilla_service_nimbus
implementation FenixDependencies.mozilla_support_extensions
implementation FenixDependencies.mozilla_support_base
implementation FenixDependencies.mozilla_support_rusterrors
implementation FenixDependencies.mozilla_support_images
implementation FenixDependencies.mozilla_support_ktx
implementation FenixDependencies.mozilla_support_rustlog
implementation FenixDependencies.mozilla_support_utils
implementation FenixDependencies.mozilla_support_locale
implementation FenixDependencies.mozilla_ui_colors
implementation FenixDependencies.mozilla_ui_icons
implementation FenixDependencies.mozilla_lib_publicsuffixlist
implementation FenixDependencies.mozilla_ui_widgets
implementation FenixDependencies.mozilla_ui_tabcounter
implementation FenixDependencies.mozilla_lib_crash
implementation FenixDependencies.lib_crash_sentry
implementation FenixDependencies.mozilla_lib_push_firebase
implementation FenixDependencies.mozilla_lib_state
implementation FenixDependencies.mozilla_lib_dataprotect
implementation project(':compose-awesomebar')
implementation project(':compose-cfr')
implementation project(':concept-awesomebar')
implementation project(':concept-base')
implementation project(':concept-engine')
implementation project(':concept-menu')
implementation project(':concept-push')
implementation project(':concept-storage')
implementation project(':concept-sync')
implementation project(':concept-toolbar')
implementation project(':concept-tabstray')
implementation project(':browser-domains')
implementation project(':browser-icons')
implementation project(':browser-menu')
implementation project(':browser-menu2')
implementation project(':browser-session-storage')
implementation project(':browser-state')
implementation project(':browser-storage-sync')
implementation project(':browser-tabstray')
implementation project(':browser-thumbnails')
implementation project(':browser-toolbar')
implementation project(':feature-addons')
implementation project(':feature-accounts')
implementation project(':feature-app-links')
implementation project(':feature-autofill')
implementation project(':feature-awesomebar')
implementation project(':feature-contextmenu')
implementation project(':feature-customtabs')
implementation project(':feature-downloads')
implementation project(':feature-intent')
implementation project(':feature-media')
implementation project(':feature-prompts')
implementation project(':feature-push')
implementation project(':feature-privatemode')
implementation project(':feature-pwa')
implementation project(':feature-qr')
implementation project(':feature-search')
implementation project(':feature-session')
implementation project(':feature-syncedtabs')
implementation project(':feature-toolbar')
implementation project(':feature-tabs')
implementation project(':feature-findinpage')
implementation project(':feature-logins')
implementation project(':feature-sitepermissions')
implementation project(':feature-readerview')
implementation project(':feature-tab-collections')
implementation project(':feature-recentlyclosed')
implementation project(':feature-top-sites')
implementation project(':feature-share')
implementation project(':feature-accounts-push')
implementation project(':feature-webauthn')
implementation project(':feature-webcompat')
implementation project(':feature-webnotifications')
implementation project(':feature-webcompat-reporter')
implementation project(':service-pocket')
implementation project(':service-contile')
implementation project(':service-digitalassetlinks')
implementation project(':service-sync-autofill')
implementation project(':service-sync-logins')
implementation project(':service-firefox-accounts')
implementation project(':service-glean')
implementation project(':service-location')
implementation project(':service-nimbus')
implementation project(':support-webextensions')
implementation project(':support-base')
implementation project(':support-rusterrors')
implementation project(':support-images')
implementation project(':support-ktx')
implementation project(':support-rustlog')
implementation project(':support-utils')
implementation project(':support-locale')
implementation project(':ui-colors')
implementation project(':ui-icons')
implementation project(':lib-publicsuffixlist')
implementation project(':ui-widgets')
implementation project(':ui-tabcounter')
implementation project(':lib-crash')
implementation project(':lib-crash-sentry')
implementation project(':lib-push-firebase')
implementation project(':lib-state')
implementation project(':lib-dataprotect')
debugImplementation FenixDependencies.leakcanary
implementation FenixDependencies.androidx_annotation
@ -649,8 +650,8 @@ dependencies {
androidTestImplementation FenixDependencies.androidx_work_testing
androidTestImplementation FenixDependencies.androidx_benchmark_junit4
androidTestImplementation FenixDependencies.mockwebserver
testImplementation FenixDependencies.mozilla_support_test
testImplementation FenixDependencies.mozilla_support_test_libstate
testImplementation project(':support-test')
testImplementation project(':support-test-libstate')
testImplementation FenixDependencies.androidx_junit
testImplementation FenixDependencies.androidx_test_extensions
testImplementation FenixDependencies.androidx_work_testing
@ -659,7 +660,7 @@ dependencies {
}
testImplementation 'org.apache.maven:maven-ant-tasks:2.1.3'
implementation FenixDependencies.mozilla_support_rusthttp
implementation project(':support-rusthttp')
androidTestImplementation FenixDependencies.mockk_android
testImplementation FenixDependencies.mockk
@ -872,26 +873,6 @@ if (gradle.hasProperty('localProperties.autoPublish.glean.dir')) {
apply from: "../${gleanSrcDir}/build-scripts/substitute-local-glean.gradle"
}
// Define a reusable task for updating the versions of our built-in web extensions. We automate this
// to make sure we never forget to update the version, either in local development or for releases.
// In both cases, we want to make sure the latest version of all extensions (including their latest
// changes) are installed on first start-up.
// We're using the A-C version here as we want to uplift all built-in extensions to A-C (Once that's
// done we can also remove the task below):
// https://github.com/mozilla-mobile/android-components/issues/7249
ext.updateExtensionVersion = { task, extDir ->
configure(task) {
from extDir
include 'manifest.template.json'
rename { 'manifest.json' }
into extDir
def values = ['version': AndroidComponents.VERSION + "." + new Date().format('MMddHHmmss')]
inputs.properties(values)
expand(values)
}
}
android.applicationVariants.all { variant ->
tasks.register("apkSize${variant.name.capitalize()}", ApkSizeTask) {
variantName = variant.name
@ -901,4 +882,4 @@ android.applicationVariants.all { variant ->
}
// Enable expiration by major version.
ext.gleanExpireByVersion = Config.majorVersion(project)
ext.gleanExpireByVersion = Config.majorVersion()

@ -100,9 +100,6 @@ class AboutFragment : Fragment(), AboutPageListener {
requireContext().packageManager.getPackageInfoCompat(requireContext().packageName, 0)
val versionCode = PackageInfoCompat.getLongVersionCode(packageInfo).toString()
val maybeFenixGitHash = if (BuildConfig.GIT_HASH.isNotBlank()) ", ${BuildConfig.GIT_HASH}" else ""
val componentsAbbreviation = getString(R.string.components_abbreviation)
val componentsVersion =
mozilla.components.Build.version + ", " + mozilla.components.Build.gitHash
val maybeGecko = getString(R.string.gecko_view_abbreviation)
val geckoVersion =
GeckoViewBuildConfig.MOZ_APP_VERSION + "-" + GeckoViewBuildConfig.MOZ_APP_BUILDID
@ -110,12 +107,10 @@ class AboutFragment : Fragment(), AboutPageListener {
val appServicesVersion = mozilla.components.Build.applicationServicesVersion
String.format(
"%s (Build #%s)%s\n%s: %s\n%s: %s\n%s: %s",
"%s (Build #%s)%s\n%s: %s\n%s: %s",
packageInfo.versionName,
versionCode,
maybeFenixGitHash,
componentsAbbreviation,
componentsVersion,
maybeGecko,
geckoVersion,
appServicesAbbreviation,

@ -22,8 +22,6 @@
<string name="default_top_site_wikipedia" translatable="false">Wikipedia</string>
<!-- Default title for pinned Google top site that links to Google home page -->
<string name="default_top_site_google" translatable="false">Google</string>
<!-- Android Components abbreviation used in AboutFragment -->
<string name="components_abbreviation" translatable="false">AC</string>
<!-- Application Services abbreviation used in AboutFragment -->
<string name="app_services_abbreviation" translatable="false">AS</string>
<!-- Name for the Pocket product -->

@ -53,7 +53,6 @@ buildscript {
excludeGroupByRegex RepoMatching.mozilla
excludeGroupByRegex RepoMatching.androidx
excludeGroupByRegex RepoMatching.comAndroid
excludeGroupByRegex RepoMatching.comGoogle
}
}
}
@ -65,9 +64,21 @@ buildscript {
classpath FenixDependencies.tools_benchmarkgradle
classpath FenixDependencies.androidx_safeargs
classpath FenixDependencies.osslicenses_plugin
classpath "org.mozilla.components:tooling-glean-gradle:${FenixVersions.mozilla_android_components}"
classpath "org.mozilla.components:tooling-nimbus-gradle:${FenixVersions.mozilla_android_components}"
classpath "org.mozilla.telemetry:glean-gradle-plugin:${Versions.mozilla_glean}"
// NOTE: The Nimbus plugin needs to be refactored into a top-level plugin
// and consumed via includeBuild (using composite builds). This is a short-term
// workaround to consume the latest version of the Nimbus plugin matching the Focus version.
if (Config.readVersionFromFile().contains("a")) {
// Use the latest version of the plugin on the main branch (nightly).
classpath("org.mozilla.components:tooling-nimbus-gradle:latest.release")
} else {
// Use the latest version matching the major version of the branch (beta/release).
classpath("org.mozilla.components:tooling-nimbus-gradle") {
version {
strictly("${Config.majorVersion()}.+")
}
}
}
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
@ -129,7 +140,6 @@ allprojects {
excludeGroupByRegex RepoMatching.mozilla
excludeGroupByRegex RepoMatching.androidx
excludeGroupByRegex RepoMatching.comAndroid
excludeGroupByRegex RepoMatching.comGoogle
}
}
}
@ -144,6 +154,25 @@ allprojects {
}
}
subprojects {
// Define a reusable task for updating the version in manifest.json for modules that package
// a web extension. We automate this to make sure we never forget to update the version, either
// in local development or for releases. In both cases, we want to make sure the latest version
// of all extensions (including their latest changes) are installed on first start-up.
ext.updateExtensionVersion = { task, extDir ->
configure(task) {
from extDir
include 'manifest.template.json'
rename { 'manifest.json' }
into extDir
def values = ['version': rootProject.ext.config.componentsVersion.split("a|b")[0] + "." + new Date().format('MMddHHmmss')]
inputs.properties(values)
expand(values)
}
}
}
tasks.register('clean', Delete) {
delete rootProject.buildDir
}

@ -4,6 +4,7 @@
import org.gradle.api.Project
import org.mozilla.fenix.gradle.ext.execReadStandardOutOrThrow
import java.io.File
import java.text.SimpleDateFormat
import java.time.LocalDateTime
import java.util.Date
@ -36,22 +37,18 @@ object Config {
@JvmStatic
fun nightlyVersionName(): String {
// Nightly versions use the Gecko/A-C major version and append "0.a1", e.g. with A-C 90.0.20210426143115
// the Nightly version will be 90.0a1
val majorVersion = AndroidComponents.VERSION.split(".")[0]
return "$majorVersion.0a1"
// Nightly versions will use the version from "version.txt".
return readVersionFromFile()
}
@JvmStatic
fun majorVersion(project: Project): String {
val releaseVersion = releaseVersionName(project)
val version = if (releaseVersion.isBlank()) {
nightlyVersionName()
} else {
releaseVersion
}
fun majorVersion(): String {
return readVersionFromFile().split(".")[0]
}
return version.split(".")[0]
@JvmStatic
fun readVersionFromFile(): String {
return File("../version.txt").useLines { it.firstOrNull() ?: "" }
}
/**

@ -43,8 +43,6 @@ object FenixVersions {
const val accompanist_drawablepainter = "0.23.1"
const val accompanist_insets = "0.23.1"
const val mozilla_android_components = AndroidComponents.VERSION
const val adjust = "4.33.0"
const val installreferrer = "2.2"
@ -76,108 +74,6 @@ object FenixDependencies {
const val osslicenses_plugin = "com.google.android.gms:oss-licenses-plugin:${FenixVersions.osslicenses_plugin}"
const val mozilla_compose_awesomebar = "org.mozilla.components:compose-awesomebar:${FenixVersions.mozilla_android_components}"
const val mozilla_compose_cfr = "org.mozilla.components:compose-cfr:${FenixVersions.mozilla_android_components}"
const val mozilla_concept_awesomebar = "org.mozilla.components:concept-awesomebar:${FenixVersions.mozilla_android_components}"
const val mozilla_concept_base = "org.mozilla.components:concept-base:${FenixVersions.mozilla_android_components}"
const val mozilla_concept_engine = "org.mozilla.components:concept-engine:${FenixVersions.mozilla_android_components}"
const val mozilla_concept_menu = "org.mozilla.components:concept-menu:${FenixVersions.mozilla_android_components}"
const val mozilla_concept_push = "org.mozilla.components:concept-push:${FenixVersions.mozilla_android_components}"
const val mozilla_concept_tabstray = "org.mozilla.components:concept-tabstray:${FenixVersions.mozilla_android_components}"
const val mozilla_concept_toolbar = "org.mozilla.components:concept-toolbar:${FenixVersions.mozilla_android_components}"
const val mozilla_concept_storage = "org.mozilla.components:concept-storage:${FenixVersions.mozilla_android_components}"
const val mozilla_concept_sync = "org.mozilla.components:concept-sync:${FenixVersions.mozilla_android_components}"
const val mozilla_browser_engine_gecko = "org.mozilla.components:browser-engine-gecko:${FenixVersions.mozilla_android_components}"
const val mozilla_browser_domains = "org.mozilla.components:browser-domains:${FenixVersions.mozilla_android_components}"
const val mozilla_browser_icons = "org.mozilla.components:browser-icons:${FenixVersions.mozilla_android_components}"
const val mozilla_browser_session_storage = "org.mozilla.components:browser-session-storage:${FenixVersions.mozilla_android_components}"
const val mozilla_browser_state = "org.mozilla.components:browser-state:${FenixVersions.mozilla_android_components}"
const val mozilla_browser_tabstray = "org.mozilla.components:browser-tabstray:${FenixVersions.mozilla_android_components}"
const val mozilla_browser_thumbnails = "org.mozilla.components:browser-thumbnails:${FenixVersions.mozilla_android_components}"
const val mozilla_browser_toolbar = "org.mozilla.components:browser-toolbar:${FenixVersions.mozilla_android_components}"
const val mozilla_browser_menu = "org.mozilla.components:browser-menu:${FenixVersions.mozilla_android_components}"
const val mozilla_browser_menu2 = "org.mozilla.components:browser-menu2:${FenixVersions.mozilla_android_components}"
const val mozilla_browser_errorpages = "org.mozilla.components:browser-errorpages:${FenixVersions.mozilla_android_components}"
const val mozilla_browser_storage_sync = "org.mozilla.components:browser-storage-sync:${FenixVersions.mozilla_android_components}"
const val mozilla_feature_addons = "org.mozilla.components:feature-addons:${FenixVersions.mozilla_android_components}"
const val mozilla_support_extensions = "org.mozilla.components:support-webextensions:${FenixVersions.mozilla_android_components}"
const val mozilla_feature_accounts = "org.mozilla.components:feature-accounts:${FenixVersions.mozilla_android_components}"
const val mozilla_feature_app_links = "org.mozilla.components:feature-app-links:${FenixVersions.mozilla_android_components}"
const val mozilla_feature_autofill = "org.mozilla.components:feature-autofill:${FenixVersions.mozilla_android_components}"
const val mozilla_feature_awesomebar = "org.mozilla.components:feature-awesomebar:${FenixVersions.mozilla_android_components}"
const val mozilla_feature_contextmenu = "org.mozilla.components:feature-contextmenu:${FenixVersions.mozilla_android_components}"
const val mozilla_feature_customtabs = "org.mozilla.components:feature-customtabs:${FenixVersions.mozilla_android_components}"
const val mozilla_feature_intent = "org.mozilla.components:feature-intent:${FenixVersions.mozilla_android_components}"
const val mozilla_feature_media = "org.mozilla.components:feature-media:${FenixVersions.mozilla_android_components}"
const val mozilla_feature_qr = "org.mozilla.components:feature-qr:${FenixVersions.mozilla_android_components}"
const val mozilla_feature_search = "org.mozilla.components:feature-search:${FenixVersions.mozilla_android_components}"
const val mozilla_feature_session = "org.mozilla.components:feature-session:${FenixVersions.mozilla_android_components}"
const val mozilla_feature_syncedtabs = "org.mozilla.components:feature-syncedtabs:${FenixVersions.mozilla_android_components}"
const val mozilla_feature_tabs = "org.mozilla.components:feature-tabs:${FenixVersions.mozilla_android_components}"
const val mozilla_feature_downloads = "org.mozilla.components:feature-downloads:${FenixVersions.mozilla_android_components}"
const val mozilla_feature_storage = "org.mozilla.components:feature-storage:${FenixVersions.mozilla_android_components}"
const val mozilla_feature_prompts = "org.mozilla.components:feature-prompts:${FenixVersions.mozilla_android_components}"
const val mozilla_feature_push = "org.mozilla.components:feature-push:${FenixVersions.mozilla_android_components}"
const val mozilla_feature_privatemode = "org.mozilla.components:feature-privatemode:${FenixVersions.mozilla_android_components}"
const val mozilla_feature_pwa = "org.mozilla.components:feature-pwa:${FenixVersions.mozilla_android_components}"
const val mozilla_feature_toolbar = "org.mozilla.components:feature-toolbar:${FenixVersions.mozilla_android_components}"
const val mozilla_feature_findinpage = "org.mozilla.components:feature-findinpage:${FenixVersions.mozilla_android_components}"
const val mozilla_feature_logins = "org.mozilla.components:feature-logins:${FenixVersions.mozilla_android_components}"
const val mozilla_feature_site_permissions = "org.mozilla.components:feature-sitepermissions:${FenixVersions.mozilla_android_components}"
const val mozilla_feature_readerview = "org.mozilla.components:feature-readerview:${FenixVersions.mozilla_android_components}"
const val mozilla_feature_tab_collections = "org.mozilla.components:feature-tab-collections:${FenixVersions.mozilla_android_components}"
const val mozilla_feature_recentlyclosed = "org.mozilla.components:feature-recentlyclosed:${FenixVersions.mozilla_android_components}"
const val mozilla_feature_accounts_push = "org.mozilla.components:feature-accounts-push:${FenixVersions.mozilla_android_components}"
const val mozilla_feature_top_sites = "org.mozilla.components:feature-top-sites:${FenixVersions.mozilla_android_components}"
const val mozilla_feature_share = "org.mozilla.components:feature-share:${FenixVersions.mozilla_android_components}"
const val mozilla_feature_webauthn = "org.mozilla.components:feature-webauthn:${FenixVersions.mozilla_android_components}"
const val mozilla_feature_webcompat = "org.mozilla.components:feature-webcompat:${FenixVersions.mozilla_android_components}"
const val mozilla_feature_webnotifications = "org.mozilla.components:feature-webnotifications:${FenixVersions.mozilla_android_components}"
const val mozilla_feature_webcompat_reporter = "org.mozilla.components:feature-webcompat-reporter:${FenixVersions.mozilla_android_components}"
const val mozilla_service_pocket = "org.mozilla.components:service-pocket:${FenixVersions.mozilla_android_components}"
const val mozilla_service_contile =
"org.mozilla.components:service-contile:${FenixVersions.mozilla_android_components}"
const val mozilla_service_digitalassetlinks =
"org.mozilla.components:service-digitalassetlinks:${FenixVersions.mozilla_android_components}"
const val mozilla_service_sync_autofill =
"org.mozilla.components:service-sync-autofill:${FenixVersions.mozilla_android_components}"
const val mozilla_service_sync_logins =
"org.mozilla.components:service-sync-logins:${FenixVersions.mozilla_android_components}"
const val mozilla_service_firefox_accounts = "org.mozilla.components:service-firefox-accounts:${FenixVersions.mozilla_android_components}"
const val mozilla_service_glean = "org.mozilla.components:service-glean:${FenixVersions.mozilla_android_components}"
const val mozilla_service_location = "org.mozilla.components:service-location:${FenixVersions.mozilla_android_components}"
const val mozilla_service_nimbus = "org.mozilla.components:service-nimbus:${FenixVersions.mozilla_android_components}"
const val mozilla_ui_colors = "org.mozilla.components:ui-colors:${FenixVersions.mozilla_android_components}"
const val mozilla_ui_icons = "org.mozilla.components:ui-icons:${FenixVersions.mozilla_android_components}"
const val mozilla_ui_widgets = "org.mozilla.components:ui-widgets:${FenixVersions.mozilla_android_components}"
const val mozilla_ui_tabcounter = "org.mozilla.components:ui-tabcounter:${FenixVersions.mozilla_android_components}"
const val mozilla_lib_crash = "org.mozilla.components:lib-crash:${FenixVersions.mozilla_android_components}"
const val lib_crash_sentry =
"org.mozilla.components:lib-crash-sentry:${FenixVersions.mozilla_android_components}"
const val mozilla_lib_push_firebase = "org.mozilla.components:lib-push-firebase:${FenixVersions.mozilla_android_components}"
const val mozilla_lib_dataprotect = "org.mozilla.components:lib-dataprotect:${FenixVersions.mozilla_android_components}"
const val mozilla_lib_state = "org.mozilla.components:lib-state:${FenixVersions.mozilla_android_components}"
const val mozilla_lib_publicsuffixlist = "org.mozilla.components:lib-publicsuffixlist:${FenixVersions.mozilla_android_components}"
const val mozilla_support_base = "org.mozilla.components:support-base:${FenixVersions.mozilla_android_components}"
const val mozilla_support_rusterrors = "org.mozilla.components:support-rusterrors:${FenixVersions.mozilla_android_components}"
const val mozilla_support_images = "org.mozilla.components:support-images:${FenixVersions.mozilla_android_components}"
const val mozilla_support_ktx = "org.mozilla.components:support-ktx:${FenixVersions.mozilla_android_components}"
const val mozilla_support_rusthttp = "org.mozilla.components:support-rusthttp:${FenixVersions.mozilla_android_components}"
const val mozilla_support_rustlog = "org.mozilla.components:support-rustlog:${FenixVersions.mozilla_android_components}"
const val mozilla_support_utils = "org.mozilla.components:support-utils:${FenixVersions.mozilla_android_components}"
const val mozilla_support_test = "org.mozilla.components:support-test:${FenixVersions.mozilla_android_components}"
const val mozilla_support_test_libstate = "org.mozilla.components:support-test-libstate:${FenixVersions.mozilla_android_components}"
const val mozilla_support_locale = "org.mozilla.components:support-locale:${FenixVersions.mozilla_android_components}"
const val sentry = "io.sentry:sentry-android:${FenixVersions.sentry}"
const val leakcanary = "com.squareup.leakcanary:leakcanary-android-core:${FenixVersions.leakcanary}"

@ -10,7 +10,7 @@ org.gradle.jvmargs=-Xmx7g -Xms2g -XX:MaxMetaspaceSize=6g
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
org.gradle.parallel=true
#org.gradle.parallel=true
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official
android.useAndroidX=true
@ -18,3 +18,8 @@ android.enableJetifier=false
# Enables copying of Jetpack Benchmark results from the device to the build directory.
android.enableAdditionalTestOutput=true
libUrl=https://github.com/mozilla-mobile/firefox-android/tree/main/fenix
libVcsUrl=https://github.com/mozilla-mobile/firefox-android.git
libLicense=MPL-2.0
libLicenseUrl=https://www.mozilla.org/en-US/MPL/2.0/

@ -1,7 +1,114 @@
include ':app'
/* 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 org.yaml.snakeyaml.Yaml
pluginManagement {
includeBuild("../android-components/plugins/publicsuffixlist")
includeBuild("../android-components/plugins/dependencies")
}
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'org.yaml:snakeyaml:1.33'
}
}
plugins {
id 'mozac.DependenciesPlugin'
}
include ':app'
include ':mozilla-detekt-rules'
include ':mozilla-lint-rules'
// Synchronized library configuration for all modules
// This "componentsVersion" number is defined in "version.txt" and should follow
// semantic versioning (MAJOR.MINOR.PATCH). See https://semver.org/
class Config {
public final String componentsVersion
public final String componentsGroupId
public final Integer compileSdkVersion
public final Integer minSdkVersion
public final Integer targetSdkVersion
Config(
String componentsVersion,
String componentsGroupId,
Integer compileSdkVersion,
Integer minSdkVersion,
Integer targetSdkVersion
) {
this.componentsVersion = componentsVersion
this.componentsGroupId = componentsGroupId
this.compileSdkVersion = compileSdkVersion
this.minSdkVersion = minSdkVersion
this.targetSdkVersion = targetSdkVersion
}
}
def setupProject(name, path, description) {
settings.include(":$name")
project(":$name").projectDir = new File(rootDir, "../android-components/${path}")
// project(...) gives us a skeleton project that we can't set ext.* on
gradle.beforeProject { project ->
// However, the "afterProject" listener iterates over every project and gives us the actual project
// So, once we filter for the project we care about, we can set whatever we want
if (project.name == name) {
project.ext.description = description
}
}
}
def yaml = new Yaml()
def buildconfig = yaml.load(new File(rootDir, '../android-components/.buildconfig.yml').newInputStream())
buildconfig.projects.each { project ->
if (!project.key.startsWith("samples")) {
setupProject(project.key, project.value.path, project.value.description)
}
}
gradle.projectsLoaded { ->
def componentsVersion = new File(rootDir, '../version.txt').text.stripTrailing()
def configData = yaml.load(new File(rootDir, '../android-components/.config.yml').newInputStream())
// Wait until root project is "loaded" before we set "config"
// Note that since this is set on "rootProject.ext", it will be "in scope" during the evaluation of all projects'
// gradle files. This means that they can just access "config.<value>", and it'll function properly
gradle.rootProject.ext.config = new Config(
componentsVersion,
configData.componentsGroupId,
configData.compileSdkVersion,
configData.minSdkVersion,
configData.targetSdkVersion
)
gradle.rootProject.ext.buildConfig = buildconfig
// Disables A-C tests and lint when building Fenix.
gradle.allprojects { project ->
if (project.projectDir.absolutePath.contains("/android-components/")) {
project.tasks.withType(Test) {
enabled = false
}
project.tasks.whenTaskAdded { task ->
if (task.name.contains("lint")) {
task.enabled = false
}
}
}
}
}
def log(message) {
logger.lifecycle("[settings] ${message}")
}

@ -1 +0,0 @@
112.0b1
Loading…
Cancel
Save