Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update libraries #1299

Merged
merged 8 commits into from Jul 24, 2021
Merged

Update libraries #1299

merged 8 commits into from Jul 24, 2021

Conversation

cmonfortep
Copy link
Contributor

@cmonfortep cmonfortep commented Jul 1, 2021

Task/Issue URL: https://app.asana.com/0/414730916066338/1200541903185345/f
Tech Design URL:
CC:

Description:
This PR updates the following libraries:

  • version.androidx.room: 2.2.6 -> 2.3.0
  • version.kotlin=1.4.10 -> 1.5.20
  • version.androidx.appcompat=1.2.0 -> 1.3.0
  • version.androidx.webkit=1.3.0 -> 1.4.0
  • version.androidx.core=1.3.2 → 1.5.0
  • version.androidx.fragment=1.2.5 → 1.3.5
  • version.androidx.work=2.4.0 -> 2.5.0
  • version.okhttp3=4.9.0 -> 4.9.1
  • version.mockito=3.4.6 ->3.10.0

Steps to test this PR:

  1. App should build and pass all the tests.
  2. Install the app and perform any action to ensure no unexpected issues.

Smoke test:

  • Onboarding CTAs
  • Add bookmarks and favorites
  • disable/enable privacy protection
  • share feedback
  • fireproof a site and clear all data
  • opening multiple tabs (and closing tabs + undo)

Note: All the changes have been tested already on API 21


Internal references:

Software Engineering Expectations
Technical Design Template

@@ -37,6 +38,7 @@ class BlobConverterInjectorJsTest {

@UiThreadTest
@Test
@SdkSuppress(minSdkVersion = 24)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently, spy is not supported on API < 24
mockito/mockito#2075 (comment)

Copy link
Collaborator

@aitorvs aitorvs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing this @cmonfortep

@cmonfortep
Copy link
Contributor Author

Thanks @aitorvs. I'm blocking this PR until we merge and release #1274, just to avoid any unexpected issue during the rollout.

@@ -34,12 +34,12 @@ version.google.android.material=1.2.1
version.google.dagger=2.37
version.io.reactivex.rxjava2..rxandroid=2.0.2
version.io.reactivex.rxjava2..rxjava=2.2.9
version.kotlin=1.4.10
version.kotlin=1.5.20
Copy link
Collaborator

@aitorvs aitorvs Jul 3, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we maybe remove the one we have in the main build.gradle and used this one. They are easy to get out of sync, in fact, they had different versions :/

build.gradle Outdated
@@ -16,7 +14,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:_"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aitorvs I think this is the way we can avoid having to duplicate the kotlin version in 2 files, but not 100% sure.

By executing ./gradlew buildEnvironment seems this will work: org.jetbrains.kotlin:kotlin-gradle-plugin:{require 1.5.20; reject _} -> 1.5.20, so I guess is ok

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's interesting! I seems it works because the _ is not really a valid version and then it falls back to any other (latest) version we might have. I think a more secure approach might be the following, in the root build.gradle

buildscript {
    def versionPropsFile = file('versions.properties')
    Properties versionProps = new Properties()

    if (versionPropsFile.canRead()) {
        versionProps.load(new FileInputStream(versionPropsFile))
    }

    ext.kotlin_version = versionProps['version.kotlin']
    ...

# Conflicts:
#	app/src/androidTest/java/com/duckduckgo/app/email/EmailInjectorJsTest.kt
@cmonfortep cmonfortep merged commit dd633eb into develop Jul 24, 2021
@cmonfortep cmonfortep deleted the feature/cristian/update_libraries branch July 24, 2021 16:25
@joshliebe joshliebe mentioned this pull request Aug 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants