Commit graph

100 commits

Author SHA1 Message Date
Julien Cristau
ea1c17a2ed Bug 1825116 - remove trailing whitespace from ConceptFetchDetector and test. r=jonalmeida,mcarare
Differential Revision: https://phabricator.services.mozilla.com/D202734
2024-02-26 18:16:31 +01:00
Jonathan Almeida
5483ea8599 Bug 1881571 - Add tooling-lint component to Fenix 2024-02-29 20:50:43 +00:00
Ryan VanderMeulen
3d59857932 Bug 1882134 - Use jvmToolchain for setting target JVM version 2024-02-27 14:40:20 +00:00
Jonathan Almeida
0f98a52da7 Bug 1872235 - Fix unit test failures from new lint check 2024-02-20 18:34:24 +00:00
Jonathan Almeida
d41e8939ae Bug 1872235 - Add lint detector for missing Response#close
In bug 1839067, we fixed a multiple cases were streams were
potentially leaking resources. As a follow-up, we are adding a lint
check that now helps to identify possible missing calls to close those
resources.

The implementation is heavily relied on from
[`com.android.tools.lint.checks.CleanupDetector`][0] in the AOSP
project, so little cleanup is done to change the code from it's
original source if we need to reference it later.

Some other references that were quite helpful for this work, were the
[Android Lint API Guide][1] and the examples in the [Data Flow
Analyzer][2].

[0]: https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-checks/src/main/java/com/android/tools/lint/checks/CleanupDetector.kt;l=66;drc=042516205eef87810ffe9f6d51ba40b1edbb15b0
[1]: https://googlesamples.github.io/android-custom-lint-rules/api-guide.html
[2]: https://android.googlesource.com/platform/tools/base/+/HEAD/lint/docs/api-guide/dataflow-analyzer.md.html
2024-02-20 18:34:24 +00:00
Geoff Brown
4be4312d42 Bug 1825116 - Resolve many lint issues found on oak (https://github.com/mozilla-mobile/firefox-android/pull/4551)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2023-11-22 15:17:10 +00:00
mcarare
b26144be8e Bug 1859017 - Use SocketPolicy NO_RESPONSE instead of delay. 2023-10-16 13:39:23 +00:00
mcarare
0860fc8f9a Bug 1859017 - Use extension functions instead of deprecated constructors/methods. 2023-10-16 13:39:23 +00:00
mcarare
063c553913 Bug 1849833 - Replace deprecated compileSdkVersion.
This is replaced by defaultConfig compileSdk.
2023-09-11 06:36:20 +00:00
mcarare
235c47209f Bug 1849833 - Replace deprecated kotlinOptions method. 2023-09-11 06:36:20 +00:00
mcarare
5a7b24763d Bug 1849833 - Replace qualified name with import. 2023-09-11 06:36:20 +00:00
mcarare
bab9549ff3 Bug 1847776 - Reinstate unit tests after Java and Robolectric upgrades. 2023-08-10 17:04:20 +00:00
mcarare
72f8a6a48b Bug 1831352 - Target Java 17. 2023-06-12 19:40:42 +00:00
mcarare
4d40582169 Bug 1796348 - Implement a lint check to avoid calling notify directly.
All attempts to show a notification should be handled through NotificationDelegate.
2023-03-30 15:04:03 -04:00
mcarare
a1bb298784 Bug 1824052 - Set jvmTarget to 11 for KotlinCompile task in tooling-lint. 2023-03-27 23:00:00 +00:00
Gabriel Luong
df654d6e29 Bug 1818826 - Remove Android Component Nimbus gradle plugin wrapper 2023-03-10 04:06:25 +00:00
Ryan VanderMeulen
0e5e70291c Bug 1820233 - Remove unneeded kotlin_stdlib inclusions and re-enable Werror in detekt build.gradle 2023-03-07 00:12:18 +00:00
mcarare
a4a8eadfd2 Bug 1802817 - Set jvmTarget to 11 for Glean and service telemetry. 2023-03-02 17:13:09 +00:00
mcarare
1f589a2e0b Bug 1802817 - Set namespace via DSL in gradle build files.
See https://developer.android.com/studio/build/configure-app-module#set-namespace
and https://issuetracker.google.com/issues/172361895
2023-03-02 17:13:09 +00:00
mcarare
cd1b348c9b Bug 1802817 - Rename DSL object from lintOptions to lint.
DSL object for configuring lint options lintOptions is deprecated.
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
mcarare
0a3ee16557 Bug 1813671 - Target JVM 11 bytecode
See https://developer.android.com/studio/releases/gradle-plugin#jvm-11-bytecode for details.
2023-03-02 17:13:09 +00:00
Christian Sadilek
aa1614db7e Bug 1816754 - Remove A-C Glean Gradle plugin wrapper 2023-02-23 01:35:55 +00:00
Gabriel Luong
d9d783b698 [components] Issue https://github.com/mozilla-mobile/android-components/issues/12939: Address all ktlint issues 2022-10-17 17:07:40 -04:00
Charlie Humphreys
f48b7cbb97 [components] Fix https://github.com/mozilla-mobile/android-components/issues/12902: update publish/build gradle files to use the local property in the build version instead of a runtime-generated timestamp 2022-10-07 15:18:26 +00:00
Charlie Humphreys
431ded469f [components] fixes https://github.com/mozilla-mobile/android-components/issues/11422: add plugin properties for NimbusGradlePlugin and replace appservices token with version
The processResources task copies resources to their target directory and allows them to be processed via various methods built into it. We process the resources for the NimbusGradlePlugin, replacing usages of `@Versions.mozilla_appservices@` with the actual value from the buildSrc generated Versions class. The NimbusGradlePlugin then uses that properties file to retrieve the application services version at runtime without having to have a separate declaration of the version.

https://docs.gradle.org/current/javadoc/org/gradle/language/jvm/tasks/ProcessResources.html
2022-09-20 21:53:28 +00:00
MickeyMoz
a8c2829ba2 [components] Update A-S to 94.2.0. 2022-09-14 14:22:54 +00:00
mcarare
710f4e81fe [components] For https://github.com/mozilla-mobile/android-components/issues/12381: Add mockito and junit dependencies to lint module. 2022-08-31 09:47:47 +00:00
Charlie Humphreys
91398aac4a [components] update NimbusGradlePlugin to use the new generate and generate-experimenter commands 2022-08-23 16:45:15 +00:00
Tarik Eshaq
f52779dfab [components] Upgrades appservices to 94.1.0 2022-08-19 12:35:38 +00:00
jhugman
d906b23b68 [components] Upgrade version of nimbus-fml to 93.8.0 (https://github.com/mozilla-mobile/android-components/pull/12592)
* Upgrade version of AppServices from which we download nimbus-fml.

* Update Dependencies.kt to 94.0.1

* Update NimbusGradlePlugin.groovy to A-S 94.0.1

Co-authored-by: Travis Long <tlong@mozilla.com>
2022-08-10 18:37:55 -04:00
Jonathan Almeida
371df80659 [components] No issue: Update Nimbus plugin to use version 93.6.0
As part of https://github.com/mozilla-mobile/fenix/issues/26041, we need to ensure we have at
least version 93.6.0 of the plugin downloaded. The reason we are not
using a newer version, even though they are available, is to reduce the
complexity of things that go into the next AC release in order to get
the Fenix experiment launched.
2022-08-08 22:10:50 +00:00
Ryan VanderMeulen
ee5eb95bb0 [components] Revert "Upgrade version of AppServices from which we download nimbus-fml."
This reverts commit c3d651c5dc0ccad3652c574b35e7f4c2b1ebb6fa.
2022-08-01 17:48:58 -04:00
James Hugman
d3d394dc4b [components] Upgrade version of AppServices from which we download nimbus-fml. 2022-08-01 20:12:31 +00:00
Ben Dean-Kawamura
e163f82bc2 [components] Dumping app-services to v93.6.0 2022-07-15 19:31:07 +00:00
James Hugman
b62db5d647 [components] Version bump for application-services nimbus-fml 2022-06-26 16:50:41 +00:00
Jan-Erik Rediger
706f1eb240 [components] Use patched Glean Gradle plugin to fix Windows build issues
The plugin has a single small change:
1c9577144a
2022-06-20 16:21:57 +00:00
Tarik Eshaq
2c1e0afc34 [components] Update Application services to 93.1.0 (https://github.com/mozilla-mobile/android-components/pull/12120)
* app-services tabs component constructor now wants a database filename

* Incrment to 93.0.1

* Bumps a-s to 93.1.0

* No issue: Correct changelog entries

Co-authored-by: Mark Hammond <mhammond@skippinet.com.au>
Co-authored-by: James Hugman <james@hugman.tv>
Co-authored-by: Jonathan Almeida <jalmeida@mozilla.com>
2022-05-09 19:21:45 +00:00
Jonathan Almeida
286ccee47c [components] Revert "Application services 93.0.1" (https://github.com/mozilla-mobile/android-components/pull/12100)
* Revert "Incrment to 93.0.1"

This reverts commit 83403d4726846e8047963cf41460aa4a95a64278.

* Revert "app-services tabs component constructor now wants a database filename"

This reverts commit 6484b4b135dbf93cb6f3daea3b43076b984f8a51.
2022-05-04 00:45:06 +00:00
James Hugman
9a8819151e [components] Incrment to 93.0.1 2022-05-03 16:52:56 +00:00
James Hugman
108fb4c611 [components] Increment version of nimbus-fml to v92.0.0
Changelog:

- Papercut fixes for nicer developer experience [#4867](https://github.com/mozilla/application-services/pull/4867)
  - More helpful validation error reporting
  - Better handling of defaults in objects and enum maps
  - More YAML syntactic checking.
- Allow experimenter to output to a YAML file, as well as JSON. [#4874](https://github.com/mozilla/application-services/pull/4874)
  - If the file extension is `yaml`, then output as YAML, otherwise, output as JSON.
2022-03-17 20:37:23 +00:00
Tarik Eshaq
dcc062787a [components] Bumps nimbus fml version to 91.1.0 2022-03-09 12:36:28 +00:00
jhugman
3287fc2cd4 [components] Find nimbus-fml.exe from pre-built binaries (https://github.com/mozilla-mobile/android-components/pull/11658)
* Pick out nimbus-fml.exe of the archive for Windows

* Fixes https://github.com/mozilla-mobile/android-components/issues/11659 Upgrade nimbus-fml version to 94.0.1
2022-02-03 13:18:23 +00:00
James Hugman
b8df516bfe [components] Fixup calling the wrong method in the FML plugin 2022-01-25 19:57:54 +00:00
jhugman
f6f9641183 [components] Fixup FML plugin to work on CI (https://github.com/mozilla-mobile/android-components/pull/11588)
* Add extra OS/arch detection

* Add r-package parameter to command line call to nimbus-fml

* Upgrade plugin to use 90.0.0

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-01-24 19:18:53 +00:00
Grisha Kruglov
c51fac5385 [components] Adds nimbus-fml gradle plugin
Co-authored-by: James Hugman <jhugman@mozilla.com>
2021-12-20 18:17:11 -08:00
shamilovstas
26bf8bf694 [components] Fixed warnings reported by ktlint (formatting) 2021-10-28 12:42:05 +00:00
shamilovstas
3fce0c40e7 [components] Close https://github.com/mozilla-mobile/android-components/issues/9576 - Add custom lint rule that warns if Fact.collect is not called on a newly created Fact instance 2021-10-28 12:42:05 +00:00
Sebastian Kaspari
ce323400dd [components] Run ktlintFormat to fix new ktlint errors. 2021-07-28 12:03:23 +00:00
Sebastian Kaspari
4863bc3b15 [components] Issue https://github.com/mozilla-mobile/android-components/issues/10335: Use Java 11. 2021-07-15 14:57:23 +00:00