Commit graph

71 commits

Author SHA1 Message Date
mcarare
063c553913 Bug 1849833 - Replace deprecated compileSdkVersion.
This is replaced by defaultConfig compileSdk.
2023-09-11 06:36:20 +00:00
Gabriel Luong
cd6f5e0e77 Bug 1795140 - Enable AbsentOrWrongFileLicense detekt rule 2023-08-14 17:53:38 +00:00
MatthewTighe
c87183c8b5 Bug 1843168 - Expose Mockito through test support component 2023-07-24 18:02:09 +00:00
Ryan VanderMeulen
1fca530ae2 Bug 1826590 - Update Kotlin Coroutines to version 1.7.1 2023-06-12 20:54:19 +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
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
Christian Sadilek
4091b14a33 Fix android lint in composite builds 2022-11-21 13:40:53 -05: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
Jonathan Almeida
bd35d30334 [components] Issue https://github.com/mozilla-mobile/android-components/issues/12230: Speculative fix for test failures in PromptFeatureTest 2022-06-15 19:23:49 +00:00
MatthewTighe
a22d90edc0 [components] for https://github.com/mozilla-mobile/android-components/issues/12065: add a SyncStore and some initial state properties 2022-05-27 17:22:48 +00:00
Mugurell
2458be9143 [components] For https://github.com/mozilla-mobile/android-components/pull/11175 - Add a new runTestOnMain top level function
This attempts to run the test in a new coroutine using the `TestDispatcher`
previously set through `Dispatchers.setMain(..)`.
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
Sebastian Kaspari
b68d7f6c47 [components] Move FakeContext and FakeSharedPreferences to support-test-fakes component 2021-12-06 15:19:50 +00:00
Sebastian Kaspari
90ec41fc3a [components] Update Kotlin and Jetpack Compose versions. 2021-10-25 10:58:07 +00:00
Sebastian Kaspari
ce323400dd [components] Run ktlintFormat to fix new ktlint errors. 2021-07-28 12:03:23 +00:00
Michael Comella
851f8a624d [components] For https://github.com/mozilla-mobile/android-components/issues/10604: add MainCoroutineRule.runBlockingTest. 2021-07-27 19:39:04 +00:00
Michael Comella
c29c7a2886 [components] For https://github.com/mozilla-mobile/android-components/issues/10604: change MainCoroutineRule to take TestCoroutineDispatcher. 2021-07-27 19:39:04 +00:00
Michael Comella
b3c2050afa [components] For https://github.com/mozilla-mobile/android-components/issues/10604: deprecate createTestCoroutinesDispatcher.
This is redundant to the built-in TestCoroutineDispatcher() method.
TestCoroutineDispatcher is also preferred because it has enhanced
testing functionality including defining a context-specific
`runBlockingTest` function, the ability to control `delay` timings, etc.
2021-07-27 19:39:04 +00:00
Arturo Mejia
fd17de7f1d [components] Close issue https://github.com/mozilla-mobile/android-components/issues/9823 Make users aware that download was not performed because of a denied permission 2021-03-08 17:23:53 +00:00
Michael Comella
89c283dac1 [components] For https://github.com/mozilla-mobile/android-components/issues/9638: name threads in Executors.new* calls.
I omitted:
- Store, as its a super-class
- Fennec migration code
2021-02-10 00:35:59 +00:00
Mugurell
b55384ba67 [components] For https://github.com/mozilla-mobile/android-components/pull/9417 - Add support for sharing actual website images (https://github.com/mozilla-mobile/android-components/pull/9420)
Prior to this when the user selected to share an image from the contextual menu
the apps would only share the URL, not the actual resource.

This patch adds a new `ShareDownloadFeature` that will listen for
`AddShareAction` and download, cache locally and then share the Internet
resource contained in Action's state.

Giving the time needed to actually download these resources this feature is
only used for image sharing, not for other types of potentially bigger
resource types.

This is a breaking change with clients expected to create and register a new
instance of the this new feature otherwise the "Share image" from the
browser contextual menu will do nothing.

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-02-01 15:43:51 +00:00
Emilio Cobos Álvarez
41d375b7d9 [components] ktlint: Add missing newlines.
Running ./gradlew ktlint locally reports a lot of stuff like:

/home/emilio/src/moz/android-components/components/support/migration/src/test/java/mozilla/components/support/migration/MigrationIntentProcessorTest.kt:1:1: File must end with a newline (\n)

This fixes it with:

    for f in $(cat files | cut -d : -f 1); do echo "" >> $f; done

Making ./gradlew ktlint pass.
2020-12-03 17:24:44 +00:00
Sebastian Kaspari
b067fd7e21 [components] Fix new lint errors after AndroidX update. 2020-12-02 12:17:31 +00:00
Sebastian Kaspari
87b356108c [components] Issue https://github.com/mozilla-mobile/android-components/issues/7863: Add RegionMiddleware that adds a RegionState to the store. 2020-10-08 13:39:22 +00:00
Sebastian Kaspari
9a5e48b10b [components] support-test: Add fake implementations for Context, SharedPreferences and wrapping System.currentTimeMillis. 2020-10-08 13:39:22 +00:00
Jonathan Almeida
b86fa6dfb5 [components] Close https://github.com/mozilla-mobile/android-components/issues/6601: Update targetSdkVersion to 29 2020-04-28 03:16:54 -04:00
levimatheri
17357ca5a5 [components] Closes https://github.com/mozilla-mobile/android-components/issues/6369: Add ThrowProperty to support-test 2020-03-25 20:38:55 -04:00
Jonathan Almeida
09ef74612d [components] Closes https://github.com/mozilla-mobile/android-components/issues/4925: Add support for push scopes in AutoPushFeature
We've cleaned up a lot of the code here to simplify our logic and also
add the support needed for integrating WebPush with Gecko-based engines.

 - Avoid naming collisions between push and coroutine scopes.
 - Added new `subscribe` and `unsubscribe` APIs.
 - Added a simplified observer on the feature itself.
 - Removed APIs: `subscribeForType`, `unsubscribeForType`, `subscribeAll`.
 - Removed old `registerForPushMessages` and `registerForSubscriptions`
 - Removed the MessageBus implementation and the Bus API.
 - Removed the PushType enum and it's usages.
 - Updated `FxaPushSupportFeature` with the new APIs.
 - Added a random scope for individual devices that use
 `FxaPushSupportFeature`.
 - Added a lot more documentation through out all files touched.

Partially unrelated changes:
 - Added Mockito nullable with Kotlin reified types.
2020-02-24 10:59:48 -05:00
Severin Rudie
5b868c9ca0 [components] For https://github.com/mozilla-mobile/fenix/issues/5695: adds '{app} Search' to text selection context menu 2020-02-14 08:40:46 -08:00
Jovan Gerodetti
6fff2ab28e [components] Know which PWAs are installed https://github.com/mozilla-mobile/android-components/issues/5667
For https://github.com/mozilla-mobile/android-components/issues/5667
2020-01-29 20:42:54 +01:00
Marcel Schneider
075217083e [components] For https://github.com/mozilla-mobile/android-components/issues/3790:
Add 'Open link in external app' to context menu
Add changelog entry
Show open in external app for intent: links
Open market place intents
2020-01-20 19:59:54 +01:00
Michael Comella
0c6d26d60b [components] For https://github.com/mozilla-mobile/fenix/issues/7441: add KProperty.isLazyInitialized test function. 2019-12-31 13:51:46 -08:00
Tiger Oakes
1bdf8c8234 [components] Add JUnit coroutine test rule 2019-11-18 19:52:50 -08:00
Arturo Mejia
9221b26899 [components] Closes https://github.com/mozilla-mobile/android-components/issues/4776: Provide API for discovering supported addons 2019-10-29 16:06:08 -04:00
Arturo Mejia
eb20d5d4d7 [components] Add test support for loading files from the resources directory 2019-10-29 14:58:47 -04:00
Ahmed I. Khalil
6179f4b6ef [components] Test helper for creating attached fragment
Closes https://github.com/mozilla-mobile/android-components/issues/4120
2019-10-08 00:04:48 +02:00
Denys M
b95c932f81 [components] For https://github.com/mozilla-mobile/android-components/issues/4460. Fix detekt warning about license in project files. 2019-09-24 01:01:03 +04:00
Roger Yang
1e2ddbff67 [components] For https://github.com/mozilla-mobile/android-components/issues/3893 - Moving WebserverRule to support-test 2019-08-08 12:53:53 -04:00
Roger Yang
619747bb0e [components] For https://github.com/mozilla-mobile/android-components/issues/3893 - Moving WebserverRule to support-test 2019-08-07 11:10:20 -07:00
Sebastian Kaspari
38f8ab1ce6 [components] Restructure (reduced) BrowserState and add tests. 2019-06-25 17:13:49 +02:00
Denys M
1f8fc3fa5b [components] For https://github.com/mozilla-mobile/android-components/issues/1481. Enable unit test binary resources globally.
Excluded few modules.
2019-06-13 09:29:52 +02:00
Denys M
e5ac6d5f95 [components] For https://github.com/mozilla-mobile/android-components/issues/1481. Use androidx runner in support-test. 2019-06-11 17:42:18 +02:00
Denys M
3591915d22 [components] For https://github.com/mozilla-mobile/android-components/issues/2346. Enable kotlin warningsAsErrors for support-test module. 2019-06-04 20:00:53 -04:00
Denys M
34acb26418 [components] For https://github.com/mozilla-mobile/android-components/issues/2346. Enable kotlin warningsAsErrors for browser-engine-servo module. 2019-06-01 00:38:08 -04:00
Denis Buzmakov
9f4c8b9e01 [components] Closes https://github.com/mozilla-mobile/android-components/issues/888: Use PixelCopy API on Oreo+ 2019-05-30 14:40:31 -07:00
Denys M
64e899736d [components] For https://github.com/mozilla-mobile/android-components/issues/2346. Provide testContext extension property for tests. 2019-05-21 17:26:46 -04:00