Commit Graph

261 Commits

Author SHA1 Message Date
Aaditya Dhingra
956ef89fa9 Bug 1924520 - Configuration cache part 2. r=geckoview-reviewers,android-reviewers,nalexander,owlish,ohall
Differential Revision: https://phabricator.services.mozilla.com/D236898
2025-03-04 22:00:42 +00:00
Cristian Tuns
0b7c7fb4a9 Backed out 2 changesets (bug 1924520) partial backout for as requested by Aaditya Dhingra. CLOSED TREE
Backed out changeset 17764af0218a (bug 1924520)
Backed out changeset 4447d8955f60 (bug 1924520)
2025-03-03 14:12:45 -05:00
Aaditya Dhingra
5f9d749a96 Bug 1949260 - Part 2 - Replace DependenciesPlugin with gradle version catalog. r=geckoview-reviewers,android-reviewers,webcompat-reviewers,nalexander,twisniewski,owlish,jonalmeida,tthibaud
Differential Revision: https://phabricator.services.mozilla.com/D238804
2025-03-03 17:12:25 +00:00
Aaditya Dhingra
4b66f5b8c8 Bug 1924520 - Configuration cache part 2. r=geckoview-reviewers,android-reviewers,nalexander,owlish,ohall
Differential Revision: https://phabricator.services.mozilla.com/D236898
2025-03-03 14:03:49 +00:00
Aaditya Dhingra
a99c12afb4 Bug 1949260 - Part 1 - Replace FenixDependenciesPlugin with gradle version catalog r=android-reviewers,nalexander,jonalmeida
Differential Revision: https://phabricator.services.mozilla.com/D238809
2025-02-26 00:17:11 +00:00
Aaditya Dhingra
b849c61227 Bug 1926814 - Generate a report for ktlintFormat and allow linters to be run from other subdirectories. r=nalexander,android-reviewers,ohall
Generate and read ktlintFormat report instead of ktlint when running `./mach lint -l android-{fenix|focus|ac} --fix}` to accurately report the existing errors/warnings

Also fixes the issue where running AC linter from fenix directory would immediately output ✖ 0 problems (0 errors, 0 warnings, 0 fixed) without running the linter but the linter would run normally if run from root folder or AC subdirectory

Differential Revision: https://phabricator.services.mozilla.com/D226850
2024-11-08 16:49:33 +00:00
Ryan VanderMeulen
006588bb90 Bug 1918798 - Block MockK from being used in AC projects. r=android-reviewers,petru
Differential Revision: https://phabricator.services.mozilla.com/D223055
2024-10-03 21:52:45 +00:00
Ryan VanderMeulen
6e0aea5474 Bug 1921380 - Regenerate detekt baselines. r=android-reviewers,frontend-codestyle-reviewers,jonalmeida
Differential Revision: https://phabricator.services.mozilla.com/D223895
2024-10-03 21:52:14 +00:00
Ryan VanderMeulen
dedac2cf02 Bug 1918289 - Switch AC & GV from junit4 to junit-vintage. r=android-reviewers,mcarare
Differential Revision: https://phabricator.services.mozilla.com/D221905
2024-09-12 12:36:21 +00:00
Nicolas Guichard
fedc3a99e9 Bug 1906365 - Enforce buildToolsVersion in AC/Fenix/Focus. r=nalexander,android-reviewers,ohall
This forces Gradle to use the buildToolsVersion we package in the
Android toolchain, and is required for offline building.

Differential Revision: https://phabricator.services.mozilla.com/D220860
2024-09-09 17:33:49 +00:00
Aaditya Dhingra
23852855b8 Bug 1907129 - Report line and column in the link to error when ran locally. r=gl,android-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D219806
2024-08-27 18:26:12 +00:00
Aaditya Dhingra
7b51be44e1 Bug 1907129 - Modify linters to run ./gradlew ktlint detekt on Fenix and AC. r=android-reviewers,nalexander,gl,pollymce
Differential Revision: https://phabricator.services.mozilla.com/D216999
2024-08-19 15:22:48 +00:00
Joe Iya
cd02e28a19 Bug 1901589 - Remove list_compatible_dependency_versions.py along with its test and references. r=jonalmeida,android-reviewers
This script was used to build Fenix with local Android Components or Android Components with a local GeckoView library. It is no longer needed in mozilla-central.

Differential Revision: https://phabricator.services.mozilla.com/D216112
2024-07-23 18:09:05 +00:00
Lina Butler
434173835a Bug 1895781 - Restore project-specific local.properties for Fenix and Focus. r=nalexander
This commit partially reverts the changes in bug 1888422, to fix an
issue where the contents of `mobile/android/{project}/local.properties`
wouldn't be loaded into `gradle.ext` properties. This broke the ability
to set project-specific properties like `autosignReleaseWithDebugKey`,
`debuggable`, `nimbus`, `glean`, `official`, `mozillaOnline`, etc.

This commit also reverts moving the GeckoView substitution logic into
`shared-settings.gradle`, because it's only needed for Android
Components and Fenix.

Differential Revision: https://phabricator.services.mozilla.com/D209895
2024-05-10 06:21:28 +00:00
Cristian Tuns
fc93d93894 Backed out 3 changesets (bug 1895781) for causing gradle-dependencies failures CLOSED TREE
Backed out changeset eccc129ad554 (bug 1895781)
Backed out changeset 2ffa0d4d2326 (bug 1895781)
Backed out changeset 278306033d92 (bug 1895781)
2024-05-09 19:26:48 -04:00
Lina Butler
499d63238b Bug 1895781 - Restore project-specific local.properties for Fenix and Focus. r=nalexander
This commit partially reverts the changes in bug 1888422, to fix an
issue where the contents of `mobile/android/{project}/local.properties`
wouldn't be loaded into `gradle.ext` properties. This broke the ability
to set project-specific properties like `autosignReleaseWithDebugKey`,
`debuggable`, `nimbus`, `glean`, `official`, `mozillaOnline`, etc.

This commit also reverts moving the GeckoView substitution logic into
`shared-settings.gradle`, because it's only needed for Android
Components and Fenix.

Depends on D209826

Differential Revision: https://phabricator.services.mozilla.com/D209895
2024-05-09 22:48:17 +00:00
Lina Butler
d0e5712a41 Bug 1888422 - get local-publish flows for app-services and glean working. r=janerik,markh,nalexander
This commit restores the ability to build the Android projects with a
local checkouts of Application Services and Glean. To do so:

1. Create a `local.properties` file in the top source directory
  (that is, your checkout of m-c).
2. Add the `autoPublish.application-services.dir` property with the
  path to your checkout of Application Services, and/or
  `autoPublish.glean.dir` with the path to your checkout of Glean.

Both paths must be relative to the top source directory.

The local publish flow works when building from the top source
directory with `./mach build` or Android Studio, and when building
Android Components, Fenix, or Focus from their respective
project directories with Android Studio or `./gradlew`.

Original patch by: Mark Hammond <mhammond@skippinet.com.au>

Differential Revision: https://phabricator.services.mozilla.com/D206066
2024-04-26 00:36:59 +00:00
Geoff Brown
380a6f69d9 Bug 1882087 - Format build failure messages for treeherder. r=tthibaud,android-reviewers
Co-authored with @tthibaud : We have borrowed from geckoview's reformatting of gradle errors and warnings: https://searchfox.org/mozilla-central/rev/b189986e26a92f749462094e7869771c1a6607c0/mobile/android/geckoview/build.gradle#165-202
...with adaptations as needed for A-C, Focus, and Fenix.

Example: https://treeherder.mozilla.org/jobs?repo=try&revision=221a0bc4bd8040e179735213e49a618fb83bf827

Differential Revision: https://phabricator.services.mozilla.com/D204425
2024-03-12 21:03:49 +00:00
Geoff Brown
2e6fdc8e83 Bug 1882087 - Format test failure messages for treeherder. r=tthibaud,android-reviewers
There was existing logging for A-C and Fenix to write messages to the test log; that's copied over to Focus now too.

Changing "FAILURE" to "TEST-UNEXPECTED-FAIL" surfaces failure messages in treeherder and logviewer.

Here's an example:
https://treeherder.mozilla.org/logviewer?job_id=450129492&repo=oak&lineNumber=2117

Differential Revision: https://phabricator.services.mozilla.com/D204206
2024-03-08 21:43:55 +00:00
Julien Cristau
472f2b6bda Bug 1877692 - get GeckoView from ${objdir}/gradle/maven in local builds. r=gl,amejiamarmol,geckoview-reviewers
This means fenix/a-c/focus can pick up right after `./mach build` and
find geckoview.

Differential Revision: https://phabricator.services.mozilla.com/D201526
2024-01-25 10:28:04 +01:00
Gabriel Luong
6853195d49 Bug 1876335 - use GRADLE_MAVEN_REPOSITORIES in more places. r=owlish,geckoview-reviewers,nalexander,tthibaud,android-reviewers
To ensure that we can build offline, we need to prevent gradle from
going through remote maven repos directly.

That means also overriding the default plugin repository
(plugins.gradle.org) in the `pluginManagement` section.

Differential Revision: https://phabricator.services.mozilla.com/D201497
2024-01-18 15:38:47 +01:00
Gabriel Luong
9fd9941c03 Bug 1870123 - Remove the GitHubPlugin and GithubDetailsTask. r=owlish,geckoview-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D201490
2023-12-18 12:55:16 -05:00
Gabriel Luong
bfdb3b8746 Bug 1822393 - Consume GeckoView directly in Android Components for CI builds. r=owlish,geckoview-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D201485
2023-12-08 02:35:56 -05:00
Gabriel Luong
7bd816b3f6 Bug 1822393 - Support consuming GeckoView artifact builds from maven local. r=owlish,geckoview-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D201484
2023-12-07 18:08:22 -05:00
Gabriel Luong
09687df494 Bug 1822393 - Support Android Components consuming GeckoView directly. r=nalexander,geckoview-reviewers,tthibaud,android-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D201483
2023-12-07 16:19:43 -05:00
Ryan VanderMeulen
3d59857932 Bug 1882134 - Use jvmToolchain for setting target JVM version 2024-02-27 14:40:20 +00:00
mcarare
60d3978145 Bug 1821005 - Restore reverted Gradle 8 upgrade due to startup crashes"
This reverts commit 592e88b3547d2e96ae04d8b5bd69cbab2ac3e97e.
2023-12-05 03:44:20 +00:00
Ryan VanderMeulen
c65ab071b9 Bug 1821005 - Revert Gradle 8 upgrade due to startup crashes
Revert "Bug 1863744 - Update Gradle to version 8.4"

This reverts commit 829795632954148709fbe945c78d55cc62053ac8.

Revert "Bug 1821005 - Apply additional keep rules for missing classes detected while running R8."

This reverts commit 8f3f246cc5ff571323f56d46963d8d176bec91e3.

Revert "Bug 1821005 - Set UI_INJECTION_HOST mode for lint in test."

This reverts commit 6962bf0b5df57781045f68417f76527bcdf521ab.

Revert "Bug 1821005 -  Include sourcesJar as an input of publishing."

This reverts commit 41b2a48da577787c3189eec8c8af71c35cfecbfb.

Revert "Bug 1821005 - Set compileOptions for android subprojects."

This reverts commit fb21df9d0a9cd585e216733dc1bf929636df20f1.

Revert "Bug 1821005 - Replace deprecated project.buildDir"

This reverts commit 6f880de46ec73f7e5240a0279108bbb6aeb0f63b.

Revert "Bug 1821005 - Exclude generated metrics docs from detekt."

This reverts commit f17d2430bf1daabeed2724312354018050f3f52a.

Revert "Bug 1821005 - Exclude build in extensions versioning from detekt."

This reverts commit 34144c5ad1d62e2d85492f8d32341bbcd032690b.

Revert "Bug 1821005 - Add uses-feature tag for camera permission."

This reverts commit 13c80944bd1756cdcaa98eef783b6a23ad12cabd.

Revert "Bug 1821005 - Set nonTransitiveRClass and nonFinalResIds build flags to false."

This reverts commit 219fbc19c54134ad264edc79642fa1799c6f54d6.

Revert "Bug 1821005 - Apply plugin: 'kotlin-android' for UI modules."

This reverts commit ddbd5e18eb9d2b33b4de4a6df48d97ec4ab42963.

Revert "Bug 1821005 - Enable generation of the BuildConfig class"

This reverts commit 65c2b8c63790fbd2352f3f94b99c80d81d18dae1.

Revert "Bug 1821005 - Add namespace to samples-glean-library module"

This reverts commit 0239233efb1cc4e896e4aa0337e3da911eeb2f1c.

Revert "Bug 1821005 - Replace deprecated toLowerCase with lowercase."

This reverts commit 69f2c66aad3aa638a1bab31b2a1e6c597d1f3992.

Revert "Bug 1821005 - Replace deprecated 'toInt' method with 'code' property."

This reverts commit 7adb38a6fbe20de3fdb6723a10e574d183e7fcff.

Revert "Bug 1821005 - Replace deprecated execResult."

This reverts commit bfd02dd16d7e5c9dbcf34858fbbe4176d698f8cd.

Revert "Bug 1849833 - Replace deprecated extractNativeLibs manifest attribute."

This reverts commit a05bc9618457ab2d71a5d3d88d8d3b0318497a54.

Revert "Bug 1821005 - Upgrade AGP to 8.0.2"

This reverts commit fc0fadd63553e2144ce074454d502ecf307eb988.

Revert "Bug 1821005 - Upgrade kotlin-dsl to 4.1.0."

This reverts commit 14e8903e922fa22e28450520be3b6152be6a3a8f.

Revert "Bug 1821005 - Upgrade Gradle to 8.3 version."

This reverts commit f14f447a4d43588d24e4ca3efde0668ddcf7cf08.
2023-11-08 13:35:38 -05:00
mcarare
3172019bb5 Bug 1821005 - Replace deprecated project.buildDir
This has been replaced by project.layout.buildDirectory.
2023-11-08 09:10:09 +00:00
mcarare
27b0afe3bd Bug 1821005 - Exclude generated metrics docs from detekt. 2023-11-08 09:10:09 +00:00
mcarare
b54ba6d9ba Bug 1821005 - Exclude build in extensions versioning from detekt. 2023-11-08 09:10:09 +00:00
mcarare
2d26e93127 Bug 1849833 - Replace deprecated enabled with required.
See https://docs.gradle.org/7.5/dsl/org.gradle.api.reporting.Report.html#org.gradle.api.reporting.Report:enabled
2023-09-21 13:28:28 +00:00
mcarare
dac60b4262 Bug 1849833 - Replace all with configureEach.
This avoids unnecessary configuration.
2023-09-21 13:28:28 +00:00
mcarare
7c09a4f3ce Bug 1849833 - Replace deprecated kotlinOptions method. 2023-09-21 13:28:28 +00:00
mcarare
11f980f39c Bug 1849833 - Replace qualified name with import. 2023-09-21 13:28:28 +00:00
mcarare
34951bac9d Bug 1847996 - Migrate from kapt to KSP. 2023-09-04 13:48:08 +00:00
Gabriel Luong
385fa9559e Bug 1842904 - Remove unused GitHubPlugin and GitHubClient 2023-07-12 23:24:43 +00:00
mcarare
5c20e337a7 Bug 1802817 - Replace deprecated main with mainClass.
See https://docs.gradle.org/7.6/dsl/org.gradle.api.tasks.JavaExec.html#org.gradle.api.tasks.JavaExec:main.
2023-06-21 14:44:40 +00:00
mcarare
572e93404b Bug 1839578 - Allow ktlintFormat task to modify access java.lang class fields. 2023-06-21 12:37:13 +00:00
mcarare
72f8a6a48b Bug 1831352 - Target Java 17. 2023-06-12 19:40:42 +00:00
Ryan VanderMeulen
ede15003df Bug 1834432 - Remove multidex references from firefox-android 2023-05-24 17:39:36 +00:00
Ryan VanderMeulen
6ea91426a5 Bug 1834775 - Pin Gradle plugin versions in their respective Dependencies files 2023-05-24 16:39:13 +00:00
Gabriel Luong
c053e5dd54 Bug 1805070 - Part 1: Update detekt to v1.22.0 in A-C 2023-05-19 01:22:23 +00:00
Ben Dean-Kawamura
fe1ad0b0e0 Bug 1823462 - New application-services release system
Application services is going to switch to rapid-release / train style
model where:
  - The version numbers correspond to the Fx version (113.x for the
    current nightly cycle).
  - There are nightly builds for the current nightly release (for
    example 113.[timestamp]
  - At the end of the nightly release cycle, there's a release (for
    example 113.0)
  - There may be subsequent releases if changes are uplifted (for
    example 113.1)

- Updated the gradle code to handle the new system.  The application
  services versioning is stored in the version/channel fields of the
  `ApplicationServicesConfig` object.
- Updated the gradle code to fetch packages from the Maven
  nightly/staging repos if needed.
- Updated relbot to 6.1.0.  This is needed to handle the a-s nightly
  version bump.
- Updated creating-a-release-branch docs
2023-04-25 02:13:24 +00:00
Christian Sadilek
64da2e6e03 Bug 1825649 - Introduce shared-settings.gradle to allow reusing build logic 2023-04-03 23:05:55 +00:00
Ryan VanderMeulen
c6908a0347 Bug 1823532 - Remove jnaForTest from project Gradle build files.
Also remove the now-unneeded jna dependency inclusion.
2023-03-21 18:39:45 +00:00
Ryan VanderMeulen
08532594e4 Bug 1820176 - Update AC to ktlint 0.48.2 2023-03-03 20:14:13 +00:00
mcarare
45f919de20 Bug 1802817 - Migrate packagingOptions DSL properties to resources sub-block.
exclude, pickFirst methods are deprecated.
2023-03-02 17:13:09 +00:00
mcarare
1d0b1abd2d Bug 1802817 - Migrate DSL properties from aaptOptions to androidResources.
AaptOptions interface is deprecated and renamed to AndroidResources
2023-03-02 17:13:09 +00:00
mcarare
922b5f6643 Bug 1802817 - Rename AC Dependencies to ComponentsDependencies.
This change is needed in order to avoid clashes with Dependencies class introduced
in Gradle from 7.6 version.
2023-03-02 17:13:09 +00:00