Update build + support Android 14 #4067
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Here's a PR to update the whole build config.
Furthermore it bumps the app to sdk level 34 and adds Android 14 support.
Besides gradle updates, here are the 10 points of the Android SDK Upgrade Assistant and what I think about their current status:
As the app is not using
SCHEDULE_EXACT_ALARM
, not relevantThe VpnService requires a service type, otherwise the app crashes. I chose
systemExcepted
as described here: https://developer.android.com/about/versions/14/changes/fgs-types-requiredI don't think the AdBlockingTileService does not a service type, because it's not a foreground service.
"Android 14 continues the work of refreshing Android's core libraries to align with the features in the latest OpenJDK LTS releases, including both library updates and Java 17 language support for app and platform developers. A few of these changes can affect app compatibility."
It seems
java.util.regex.Matcher
is used in some tests, could break the tests. Let's just let them run, right?"In some cases, the addition of the java.lang.ClassValue class causes an issue if you try to shrink, obfuscate, and optimize your app using ProGuard. If your app was developed against an older version of the runtime without the java.lang.ClassValue class available, then these optimizations might remove the computeValue method from classes derived from java.lang.ClassValue."
Just assuming it's not an issue
No implicit intents used, no mutable pending intents used
Added
No Dynamic Code Loading (DCL) used
Not sure, if AdAway launches intents from a background activity
No photos or videos are requested from the user
What do you think?
And should we directly update dependencies or do that in a separate step?