Skip to content

Commit 728ccec

Browse files
committed
Merge branch 'release/5.77.0' into main
2 parents 9edc912 + 66c0433 commit 728ccec

File tree

62 files changed

+1292
-570
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+1292
-570
lines changed

CONTRIBUTING.md

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,28 @@ Contact us at https://duckduckgo.com/feedback if you have feedback, questions or
1313
## Report an issue
1414
A great way to contribute to the project is to report an issue when you encounter a problem.
1515

16-
We want our app to be as stable as possible thus your bug reports are immensely valuable. When reporting bugs let us know the:
17-
* App version
18-
* Device model
19-
* Android version
20-
* Steps to reproduce the bug
21-
* Expected behavior
22-
* Actual behavior
16+
We want our app to be as stable as possible thus your bug reports are immensely valuable. When reporting bug, please follow the bug template.
2317

2418
If you have encountered a security issue, please reach us through https://hackerone.com/duckduckgo.
2519

20+
## What to expect
21+
22+
When a new issue is opened, we will label it as:
23+
* Needs triage: needs a triage from a member of our team
24+
* under investigation: our team will investigate the issue
25+
26+
After our team has investigated each issue, we will label them as:
27+
* Will fix: issue will be fixed internally by DuckDuckGo
28+
* [help wanted](https://github.com/duckduckgo/Android/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22): community contributions are welcome
29+
* Won't fix: issue will be closed without a fix
30+
2631
## Contribute Code
2732

28-
We welcome pull requests aimed at fixing bugs and security issues. We have also labeled tasks you can help with as [help wanted](https://github.com/duckduckgo/Android/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22).
33+
We welcome pull requests aimed at fixing bugs and security issues.
34+
35+
If you have a great idea or a feature request that can help improving our browser, start by opening a [Discussion](https://github.com/duckduckgo/Android/discussions). Discussions is the right place to have an open conversation about an idea with our devs and maintainers. Proposals that fit our product direction and timeline will be added to our backlog and labelled accordingly.
2936

30-
If you have a great idea you really want to implement, start by logging an issue for us and mention that you are interested in helping. If it fits with our product direction and is a good candidate for community development we may be able to bend the rules and work with you to develop it.
37+
We have also labeled tasks you can help with as [help wanted](https://github.com/duckduckgo/Android/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22). Those tasks a great places to start contributing to DuckDuckGo and we'll support you through the process.
3138

3239
### Style Guide
3340

app/build.gradle

Lines changed: 64 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -95,131 +95,97 @@ android {
9595
}
9696
}
9797

98-
ext {
99-
androidX = "1.2.0"
100-
materialDesign = "1.2.1"
101-
swipeRefreshLayout = "1.1.0"
102-
architectureComponents = "1.1.1"
103-
architectureComponentsExtensions = "1.1.1"
104-
androidKtxCore = "1.3.2"
105-
fragmentKtx = "1.2.5"
106-
constraintLayout = "2.0.4"
107-
lifecycle = "2.2.0"
108-
room = "2.2.5"
109-
workManager = "2.4.0"
110-
legacySupport = "1.0.0"
111-
coreTesting = "2.1.0"
112-
testRunner = "1.3.0"
113-
coroutines = "1.3.5"
114-
retrofitCoroutinesAdapter = "0.9.2"
115-
webkit = "1.3.0"
116-
referrerLibrary = "1.1.2"
117-
118-
junit = "4.12"
119-
dagger = "2.27"
120-
retrofit = "2.8.1"
121-
ankoVersion = "0.10.4"
122-
glide = "4.11.0"
123-
lottieVersion = "3.4.0"
124-
okHttp = "4.9.0"
125-
rxJava = "2.1.10"
126-
rxAndroid = "2.0.2"
127-
timber = "4.7.1"
128-
rxRelay = "2.0.0"
129-
leakCanary = "2.5"
130-
mockito = "3.4.6"
131-
mockitoKotlin = "2.2.0"
132-
commonsMath = "3.6.1"
133-
}
134-
135-
13698
dependencies {
137-
implementation "androidx.legacy:legacy-support-v4:$legacySupport"
138-
debugImplementation "com.squareup.leakcanary:leakcanary-android:$leakCanary"
99+
implementation AndroidX.legacy.supportV4
100+
debugImplementation Square.leakCanary.android
139101

140102
implementation fileTree(dir: 'libs', include: ['*.jar'])
141103

142-
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
143-
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines"
144-
androidTestImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:$coroutines"
145-
146-
implementation "androidx.appcompat:appcompat:$androidX"
147-
implementation "com.google.android.material:material:$materialDesign"
148-
implementation "androidx.constraintlayout:constraintlayout:$constraintLayout"
149-
implementation "androidx.swiperefreshlayout:swiperefreshlayout:$swipeRefreshLayout"
150-
implementation "androidx.webkit:webkit:$webkit"
151-
implementation "com.squareup.okhttp3:okhttp:$okHttp"
152-
implementation "com.squareup.okhttp3:okhttp-tls:$okHttp"
153-
implementation "com.squareup.retrofit2:retrofit:$retrofit"
154-
implementation "com.squareup.retrofit2:converter-moshi:$retrofit"
155-
implementation "com.squareup.retrofit2:adapter-rxjava2:$retrofit"
156-
implementation "com.squareup.retrofit2:converter-scalars:$retrofit"
157-
implementation "com.jakewharton.retrofit:retrofit2-kotlin-coroutines-adapter:$retrofitCoroutinesAdapter"
158-
implementation "io.reactivex.rxjava2:rxjava:$rxJava"
159-
implementation "io.reactivex.rxjava2:rxandroid:$rxAndroid"
160-
implementation "com.jakewharton.timber:timber:$timber"
161-
implementation "com.google.dagger:dagger-android:$dagger"
162-
implementation "com.google.dagger:dagger-android-support:$dagger"
104+
implementation Kotlin.stdlib.jdk7
105+
implementation KotlinX.coroutines.core
106+
implementation KotlinX.coroutines.android
107+
androidTestImplementation (KotlinX.coroutines.test) {
108+
// https://github.com/Kotlin/kotlinx.coroutines/issues/2023
109+
// conflicts with mockito due to direct inclusion of byte buddy
110+
exclude group: "org.jetbrains.kotlinx", module: "kotlinx-coroutines-debug"
111+
}
112+
113+
implementation AndroidX.appCompat
114+
implementation Google.android.material
115+
implementation AndroidX.constraintLayout
116+
implementation AndroidX.swipeRefreshLayout
117+
implementation AndroidX.webkit
118+
implementation Square.okHttp3.okHttp
119+
implementation "com.squareup.okhttp3:okhttp-tls:_"
120+
implementation Square.retrofit2.retrofit
121+
implementation Square.retrofit2.converter.moshi
122+
implementation Square.retrofit2.adapter.rxJava2
123+
implementation Square.retrofit2.converter.scalars
124+
implementation "io.reactivex.rxjava2:rxjava:_"
125+
implementation "io.reactivex.rxjava2:rxandroid:_"
126+
implementation JakeWharton.timber
127+
implementation Google.dagger.android
128+
implementation Google.dagger.android.support
163129

164130
// RxRelay
165-
implementation "com.jakewharton.rxrelay2:rxrelay:$rxRelay"
131+
implementation "com.jakewharton.rxrelay2:rxrelay:_"
166132

167133
// Anko
168-
implementation "org.jetbrains.anko:anko-commons:$ankoVersion"
169-
implementation "org.jetbrains.anko:anko-design:$ankoVersion"
134+
implementation "org.jetbrains.anko:anko-commons:_"
135+
implementation "org.jetbrains.anko:anko-design:_"
170136

171137
// Android KTX
172-
implementation "androidx.core:core-ktx:$androidKtxCore"
173-
implementation "androidx.fragment:fragment-ktx:$fragmentKtx"
138+
implementation AndroidX.core.ktx
139+
implementation AndroidX.fragmentKtx
174140

175141
// ViewModel and LiveData
176-
implementation "androidx.lifecycle:lifecycle-extensions:$lifecycle"
177-
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle"
178-
implementation "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycle"
142+
implementation AndroidX.lifecycle.extensions
143+
implementation AndroidX.lifecycle.viewModelKtx
144+
implementation AndroidX.lifecycle.liveDataKtx
179145

180-
implementation "androidx.lifecycle:lifecycle-common-java8:$lifecycle"
181-
testImplementation "androidx.arch.core:core-testing:$coreTesting"
182-
androidTestImplementation "androidx.arch.core:core-testing:$coreTesting"
146+
implementation AndroidX.lifecycle.commonJava8
147+
testImplementation AndroidX.archCore.testing
148+
androidTestImplementation AndroidX.archCore.testing
183149

184150
// Room
185-
implementation "androidx.room:room-runtime:$room"
186-
implementation "androidx.room:room-rxjava2:$room"
187-
implementation "androidx.room:room-ktx:$room"
188-
kapt "androidx.room:room-compiler:$room"
189-
testImplementation "androidx.room:room-testing:$room"
190-
androidTestImplementation "androidx.room:room-testing:$room"
151+
implementation AndroidX.room.runtime
152+
implementation AndroidX.room.rxJava2
153+
implementation AndroidX.room.ktx
154+
kapt AndroidX.room.compiler
155+
testImplementation AndroidX.room.testing
156+
androidTestImplementation AndroidX.room.testing
191157

192158
// WorkManager
193-
implementation "androidx.work:work-runtime-ktx:$workManager"
194-
androidTestImplementation "androidx.work:work-testing:$workManager"
195-
implementation "androidx.work:work-rxjava2:$workManager"
159+
implementation AndroidX.work.runtimeKtx
160+
androidTestImplementation AndroidX.work.testing
161+
implementation AndroidX.work.rxJava2
196162

197163
// Dagger
198-
kapt "com.google.dagger:dagger-android-processor:$dagger"
199-
kapt "com.google.dagger:dagger-compiler:$dagger"
200-
kaptAndroidTest "com.google.dagger:dagger-android-processor:$dagger"
201-
kaptAndroidTest "com.google.dagger:dagger-compiler:$dagger"
164+
kapt Google.dagger.android.processor
165+
kapt Google.dagger.compiler
166+
kaptAndroidTest "com.google.dagger:dagger-android-processor:_"
167+
kaptAndroidTest "com.google.dagger:dagger-compiler:_"
202168

203169
// Glide
204-
implementation "com.github.bumptech.glide:glide:$glide"
205-
implementation "com.github.bumptech.glide:okhttp3-integration:$glide"
206-
kapt "com.github.bumptech.glide:compiler:$glide"
170+
implementation "com.github.bumptech.glide:glide:_"
171+
implementation "com.github.bumptech.glide:okhttp3-integration:_"
172+
kapt "com.github.bumptech.glide:compiler:_"
207173

208174
// Lottie
209-
implementation "com.airbnb.android:lottie:$lottieVersion"
175+
implementation "com.airbnb.android:lottie:_"
210176

211177
// Apache commons
212-
implementation "org.apache.commons:commons-math3:$commonsMath"
178+
implementation "org.apache.commons:commons-math3:_"
213179

214180
// Play Store referrer library
215-
implementation("com.android.installreferrer:installreferrer:$referrerLibrary")
181+
implementation("com.android.installreferrer:installreferrer:_")
216182

217183
// Testing dependencies
218-
androidTestImplementation "androidx.test:runner:$testRunner"
219-
androidTestImplementation "androidx.test:rules:$testRunner"
220-
androidTestUtil "androidx.test:orchestrator:$testRunner"
221-
androidTestImplementation "org.mockito:mockito-android:$mockito"
222-
androidTestImplementation "com.nhaarman.mockitokotlin2:mockito-kotlin:$mockitoKotlin"
223-
androidTestImplementation "com.squareup.okhttp3:mockwebserver:$okHttp"
224-
androidTestImplementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
184+
androidTestImplementation AndroidX.test.runner
185+
androidTestImplementation AndroidX.test.rules
186+
androidTestUtil AndroidX.test.orchestrator
187+
androidTestImplementation Testing.mockito.android
188+
androidTestImplementation Testing.mockito.kotlin
189+
androidTestImplementation Square.okHttp3.mockWebServer
190+
androidTestImplementation "org.jetbrains.kotlin:kotlin-reflect:_"
225191
}

app/src/androidTest/java/com/duckduckgo/app/bookmarks/ui/BookmarksViewModelTest.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,4 +117,10 @@ class BookmarksViewModelTest {
117117
testee.delete(bookmark)
118118
verify(faviconManager).deletePersistedFavicon(bookmark.url)
119119
}
120+
121+
@Test
122+
fun whenBookmarkInsertedThenDaoUpdated() {
123+
testee.insert(bookmark)
124+
verify(bookmarksDao).insert(bookmark)
125+
}
120126
}

0 commit comments

Comments
 (0)