mcarare
735eb0a612
Bug 1964352 - Enable standard:unnecessary-parentheses-before-trailing-lambda rule and fix errors. r=android-reviewers,nalexander
...
Kotlin style guide: No empty parentheses are needed before trailing lambda.
Differential Revision: https://phabricator.services.mozilla.com/D248510
2025-05-09 13:56:32 +00:00
mcarare
c1b3cedcea
Bug 1947424 - Replace deprecated Thread.id with threadId r=android-reviewers,avirvara
...
Differential Revision: https://phabricator.services.mozilla.com/D241950
2025-04-15 17:17:36 +00:00
Jonathan Almeida
80aeec1aa7
Bug 1872229 - Fix minor lint check failures in android-components r=android-reviewers,mcarare,webcompat-reviewers,twisniewski
...
We have moved more lint checks upstream to AC and these failures are
trivial to solve, rather than try to suppress.
Differential Revision: https://phabricator.services.mozilla.com/D236392
2025-04-11 04:37:30 +00:00
smolnar
aaed8aeb2c
Backed out 2 changesets (bug 1872229) for causing toolchain failures CLOSED TREE
...
Backed out changeset 2fd0c027ec2c (bug 1872229)
Backed out changeset 7efbd8e4381d (bug 1872229)
2025-04-10 03:38:28 +03:00
Jonathan Almeida
9956a54ab3
Bug 1872229 - Fix minor lint check failures in android-components r=android-reviewers,mcarare,webcompat-reviewers,twisniewski
...
We have moved more lint checks upstream to AC and these failures are
trivial to solve, rather than try to suppress.
Differential Revision: https://phabricator.services.mozilla.com/D236392
2025-04-09 22:32:23 +00:00
Ryan VanderMeulen
d4312b4ad4
Bug 1955985 - Remove space-assignment usage in Gradle files. r=geckoview-reviewers,android-reviewers,webcompat-reviewers,twisniewski,adhingra,ohall
...
Differential Revision: https://phabricator.services.mozilla.com/D242727
2025-03-24 15:55:48 +00:00
Ryan VanderMeulen
1b7c05831c
Bug 1897958 - Update Gradle files for Kotlin 2.x and Compose Compiler changes. r=geckoview-reviewers,android-reviewers,tthibaud,owlish
...
Differential Revision: https://phabricator.services.mozilla.com/D213832
2025-03-06 23:24:14 +00: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
Ryan VanderMeulen
0cb4659021
Bug 1929236 - Run Robolectric tests on SDK 35. r=android-reviewers,mcarare
...
Differential Revision: https://phabricator.services.mozilla.com/D227988
2024-11-18 13:21:34 +00:00
Aaditya Dhingra
d71d64edff
Bug 1880848 - Fix warning: org.gradle.api.plugins.BasePluginConvention type has been deprecated. r=android-reviewers,webcompat-reviewers,twisniewski,pollymce,nalexander
...
Differential Revision: https://phabricator.services.mozilla.com/D223166
2024-10-08 09:08:07 +00:00
Ryan VanderMeulen
fea9168a21
Bug 1921380 - Fix some existing AC detekt issues. r=android-reviewers,jonalmeida
...
Differential Revision: https://phabricator.services.mozilla.com/D223894
2024-10-03 21:52:14 +00:00
Ryan VanderMeulen
53bc0efa9d
Bug 1896805 - Update AndroidX Lifecycle to version 2.8.4. r=android-reviewers,avirvara
...
Differential Revision: https://phabricator.services.mozilla.com/D215579
2024-07-26 01:40:45 +00:00
Jonathan Almeida
bf413a4eaf
Bug 1899205 - Introduce UiStore to lib-state component r=android-reviewers,petru,matt-tighe,rsainani
...
We introduce a new `UiStore` that requires moving around some parts
of the original `Store` around, while keeping the surface area
identical to before so that we can swap between the different types.
Some noteworthy points and concepts introduced:
- A `StoreDispatcher` holds the `CoroutineContext` in which a `Store` has
implemented.
- We move the `assertOnThread` out from the `StoreThreadFactory` so
that we can now provide custom assertions based on the
`StoreDispatcher`.
- Some of the new files introduced are from moving multiple classes
out from one file so that they can be better referenced in those new
cases mentioned above.
Differential Revision: https://phabricator.services.mozilla.com/D211800
2024-06-19 19:21:22 +00:00
Noah Bond
4474cefd19
Bug 1897614 - Fix store observations within Compose r=android-reviewers,boek
...
`awaitDispose` in `produceState` was being called off-thread during UI tests, causing intermittent flaky failures when the Tabs Tray observations were migrated to the `observeAsState` API. This unintentionally revealed we are doing unnecessary observation subscription cleanup. The subscription cleanup happens as part of the lifecycle tethering during the observation binding.
https://searchfox.org/mozilla-central/source/mobile/android/android-components/components/lib/state/src/main/java/mozilla/components/lib/state/ext/StoreExtensions.kt#31-37
Differential Revision: https://phabricator.services.mozilla.com/D211473
2024-05-24 14:59:03 +00:00
mcarare
1070e28db0
Bug 1893120 - Run AC Robolectric tests on SDK 34 and adapt tests. r=android-reviewers,webcompat-reviewers,twisniewski,avirvara
...
Differential Revision: https://phabricator.services.mozilla.com/D209640
2024-05-14 13:00:48 +00:00
acseh
3f4b08c594
Backed out changeset 9976b7730dbd (bug 1893120) for causing lint failures CLOSED TREE
2024-05-14 12:57:36 +03:00
mcarare
4a11afeae1
Bug 1893120 - Run AC Robolectric tests on SDK 34 and adapt tests. r=android-reviewers,webcompat-reviewers,twisniewski,avirvara
...
Differential Revision: https://phabricator.services.mozilla.com/D209640
2024-05-14 08:02:38 +00:00
mcarare
7562dc8765
Bug 1880077 - Switch to using Compose BOM instead of individual versioning
2024-02-22 08:51:53 +00:00
Jonathan Almeida
4b19e55ee5
Bug 1873302 - Update StoreThreadFactory exception message
2024-01-13 15:29:00 +00:00
mcarare
063c553913
Bug 1849833 - Replace deprecated compileSdkVersion.
...
This is replaced by defaultConfig compileSdk.
2023-09-11 06:36:20 +00:00
mcarare
d144b283c9
Bug 1849833 - Replace all with configureEach.
...
This avoids unnecessary configuration.
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
MatthewTighe
c87183c8b5
Bug 1843168 - Expose Mockito through test support component
2023-07-24 18:02:09 +00:00
mcarare
898e190e70
Bug 1826590 - Run test job on Main.
2023-06-12 20:54:19 +00:00
rahulsainani
a8c1d2b399
Bug 1830895 - observeAsState compose extension
2023-05-16 13:06:41 +00:00
Noah Bond
830d0e0cc1
Bug 1826457 - Update Compose version to 1.4.2 and Lifecycle version to 2.6.1
2023-04-27 03:17:17 +00:00
Geoff Brown
6561b2de2b
Bug 1825116 - Resolve many black, isort, and file-whitespace lint issues
2023-04-12 14:04:29 +00:00
mcarare
278fa80cc2
Bug 1824717 - Remove unnecessary AndroidJUnit4 runner.
2023-04-05 12:44:13 +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
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
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
Christian Sadilek
4091b14a33
Fix android lint in composite builds
2022-11-21 13:40:53 -05:00
Mihai Adrian Carare
e087b524a6
Bug 1796353 - Build with compileSdkVersion for Android 13 / API 33. ( https://github.com/mozilla-mobile/firefox-android/pull/62 )
...
* Bug 1796353 - Build with compileSdkVersion for Android 13 / API 33.
* Bug 1796353 - Update method signature for View.AccessibilityDelegate.
* Bug 1796353 - Handle AccessibilityNodeInfo.CollectionInfo.obtain deprecation.
* Bug 1796353 - Update method signature for View.OnAttachStateChangeListener.
* Bug 1796353 - Handle getParcelableExtra(String) deprecation.
* Bug 1796353 - Handle getParcelable(String) deprecation.
* Bug 1796353 - Handle getParcelableArrayListExtra(String) deprecation.
* Bug 1796353 - Move URLStringUtils to ktx package.
This is needed to avoid circular dependencies for some needed changes.
* Bug 1796353 - Suppress deprecation for get(String).
* Bug 1796353 - Replace removed method setAppCacheEnabled.
* Bug 1796353 - Handle PackageManager methods deprecations.
* Bug 1796353 - Handle getSerializable(String) deprecation.
* Bug 1796353 - Handle stopForeground deprecation.
* Bug 1796353 - Update method signature for GestureDetector.SimpleOnGestureListener.
* Bug 1796353 - Handle AccessibilityEvent.obtain deprecation.
* Bug 1796353 - Handle getParcelableArrayList(String) deprecation.
* Bug 1796353 - Handle getParcelableArray(String) deprecation.
* Bug 1796353 - Handle getSerializableExtra(String) deprecation.
* Bug 1796353 - Handle readParcelable(classLoader) deprecation.
* Bug 1796353 - Handle FillResponse.Builder setAuthentication deprecation.
* Bug 1796353 - Handle Dataset.Builder setValue deprecation.
* Bug 1796353 - Suppress get(String) deprecation.
We still need to use this method because we do not know the type beforehand.
* Bug 1796353 - Handle onBackPressed() deprecation.
* Bug 1796353 - Suppress queryBroadcastReceivers deprecation.
* Bug 1796353 - Suppress package manager methods deprecation.
* Bug 1796353 - Catch and report exceptions when handling touch event detection.
* Bug 1796353 - Suppress deprecation for getPackageInfo used in tests with SDK 28.
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-11-16 00:35:40 -05:00
mcarare
4ad330adbc
[components] For https://github.com/mozilla-mobile/android-components/issues/12489 : Upgrade kotlin, coroutines, compose compiler to latest versions.
...
Upgrade kotlin to 1.7.20, coroutines to 1.6.4 and compose compiler to 1.3.2.
Replace deprecated Xopt-in with op-in.
Replace deprecated Xjvm-default=enable with Xjvm-default=all.
Remove useIR property that is now default true.
2022-10-18 08:20:59 +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
mcarare
5039c5e30d
[components] For https://github.com/mozilla-mobile/android-components/issues/12500 : Fix ktlint issues.
...
Also remove issues from ktlint baseline.
2022-10-11 07:17:12 +00:00
mcarare
89c716d240
[components] For https://github.com/mozilla-mobile/android-components/issues/12500 : Handle OnLifecycleEvent deprecations.
2022-10-11 07:17:12 +00:00
mcarare
92fe0c0234
[components] For https://github.com/mozilla-mobile/android-components/issues/12724 : Upgrade compose to 1.2.1 version.
...
Split versioning of compose compiler.
Enable Xjvm-default to allow inheriting from interfaces with '@JvmDefault' members
like RememberObserver.
2022-09-08 08:22:09 +00:00
Mugurell
d78b06b6bf
[components] For https://github.com/mozilla-mobile/android-components/pull/11175 - Migrate runBlocking and runBlockingTest to runTest in unit tests
...
Used `runTestOnMain` where `MainCoroutineRule` was used or needed to be used,
`runTest` elsewhere.
Extra effort for removing all `runBlocking` occurrences in unit tests.
`kotlinx.coroutines.test.runTest` is a test specific API that seems like a more
appropriate way for running tests in a coroutine than the general
`kotlinx.coroutines.runBlocking` api.
2022-05-10 13:45:03 +00:00
Mugurell
2963708053
[components] For https://github.com/mozilla-mobile/android-components/issues/11755 - Replace TestCoroutineDispatcher with UnconfinedTestDispatcher
...
- Refactor out all usages of TestCoroutineDispatcher and TestCoroutineScope
- Refactor MainCoroutineRule to now use UnconfinedTestDispatcher by default.
This dispatcher will eagerly enter all launch or async blocks being more suited
to our codebase.
2022-05-10 13:45:03 +00:00
mcarare
33d5df7988
[components] For https://github.com/mozilla-mobile/android-components/issues/11670 : Use shadowOf(getMainLooper()).idle() to execute all posted tasks.
...
This is needed due to the new default Looper Mode - PAUSED in Robolectric.
2022-03-18 12:43:16 +00:00
Matt Tighe
320db82e76
[components] remove deprecated lifecycle usages
2022-01-13 21:27:08 +00:00
Sebastian Kaspari
90ec41fc3a
[components] Update Kotlin and Jetpack Compose versions.
2021-10-25 10:58:07 +00:00
Jonathan Almeida
e7d3f34077
[components] Close https://github.com/mozilla-mobile/android-components/issues/10769 : Add DebugAction.UpdateCreatedAtAction with reducer
...
We wanted to introduce this action for testing purposes in client apps
that want to "turn back time" for a certain tab.
The difficulty is in ensuring clients do not misuse these actions, and
we thought of a few strategies:
- Option 1: Make a separate grouping called `DebugAction` and document
that these are special actions.
- Option 2: Using a middleware, we only allow changes to the store
depending on some dynmamic logic in the client app. This is a bit
complicated and requries the user to restart the app to add this
special middleware.
- Option 3: Add an annotation that requires the client to opt into using
the action.
In this patch, I decided to go with a combination of options 1 and 3
which gave us the right about of warning and flexibility.
With option 2, we were still required to add new actions to the store
and the middleware would not have prevented misuse in those cases.
2021-08-12 03:56:04 +00:00
Sebastian Kaspari
ce323400dd
[components] Run ktlintFormat to fix new ktlint errors.
2021-07-28 12:03:23 +00:00
Michael Comella
06e80c6e10
[components] For https://github.com/mozilla-mobile/android-components/issues/10604 : remove remaining unused imports automatically.
...
This commit was automatically generated with:
```sh
./gradlew ktlint --args="-F"
```
2021-07-27 19:39:04 +00:00
Michael Comella
56938c0849
[components] For https://github.com/mozilla-mobile/android-components/issues/10604 : remove redundant constructor to MainCoroutineRule in tests.
...
The default argument is identical to the passed in argument.
2021-07-27 19:39:04 +00:00
Michael Comella
9f3e6f1a1b
[components] For https://github.com/mozilla-mobile/android-components/issues/10604 : reuse new TestCoroutineDispatcher in additional tests.
...
These follow a few more simple patterns I was able to find:
- the testDispatcher is not used anywhere else: remove it
- the testDispatcher is used to set a main dispatcher: this is redundant
to the test rule so remove it both the dispatcher & the main dispatcher
- the testDispatcher is actually used elsewhere: for simplicity, change
the reference to point at the MainCoroutineRule.
2021-07-27 19:39:04 +00:00
Sebastian Kaspari
f14b267388
[components] Issue https://github.com/mozilla-mobile/android-components/issues/10335 : Update dependencies to support Jetpack Compose and add first prototype components.
...
* Issue https://github.com/mozilla-mobile/android-components/issues/10335 : Upgrade to Gradle 7.
* Update Android Gradle Plugin to 7.0.0 Beta 2.
* Issue https://github.com/mozilla-mobile/android-components/issues/10335 : Generate BuildConfig with VERSION_CODE and VERSION_NAME fields in library modules (for Glean).
* Issue https://github.com/mozilla-mobile/android-components/issues/10335 : Add first component using Jetpack Compose: compose-browser-toolbar.
* Issue https://github.com/mozilla-mobile/android-components/issues/10335 : Introduce Jetpack Compose bindings for lib-state.
* Issue https://github.com/mozilla-mobile/android-components/issues/10335 : Upstream Jetpack Compose toolbar prototype from Reference Browser.
* Issue https://github.com/mozilla-mobile/android-components/issues/10335 : Add TargetTab helper for observing specific tabs.
* Issue https://github.com/mozilla-mobile/android-components/issues/10335 : Add compose-engine component for adding Jetpack Compose bindings to a concept-engine implementation.
* Issue https://github.com/mozilla-mobile/android-components/issues/10335 : Add new sample app (samples-compose-browser) for prototyping browser UI using Jetpack Compose.
* Issue https://github.com/mozilla-mobile/android-components/issues/10335 : Update to Beta 3 of the Android Gradle plugin.
* Issue https://github.com/mozilla-mobile/android-components/issues/10335 : Allow usage of http when substituting maven repositories in CI.
* Issue https://github.com/mozilla-mobile/android-components/issues/10335 : Rename TabTarget helper to just Target.
* Issue https://github.com/mozilla-mobile/android-components/issues/10335 : Make BrowserToolbar follow target tab too.
* Add awesomebar prototype using Jetpack Compose.
* Update to Gradle 7.0.2.
2021-07-20 16:22:26 +00:00
Sebastian Kaspari
9fb6953940
[components] Upgrade Android Gradle Plugin to 4.2.2 and Gradle to 6.7.1.
2021-07-19 09:32:44 +00:00