Currently CI runs gradlew lint for android projects using build-fat-aar which is not needed now that we can run lint from root project. Current setup also doesn't update mozlint.json so phabricator doesn't recognize the lint failures. This bug adds gradlew lint to mach lint through the android-{fenix|focus|ac} linters in addition of ktlint and detekt which were added in D216999
This patch changes android lint configuration to generate JSON report of errors and then reads these errors in lints.py to report in the same format as other linters.
Creating new treeherder task for each of `android-{fenix|focus|ac}` linter as android-fenix can take up to 20 minutes ot run now with the addition of gradlew lint, which is almost the same as the existing mozlint-android-lints task takes, so doing this in parallel will be nice.
Follow up work would include removing all the original detekt, ktlint and lint tasks from treeherder which will make creating these new tasks more justified.
Differential Revision: https://phabricator.services.mozilla.com/D243832
Upstream semanticdb-kotlinc at github.com/sourcegraph/scip-kotlin does
not support kotlin 2 yet, so we forked the repository and added support
at github.com/mozsearch/semanticdb-kotlinc.
The upstream project originally builds on GitHub Actions and publishes
to Maven Central as com.sourcegraph:semanticdb-kotlinc.
Instead, we currently publish to maven.mozilla.org as
com.github.mozsearch:semanticdb-kotlinc.
Differential Revision: https://phabricator.services.mozilla.com/D245420
For consistency with the rest of the build system, have gradle build folders be
created in TOPOBJDR. Put the logic in shared-settings.gradle and apply it to all
projects. Existing gradle and taskcluster configuration uses the 'gradle/build'
prefix, so continue using that for now.
Only apply this when building top-level for now since a fair bit of automation
of fenix/focus/a-c projects expects build artifacts in the source directory.
Plugins are compiled as "composite builds" so they somewhat exist in their own
world. For simplicity, just manually specify the `buildDir` for each plugin.
Differential Revision: https://phabricator.services.mozilla.com/D240116
For consistency with the rest of the build system, have gradle build folders be
created in TOPOBJDR. Put the logic in shared-settings.gradle and apply it to all
projects. Existing gradle and taskcluster configuration uses the 'gradle/build'
prefix, so continue using that for now.
Only apply this when building top-level for now since a fair bit of automation
of fenix/focus/a-c projects expects build artifacts in the source directory.
Plugins are compiled as "composite builds" so they somewhat exist in their own
world. For simplicity, just manually specify the `buildDir` for each plugin.
Differential Revision: https://phabricator.services.mozilla.com/D240116
For consistency with the rest of the build system, have gradle build folders be
created in TOPOBJDR. Put the logic in shared-settings.gradle and apply it to all
projects. Existing gradle and taskcluster configuration uses the 'gradle/build'
prefix, so continue using that for now.
Only apply this when building top-level for now since a fair bit of automation
of fenix/focus/a-c projects expects build artifacts in the source directory.
Plugins are compiled as "composite builds" so they somewhat exist in their own
world. For simplicity, just manually specify the `buildDir` for each plugin.
Differential Revision: https://phabricator.services.mozilla.com/D240116
Actually, GeckoView's ktlint version is hard coded. But Fenix and AC
define it into `libs.versions.toml`. So we should use same file since we
use same version.
Differential Revision: https://phabricator.services.mozilla.com/D240859
We currently parse `Cargo.lock` for every single Gradle project. This is unnecessary: once is enough. Moreover, this can be a parallelizable and build-cache friendly task. This patch places the task in the :geckoview project, since that's where the version of native Glean is most relevant
Differential Revision: https://phabricator.services.mozilla.com/D234384
Remove 'b[0-9]' from MOZ_APP_VERSION before computing version code.
MOZ_APP_VERSION is "136.0b0" with
"--as-milestone=early-beta". However, computeVersionCode() in
m-c/build.gradle fails to parse it. It supports only "136.0a0" or
alike.
Differential Revision: https://phabricator.services.mozilla.com/D236463
This commit moves toward configuration cache friendly listeners for
build profile markers. In addition, this approach gets events
for (isolated) projects that use `includeBuild`. Gradle is evolving
rapidly in this area; I expect there will be different, more
configuration cache friendly, ways to listen for task evaluation
events in the near future.
Differential Revision: https://phabricator.services.mozilla.com/D230473
This was done for Fenix (bug 1917825) and Focus (bug 1920953),
but Searchfox calls Gradle from the top-level, so apparently we need it
here too.
I would like if we can define it once and it's just used across the
whole tree, but I don't know how.
With this patch `mach android compile-all` at the top-level works.
Differential Revision: https://phabricator.services.mozilla.com/D223759
The resolution of bug 1906365 was incomplete, the buildToolsVersion was
not enforced when building AC, Fenix or Focus from the toplevel Gradle
project.
Differential Revision: https://phabricator.services.mozilla.com/D221845
Delaying the definition of the generateSDKBindings task's arguments
ensures the android.bootClasspath has been populated.
Updating AGP apparently changes the default location of apilint's
apilint-result.json and api.txt, this moves them to a less foreign
location. Unfortunately apilint only seems to use relative paths here.
Differential Revision: https://phabricator.services.mozilla.com/D215654