Update duckduckgo project for regression benchmarks.

Build with Kotlin 1.7.0 is broken due to Anvil dependency doesn't have
Kotlin 1.7.0 supported release.
This commit is contained in:
Yahor Berdnikau
2022-04-20 17:05:11 +02:00
parent 9c00787641
commit 198c215c75
4 changed files with 43 additions and 104 deletions
@@ -4,13 +4,13 @@
@file:BenchmarkProject(
name = "duckduckgo",
gitUrl = "https://github.com/duckduckgo/Android.git",
gitCommitSha = "659bd5aaac1fba922a6df9053daa2b7bcd610375"
gitCommitSha = "18e2fcb53a6de6f4f9ef90f27a587d88b6d2e140"
)
import java.io.File
val stableReleasePatch = {
"duckduckgo-kotlin-1.6.10.patch" to File("benchmarkScripts/files/duckduckgo-kotlin-1.6.10.patch").inputStream()
"duckduckgo-kotlin-1.6.20.patch" to File("benchmarkScripts/files/duckduckgo-kotlin-1.6.20.patch").inputStream()
}
val currentReleasePatch = {
@@ -56,7 +56,7 @@ runAllBenchmarks(
}
},
mapOf(
"1.6.10" to stableReleasePatch,
"1.6.20" to currentReleasePatch
"1.6.20" to stableReleasePatch,
"1.7.0" to currentReleasePatch
)
)
@@ -1,57 +0,0 @@
diff --git a/app/src/main/java/com/duckduckgo/app/tabs/model/TabRepository.kt b/app/src/main/java/com/duckduckgo/app/tabs/model/TabRepository.kt
index 221e9837..d5b38082 100644
--- a/app/src/main/java/com/duckduckgo/app/tabs/model/TabRepository.kt
+++ b/app/src/main/java/com/duckduckgo/app/tabs/model/TabRepository.kt
@@ -19,6 +19,7 @@ package com.duckduckgo.app.tabs.model
import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import com.duckduckgo.app.global.model.Site
+import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.SharedFlow
@@ -36,6 +37,7 @@ interface TabRepository {
/**
* @return the tabs that are marked as "deletable" in the DB
*/
+ @ExperimentalCoroutinesApi
val flowDeletableTabs: Flow<List<TabEntity>>
val liveSelectedTab: LiveData<TabEntity>
diff --git a/build.gradle b/build.gradle
index 4497fd12..c3f5b97c 100644
--- a/build.gradle
+++ b/build.gradle
@@ -2,10 +2,10 @@
buildscript {
ext {
- kotlin_version = '1.5.10'
+ kotlin_version = '1.6.10'
}
ext.spotless = "5.14.0"
- ext.anvil_version = "2.3.3"
+ ext.anvil_version = "2.3.10-1-6-0"
ext.gradle_plugin = "7.0.3"
@@ -41,4 +41,4 @@ allprojects {
task clean(type: Delete) {
delete rootProject.buildDir
-}
\ No newline at end of file
+}
diff --git a/versions.properties b/versions.properties
index fae6ae6e..6debdaa6 100644
--- a/versions.properties
+++ b/versions.properties
@@ -73,7 +73,7 @@ version.io.reactivex.rxjava2..rxandroid=2.0.2
version.io.reactivex.rxjava2..rxjava=2.2.9
-version.kotlin=1.5.31
+version.kotlin=1.6.10
version.kotlinx.coroutines=1.5.2
@@ -0,0 +1,20 @@
diff --git a/build.gradle b/build.gradle
index 5e2a7230..6093f13c 100644
--- a/build.gradle
+++ b/build.gradle
@@ -2,7 +2,7 @@
buildscript {
ext {
- kotlin_version = '1.6.10'
+ kotlin_version = '1.6.20'
spotless = "6.1.2"
anvil_version = "2.3.11-1-6-10"
gradle_plugin = "7.0.3"
@@ -70,4 +70,4 @@ fladle {
}
}
-apply plugin: 'android-reporting'
\ No newline at end of file
+apply plugin: 'android-reporting'
@@ -1,49 +1,25 @@
diff --git a/app/src/main/java/com/duckduckgo/app/tabs/model/TabRepository.kt b/app/src/main/java/com/duckduckgo/app/tabs/model/TabRepository.kt
index 221e9837..d5b38082 100644
--- a/app/src/main/java/com/duckduckgo/app/tabs/model/TabRepository.kt
+++ b/app/src/main/java/com/duckduckgo/app/tabs/model/TabRepository.kt
@@ -19,6 +19,7 @@ package com.duckduckgo.app.tabs.model
import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import com.duckduckgo.app.global.model.Site
+import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.SharedFlow
@@ -36,6 +37,7 @@ interface TabRepository {
/**
* @return the tabs that are marked as "deletable" in the DB
*/
+ @ExperimentalCoroutinesApi
val flowDeletableTabs: Flow<List<TabEntity>>
val liveSelectedTab: LiveData<TabEntity>
diff --git a/build.gradle b/build.gradle
index 4497fd12..730df20a 100644
index 5e2a7230..9b06a640 100644
--- a/build.gradle
+++ b/build.gradle
@@ -2,10 +2,10 @@
@@ -2,7 +2,7 @@
buildscript {
ext {
- kotlin_version = '1.5.10'
- kotlin_version = '1.6.10'
+ kotlin_version = '<kotlin_version>'
spotless = "6.1.2"
anvil_version = "2.3.11-1-6-10"
gradle_plugin = "7.0.3"
@@ -13,6 +13,7 @@ buildscript {
}
ext.spotless = "5.14.0"
- ext.anvil_version = "2.3.3"
+ ext.anvil_version = "2.3.10-1-6-0"
ext.gradle_plugin = "7.0.3"
@@ -15,6 +15,7 @@ buildscript {
ext.tools_build_version = "30.0.3"
repositories {
+ mavenLocal()
google()
mavenCentral()
}
@@ -31,6 +32,7 @@ buildscript {
maven { url "https://plugins.gradle.org/m2/" }
@@ -36,6 +37,7 @@ apply plugin: 'com.osacky.fulladle'
allprojects {
repositories {
@@ -51,23 +27,23 @@ index 4497fd12..730df20a 100644
google()
mavenCentral()
}
@@ -41,4 +43,4 @@ allprojects {
@@ -70,4 +72,4 @@ fladle {
}
}
task clean(type: Delete) {
delete rootProject.buildDir
-}
-apply plugin: 'android-reporting'
\ No newline at end of file
+}
+apply plugin: 'android-reporting'
diff --git a/versions.properties b/versions.properties
index fae6ae6e..81cb692c 100644
index 72231792..b6fea830 100644
--- a/versions.properties
+++ b/versions.properties
@@ -73,7 +73,7 @@ version.io.reactivex.rxjava2..rxandroid=2.0.2
@@ -77,7 +77,7 @@ version.io.reactivex.rxjava2..rxjava=2.2.9
version.io.reactivex.rxjava2..rxjava=2.2.9
version.jakewharton.timber=5.0.1
-version.kotlin=1.5.31
-version.kotlin=1.6.20
+version.kotlin=<kotlin_version>
version.kotlinx.coroutines=1.5.2
version.kotlinx.coroutines=1.6.1