Skip to content

Commit 3d3e864

Browse files
committed
Merge branch 'release/5.0.0'
2 parents 46f3975 + 69ca4b9 commit 3d3e864

File tree

149 files changed

+4987
-2491
lines changed

Some content is hidden

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

149 files changed

+4987
-2491
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,20 @@
1-
Asana Issue URL:
1+
<!--
2+
Note: This checklist is a reminder of our shared engineering expectations. Feel free to change it, although assigning a GitHub reviewer and the items in bold are required.
3+
-->
24

3-
## Description
5+
Task/Issue URL:
6+
Tech Design URL:
7+
CC:
48

9+
**Description**:
510

611

7-
## Steps to Test this PR:
12+
**Steps to test this PR**:
813
1.
9-
1.
14+
1.
15+
16+
17+
---
18+
###### Internal references:
19+
[Software Engineering Expectations](https://app.asana.com/0/59792373528535/199064865822552)
20+
[Technical Design Template](https://app.asana.com/0/59792373528535/184709971311943)

app/build.gradle

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ apply plugin: 'kotlin-kapt'
66
apply from: '../versioning.gradle'
77

88
ext {
9-
VERSION_NAME = "4.4.2"
9+
VERSION_NAME = "5.0.0"
1010
USE_ORCHESTRATOR = project.hasProperty('orchestrator') ? project.property('orchestrator') : false
1111
}
1212

@@ -26,6 +26,9 @@ android {
2626
arguments = ["room.schemaLocation": "$projectDir/schemas".toString()]
2727
}
2828
}
29+
sourceSets {
30+
androidTest.assets.srcDirs += files("$projectDir/schemas".toString())
31+
}
2932
}
3033
signingConfigs {
3134
release
@@ -74,11 +77,13 @@ android {
7477
}
7578

7679
ext {
77-
supportLibrary = "27.0.2"
80+
supportLibrary = "27.1.0"
7881
architectureComponents = "1.0.0"
82+
architectureComponentsExtensions = "1.1.0"
7983
dagger = "2.14.1"
8084
retrofit = "2.3.0"
8185
ankoVersion = "0.10.4"
86+
glide = "4.6.1"
8287
}
8388

8489

@@ -109,8 +114,11 @@ dependencies {
109114
implementation "org.jetbrains.anko:anko-commons:$ankoVersion"
110115
implementation "org.jetbrains.anko:anko-design:$ankoVersion"
111116

117+
// Android KTX
118+
implementation 'androidx.core:core-ktx:0.2'
119+
112120
// ViewModel and LiveData
113-
implementation "android.arch.lifecycle:extensions:$architectureComponents"
121+
implementation "android.arch.lifecycle:extensions:$architectureComponentsExtensions"
114122
kapt "android.arch.lifecycle:compiler:$architectureComponents"
115123
testImplementation "android.arch.core:core-testing:$architectureComponents"
116124
androidTestImplementation "android.arch.core:core-testing:$architectureComponents"
@@ -127,6 +135,10 @@ dependencies {
127135
kaptAndroidTest "com.google.dagger:dagger-android-processor:$dagger"
128136
kaptAndroidTest "com.google.dagger:dagger-compiler:$dagger"
129137

138+
// Glide
139+
implementation "com.github.bumptech.glide:glide:$glide"
140+
kapt "com.github.bumptech.glide:compiler:$glide"
141+
130142
testImplementation "org.mockito:mockito-core:2.15.0"
131143
testImplementation "com.nhaarman:mockito-kotlin-kt1.1:1.5.0"
132144
testImplementation "junit:junit:4.12"
Lines changed: 244 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,244 @@
1+
{
2+
"formatVersion": 1,
3+
"database": {
4+
"version": 2,
5+
"identityHash": "d95e3ecc049203a49fdd433255c44af0",
6+
"entities": [
7+
{
8+
"tableName": "https_upgrade_domain",
9+
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`domain` TEXT NOT NULL, PRIMARY KEY(`domain`))",
10+
"fields": [
11+
{
12+
"fieldPath": "domain",
13+
"columnName": "domain",
14+
"affinity": "TEXT",
15+
"notNull": true
16+
}
17+
],
18+
"primaryKey": {
19+
"columnNames": [
20+
"domain"
21+
],
22+
"autoGenerate": false
23+
},
24+
"indices": [],
25+
"foreignKeys": []
26+
},
27+
{
28+
"tableName": "disconnect_tracker",
29+
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`url` TEXT NOT NULL, `category` TEXT NOT NULL, `networkName` TEXT NOT NULL, `networkUrl` TEXT NOT NULL, PRIMARY KEY(`url`))",
30+
"fields": [
31+
{
32+
"fieldPath": "url",
33+
"columnName": "url",
34+
"affinity": "TEXT",
35+
"notNull": true
36+
},
37+
{
38+
"fieldPath": "category",
39+
"columnName": "category",
40+
"affinity": "TEXT",
41+
"notNull": true
42+
},
43+
{
44+
"fieldPath": "networkName",
45+
"columnName": "networkName",
46+
"affinity": "TEXT",
47+
"notNull": true
48+
},
49+
{
50+
"fieldPath": "networkUrl",
51+
"columnName": "networkUrl",
52+
"affinity": "TEXT",
53+
"notNull": true
54+
}
55+
],
56+
"primaryKey": {
57+
"columnNames": [
58+
"url"
59+
],
60+
"autoGenerate": false
61+
},
62+
"indices": [],
63+
"foreignKeys": []
64+
},
65+
{
66+
"tableName": "network_leaderboard",
67+
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`networkName` TEXT NOT NULL, `domainVisited` TEXT NOT NULL, PRIMARY KEY(`networkName`, `domainVisited`))",
68+
"fields": [
69+
{
70+
"fieldPath": "networkName",
71+
"columnName": "networkName",
72+
"affinity": "TEXT",
73+
"notNull": true
74+
},
75+
{
76+
"fieldPath": "domainVisited",
77+
"columnName": "domainVisited",
78+
"affinity": "TEXT",
79+
"notNull": true
80+
}
81+
],
82+
"primaryKey": {
83+
"columnNames": [
84+
"networkName",
85+
"domainVisited"
86+
],
87+
"autoGenerate": false
88+
},
89+
"indices": [],
90+
"foreignKeys": []
91+
},
92+
{
93+
"tableName": "app_configuration",
94+
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`key` TEXT NOT NULL, `appConfigurationDownloaded` INTEGER NOT NULL, PRIMARY KEY(`key`))",
95+
"fields": [
96+
{
97+
"fieldPath": "key",
98+
"columnName": "key",
99+
"affinity": "TEXT",
100+
"notNull": true
101+
},
102+
{
103+
"fieldPath": "appConfigurationDownloaded",
104+
"columnName": "appConfigurationDownloaded",
105+
"affinity": "INTEGER",
106+
"notNull": true
107+
}
108+
],
109+
"primaryKey": {
110+
"columnNames": [
111+
"key"
112+
],
113+
"autoGenerate": false
114+
},
115+
"indices": [],
116+
"foreignKeys": []
117+
},
118+
{
119+
"tableName": "tabs",
120+
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`tabId` TEXT NOT NULL, `url` TEXT, `title` TEXT, PRIMARY KEY(`tabId`))",
121+
"fields": [
122+
{
123+
"fieldPath": "tabId",
124+
"columnName": "tabId",
125+
"affinity": "TEXT",
126+
"notNull": true
127+
},
128+
{
129+
"fieldPath": "url",
130+
"columnName": "url",
131+
"affinity": "TEXT",
132+
"notNull": false
133+
},
134+
{
135+
"fieldPath": "title",
136+
"columnName": "title",
137+
"affinity": "TEXT",
138+
"notNull": false
139+
}
140+
],
141+
"primaryKey": {
142+
"columnNames": [
143+
"tabId"
144+
],
145+
"autoGenerate": false
146+
},
147+
"indices": [
148+
{
149+
"name": "index_tabs_tabId",
150+
"unique": false,
151+
"columnNames": [
152+
"tabId"
153+
],
154+
"createSql": "CREATE INDEX `index_tabs_tabId` ON `${TABLE_NAME}` (`tabId`)"
155+
}
156+
],
157+
"foreignKeys": []
158+
},
159+
{
160+
"tableName": "tab_selection",
161+
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `tabId` TEXT, PRIMARY KEY(`id`), FOREIGN KEY(`tabId`) REFERENCES `tabs`(`tabId`) ON UPDATE NO ACTION ON DELETE SET NULL )",
162+
"fields": [
163+
{
164+
"fieldPath": "id",
165+
"columnName": "id",
166+
"affinity": "INTEGER",
167+
"notNull": true
168+
},
169+
{
170+
"fieldPath": "tabId",
171+
"columnName": "tabId",
172+
"affinity": "TEXT",
173+
"notNull": false
174+
}
175+
],
176+
"primaryKey": {
177+
"columnNames": [
178+
"id"
179+
],
180+
"autoGenerate": false
181+
},
182+
"indices": [
183+
{
184+
"name": "index_tab_selection_tabId",
185+
"unique": false,
186+
"columnNames": [
187+
"tabId"
188+
],
189+
"createSql": "CREATE INDEX `index_tab_selection_tabId` ON `${TABLE_NAME}` (`tabId`)"
190+
}
191+
],
192+
"foreignKeys": [
193+
{
194+
"table": "tabs",
195+
"onDelete": "SET NULL",
196+
"onUpdate": "NO ACTION",
197+
"columns": [
198+
"tabId"
199+
],
200+
"referencedColumns": [
201+
"tabId"
202+
]
203+
}
204+
]
205+
},
206+
{
207+
"tableName": "bookmarks",
208+
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `title` TEXT, `url` TEXT NOT NULL)",
209+
"fields": [
210+
{
211+
"fieldPath": "id",
212+
"columnName": "id",
213+
"affinity": "INTEGER",
214+
"notNull": true
215+
},
216+
{
217+
"fieldPath": "title",
218+
"columnName": "title",
219+
"affinity": "TEXT",
220+
"notNull": false
221+
},
222+
{
223+
"fieldPath": "url",
224+
"columnName": "url",
225+
"affinity": "TEXT",
226+
"notNull": true
227+
}
228+
],
229+
"primaryKey": {
230+
"columnNames": [
231+
"id"
232+
],
233+
"autoGenerate": true
234+
},
235+
"indices": [],
236+
"foreignKeys": []
237+
}
238+
],
239+
"setupQueries": [
240+
"CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
241+
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, \"d95e3ecc049203a49fdd433255c44af0\")"
242+
]
243+
}
244+
}

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ package com.duckduckgo.app.bookmarks.ui
1919
import android.arch.core.executor.testing.InstantTaskExecutorRule
2020
import android.arch.lifecycle.MutableLiveData
2121
import android.arch.lifecycle.Observer
22+
import com.duckduckgo.app.InstantSchedulersRule
2223
import com.duckduckgo.app.bookmarks.db.BookmarkEntity
2324
import com.duckduckgo.app.bookmarks.db.BookmarksDao
2425
import com.nhaarman.mockito_kotlin.mock
@@ -37,6 +38,10 @@ class BookmarksViewModelTest {
3738
@Suppress("unused")
3839
var instantTaskExecutorRule = InstantTaskExecutorRule()
3940

41+
@get:Rule
42+
@Suppress("unused")
43+
val schedulers = InstantSchedulersRule()
44+
4045
private val liveData = MutableLiveData<List<BookmarkEntity>>()
4146
private val viewStateObserver: Observer<BookmarksViewModel.ViewState> = mock()
4247
private val commandObserver: Observer<BookmarksViewModel.Command> = mock()

0 commit comments

Comments
 (0)