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

Task: Update dependencies #36

Merged
merged 8 commits into from
Jun 29, 2023
Merged

Task: Update dependencies #36

merged 8 commits into from
Jun 29, 2023

Conversation

jarroyoesp
Copy link
Collaborator

@jarroyoesp jarroyoesp commented Jun 13, 2023

This branch depends on Master

Pull request checklist

  • I have rebased this branch on top of the destination branch (usually master)
  • I have executed locally ./gradlew spotlessApply check before creating the commit and it has run successfully
  • My contribution is fully baked and ready to be merged as is
  • I have performed a self-review of my own code
  • These changes are in compliance with the coding style of this project
  • There are no WIP commits in this PR
  • If there are changes to the UI, I have uploaded at least one screenshot of every UI change

Type of Changes

Type
🐛 Bug fix
✨ New feature
🔨 Refactoring
📜 Docs

Screenshots

NO UI changes

@jarroyoesp jarroyoesp force-pushed the task/update-dependencies branch from 0e943a2 to a5d4b72 Compare June 13, 2023 13:00
@jarroyoesp jarroyoesp force-pushed the task/update-dependencies branch 3 times, most recently from d7f73cc to cd42cb3 Compare June 14, 2023 07:45
@jarroyoesp jarroyoesp force-pushed the task/update-dependencies branch from cd42cb3 to 824e749 Compare June 14, 2023 08:21
@jarroyoesp jarroyoesp force-pushed the task/update-dependencies branch from e597eba to f459955 Compare June 16, 2023 09:48
@@ -407,7 +408,7 @@ jobs:
script: |
echo $GITHUB_REPOSITORY
adb devices
./gradlew connectedCheck
./gradlew app:connectedCheck
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

In case we run ./gradlew connectedCheck CI will run Integration tests on each module, and in case there is no test it will fail, and CI will complain. So we just have to run Integration tests inside app

@@ -390,7 +391,7 @@ jobs:

## Actual task
- name: Run Android tests on API ${{ matrix.api-level }} / ${{ matrix.arch }} / ${{ matrix.target }}
uses: reactivecircus/android-emulator-runner@v2
uses: reactivecircus/android-emulator-runner@v2.28.0
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

If you use reactivecircus/android-emulator-runner@v2 CI complains and is not green

@jarroyoesp jarroyoesp force-pushed the task/update-dependencies branch from d57ff64 to 66d0787 Compare June 16, 2023 14:04
@@ -41,3 +41,5 @@

# Dagger
-dontwarn com.google.errorprone.annotations.*

-dontwarn com.google.firebase.perf.network.FirebasePerfUrlConnection
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I had to add this, if not when I ran ./gradlew clean assemble bundle I got this error:

ERROR: Missing classes detected while running R8. Please add the missing classes or apply additional keep rules that are generated in /Users/javierarroyo/Projects/Personal/Forlago/app/build/outputs/mapping/release/missing_rules.txt.
ERROR: R8: Missing class com.google.firebase.perf.network.FirebasePerfUrlConnection (referenced from: java.util.List kotlinx.coroutines.internal.FastServiceLoader.parse(java.net.URL))

Copy link
Owner

Choose a reason for hiding this comment

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

Something feels wrong here: we don't have such rule in the Link proguard files.

package="com.leinardi.forlago">

<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I had to add this permission to avoid this error:

> Task :app:lintDebug FAILED
Lint found 1 errors, 3 warnings. First failure:

/Users/javierarroyo/Projects/Personal/Forlago/app/src/main/AndroidManifest.xml: Error: When targeting Android 13 or higher, posting a permission requires holding the POST_NOTIFICATIONS permission (usage from leakcanary.NotificationEventListener) [NotificationPermission]

   Explanation for issues of type "NotificationPermission":
   When targeting Android 13 and higher, posting permissions requires holding
   the runtime permission android.permission.POST_NOTIFICATIONS.

Copy link
Owner

Choose a reason for hiding this comment

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

This feels very wrong: we don't need this permission on release builds since leak canary is only needed for debug.

Copy link
Owner

Choose a reason for hiding this comment

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

The issue was due to not using the latest version of leak canary. Many deps were actually not updated, which is strange since this was the main purpose of this task.

@jarroyoesp jarroyoesp marked this pull request as ready for review June 19, 2023 09:38
@jarroyoesp jarroyoesp requested a review from leinardi as a code owner June 19, 2023 09:38
@@ -16,6 +16,6 @@

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-all.zip
Copy link
Owner

Choose a reason for hiding this comment

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

Please do not upgrade this file manually, but run the ./gradlew wrapper task, so that also the binary files will be upgraded (see the commit I'm about to push)

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.leinardi.forlago">

<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application
android:name=".Forlago"
android:allowBackup="false"

Choose a reason for hiding this comment

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

Reporter: Android Lint
Rule: DataExtractionRules
Severity: WARN
File: app/src/main/AndroidManifest.xml L20

Missing data extraction rules The attribute `android:allowBackup` is deprecated from Android 12 and higher and may be removed in future versions. Consider adding the attribute `android:dataExtractionRules` specifying an `@xml` resource which configures cloud backups and device transfers on Android 12 and higher. Before Android 12, the attributes `android:allowBackup` and `android:fullBackupContent` were used to configure all forms of backup, including cloud backups, device-to-device transfers and adb backup. In Android 12 and higher, these attributes have been deprecated and will only apply to cloud backups. You should instead use the attribute `android:dataExtractionRules`, specifying an `@xml` resource that configures which files to back up, for cloud backups and for device-to-device transfers, separately. If your `minSdkVersion` supports older versions, you'll still want to specify an `android:fullBackupContent` resource if the default behavior is not right for your app.

@leinardi leinardi merged commit 29e63a6 into master Jun 29, 2023
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.

2 participants