Update AGP to 7.4.0 (#5655)

This commit is contained in:
Taco 2023-04-01 17:16:53 -04:00 committed by GitHub
parent 8c9b61e599
commit 78f65349d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
16 changed files with 41 additions and 29 deletions

View File

@ -1,6 +1,6 @@
plugins { plugins {
id('com.android.application') id('com.android.application')
id('com.github.triplet.play') version '3.7.0-agp4.2' apply false id('com.github.triplet.play') version '3.7.0' apply false
} }
apply from: "../common.gradle" apply from: "../common.gradle"
apply from: "../playFlavor.gradle" apply from: "../playFlavor.gradle"
@ -56,23 +56,19 @@ android {
} }
} }
lintOptions { lint {
disable 'ObsoleteLintCustomCheck', 'CheckResult', 'UnusedAttribute', 'BatteryLife', 'InflateParams', disable 'ObsoleteLintCustomCheck', 'CheckResult', 'UnusedAttribute', 'BatteryLife', 'InflateParams',
'RestrictedApi', 'TrustAllX509TrustManager', 'ExportedReceiver', 'AllowBackup', 'VectorDrawableCompat', 'RestrictedApi', 'TrustAllX509TrustManager', 'ExportedReceiver', 'AllowBackup', 'VectorDrawableCompat',
'StaticFieldLeak', 'UseCompoundDrawables', 'NestedWeights', 'Overdraw', 'UselessParent', 'TextFields', 'StaticFieldLeak', 'UseCompoundDrawables', 'NestedWeights', 'Overdraw', 'UselessParent', 'TextFields',
'AlwaysShowAction', 'Autofill', 'ClickableViewAccessibility', 'ContentDescription', 'AlwaysShowAction', 'Autofill', 'ClickableViewAccessibility', 'ContentDescription',
'KeyboardInaccessibleWidget', 'LabelFor', 'SetTextI18n', 'HardcodedText', 'RelativeOverlap', 'KeyboardInaccessibleWidget', 'LabelFor', 'SetTextI18n', 'HardcodedText', 'RelativeOverlap',
'RtlCompat', 'RtlHardcoded', 'MissingMediaBrowserServiceIntentFilter', 'VectorPath', 'RtlCompat', 'RtlHardcoded', 'MissingMediaBrowserServiceIntentFilter', 'VectorPath',
'InvalidPeriodicWorkRequestInterval' 'InvalidPeriodicWorkRequestInterval', 'NotifyDataSetChanged', 'RtlEnabled'
} }
aaptOptions { androidResources {
additionalParameters "--no-version-vectors" additionalParameters "--no-version-vectors"
} }
dexOptions {
jumboMode true
}
} }
dependencies { dependencies {

View File

@ -76,7 +76,6 @@
<activity <activity
android:name=".activity.SplashActivity" android:name=".activity.SplashActivity"
android:label="@string/app_name"
android:configChanges="keyboardHidden|orientation|screenSize" android:configChanges="keyboardHidden|orientation|screenSize"
android:exported="true"> android:exported="true">
<intent-filter> <intent-filter>
@ -99,7 +98,6 @@
android:configChanges="keyboardHidden|orientation|screenSize|smallestScreenSize|screenLayout|density|uiMode|keyboard|navigation" android:configChanges="keyboardHidden|orientation|screenSize|smallestScreenSize|screenLayout|density|uiMode|keyboard|navigation"
android:windowSoftInputMode="stateAlwaysHidden" android:windowSoftInputMode="stateAlwaysHidden"
android:launchMode="singleTask" android:launchMode="singleTask"
android:label="@string/app_name"
android:exported="true"> android:exported="true">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.VIEW" /> <action android:name="android.intent.action.VIEW" />
@ -111,14 +109,21 @@
android:host="antennapod.org" android:host="antennapod.org"
android:pathPrefix="/deeplink/main" android:pathPrefix="/deeplink/main"
android:scheme="https" /> android:scheme="https" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data <data
android:host="antennapod.org" android:host="antennapod.org"
android:pathPrefix="/deeplink/search" android:pathPrefix="/deeplink/search"
android:scheme="https" /> android:scheme="https" />
</intent-filter> </intent-filter>
<intent-filter> <intent-filter>
<action android:name="de.danoeh.antennapod.intents.MAIN_ACTIVITY" />
<category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.DEFAULT" />
<action android:name="de.danoeh.antennapod.intents.MAIN_ACTIVITY" />
<action android:name="android.service.quicksettings.action.QS_TILE_PREFERENCES"/> <action android:name="android.service.quicksettings.action.QS_TILE_PREFERENCES"/>
</intent-filter> </intent-filter>
</activity> </activity>
@ -382,6 +387,7 @@
</provider> </provider>
<meta-data <meta-data
tools:ignore="Deprecated"
android:name="com.google.android.actions" android:name="com.google.android.actions"
android:resource="@xml/actions" /> android:resource="@xml/actions" />
</application> </application>

View File

@ -5,7 +5,7 @@ buildscript {
gradlePluginPortal() gradlePluginPortal()
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:4.2.2' classpath 'com.android.tools.build:gradle:7.4.0'
classpath "gradle.plugin.com.github.spotbugs.snom:spotbugs-gradle-plugin:4.7.0" classpath "gradle.plugin.com.github.spotbugs.snom:spotbugs-gradle-plugin:4.7.0"
classpath 'org.codehaus.groovy:groovy-xml:3.0.9' classpath 'org.codehaus.groovy:groovy-xml:3.0.9'
} }

View File

@ -24,16 +24,17 @@ android {
} }
packagingOptions { packagingOptions {
exclude "META-INF/LICENSE.txt" resources {
exclude "META-INF/NOTICE.txt" excludes += ["META-INF/LICENSE.txt",
// Extraneous jsoup files "META-INF/NOTICE.txt",
exclude "META-INF/CHANGES" "META-INF/CHANGES",
exclude "META-INF/README.md" "META-INF/README.md"]
}
} }
compileOptions { compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8 sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_11
} }
testOptions { testOptions {
@ -43,7 +44,7 @@ android {
} }
} }
lintOptions { lint {
disable "GradleDependency" disable "GradleDependency"
checkDependencies true checkDependencies true
warningsAsErrors true warningsAsErrors true

View File

@ -5,7 +5,7 @@ apply from: "../common.gradle"
apply from: "../playFlavor.gradle" apply from: "../playFlavor.gradle"
android { android {
lintOptions { lint {
disable "InvalidPeriodicWorkRequestInterval", "ObsoleteLintCustomCheck", "DefaultLocale", "UnusedAttribute", disable "InvalidPeriodicWorkRequestInterval", "ObsoleteLintCustomCheck", "DefaultLocale", "UnusedAttribute",
"ParcelClassLoader", "CheckResult", "TrustAllX509TrustManager", "ParcelClassLoader", "CheckResult", "TrustAllX509TrustManager",
"StaticFieldLeak", "IconDensities", "IconDuplicates" "StaticFieldLeak", "IconDensities", "IconDuplicates"

View File

@ -2,6 +2,7 @@ package de.danoeh.antennapod.core.service.playback;
import static de.danoeh.antennapod.model.feed.FeedPreferences.SPEED_USE_GLOBAL; import static de.danoeh.antennapod.model.feed.FeedPreferences.SPEED_USE_GLOBAL;
import android.annotation.SuppressLint;
import android.app.NotificationManager; import android.app.NotificationManager;
import android.app.PendingIntent; import android.app.PendingIntent;
import android.app.Service; import android.app.Service;
@ -540,6 +541,7 @@ public class PlaybackService extends MediaBrowserServiceCompat {
} }
} }
@SuppressLint("LaunchActivityFromNotification")
private void displayStreamingNotAllowedNotification(Intent originalIntent) { private void displayStreamingNotAllowedNotification(Intent originalIntent) {
Intent intentAllowThisTime = new Intent(originalIntent); Intent intentAllowThisTime = new Intent(originalIntent);
intentAllowThisTime.setAction(PlaybackServiceInterface.EXTRA_ALLOW_STREAM_THIS_TIME); intentAllowThisTime.setAction(PlaybackServiceInterface.EXTRA_ALLOW_STREAM_THIS_TIME);

View File

@ -1,4 +1,4 @@
android.useAndroidX=true android.useAndroidX=true
android.enableJetifier=true android.enableJetifier=true
android.jetifier.blacklist=bcprov-jdk15on android.jetifier.ignorelist=bcprov-jdk15on
org.gradle.jvmargs=-Xmx4096m org.gradle.jvmargs=-Xmx4096m

View File

@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists

View File

@ -5,7 +5,7 @@ plugins {
apply from: "../../../common.gradle" apply from: "../../../common.gradle"
android { android {
lintOptions { lint {
disable 'ParcelClassLoader' disable 'ParcelClassLoader'
} }
} }

View File

@ -1,5 +1,7 @@
package de.danoeh.antennapod.net.ssl; package de.danoeh.antennapod.net.ssl;
import android.annotation.SuppressLint;
import javax.net.ssl.X509TrustManager; import javax.net.ssl.X509TrustManager;
import java.security.cert.CertificateException; import java.security.cert.CertificateException;
import java.security.cert.X509Certificate; import java.security.cert.X509Certificate;
@ -12,6 +14,7 @@ import java.util.List;
* trusts a certificate chain, then it is trusted by the composite manager. * trusts a certificate chain, then it is trusted by the composite manager.
* Based on https://stackoverflow.com/a/16229909 * Based on https://stackoverflow.com/a/16229909
*/ */
@SuppressLint("CustomX509TrustManager")
public class CompositeX509TrustManager implements X509TrustManager { public class CompositeX509TrustManager implements X509TrustManager {
private final List<X509TrustManager> trustManagers; private final List<X509TrustManager> trustManagers;

View File

@ -1,5 +1,5 @@
android { android {
flavorDimensions "market" flavorDimensions += ["market"]
productFlavors { productFlavors {
free { free {
dimension "market" dimension "market"

View File

@ -1,5 +1,6 @@
package de.danoeh.antennapod.playback.cast; package de.danoeh.antennapod.playback.cast;
import android.annotation.SuppressLint;
import android.content.Context; import android.content.Context;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import com.google.android.gms.cast.framework.CastOptions; import com.google.android.gms.cast.framework.CastOptions;
@ -9,6 +10,7 @@ import com.google.android.gms.cast.framework.SessionProvider;
import java.util.List; import java.util.List;
@SuppressWarnings("unused") @SuppressWarnings("unused")
@SuppressLint("VisibleForTests")
public class CastOptionsProvider implements OptionsProvider { public class CastOptionsProvider implements OptionsProvider {
@Override @Override
@NonNull @NonNull

View File

@ -1,5 +1,6 @@
package de.danoeh.antennapod.playback.cast; package de.danoeh.antennapod.playback.cast;
import android.annotation.SuppressLint;
import android.content.Context; import android.content.Context;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import android.util.Log; import android.util.Log;
@ -36,6 +37,7 @@ import org.greenrobot.eventbus.EventBus;
/** /**
* Implementation of PlaybackServiceMediaPlayer suitable for remote playback on Cast Devices. * Implementation of PlaybackServiceMediaPlayer suitable for remote playback on Cast Devices.
*/ */
@SuppressLint("VisibleForTests")
public class CastPsmp extends PlaybackServiceMediaPlayer { public class CastPsmp extends PlaybackServiceMediaPlayer {
public static final String TAG = "CastPSMP"; public static final String TAG = "CastPSMP";

View File

@ -4,8 +4,8 @@ plugins {
apply from: "../../common.gradle" apply from: "../../common.gradle"
android { android {
lintOptions { lint {
disable "StaticFieldLeak" disable "StaticFieldLeak", "StringFormatCount", "StringFormatMatches", "StringFormatInvalid", "PluralsCandidate", "StringFormatTrivial"
} }
} }

View File

@ -4,7 +4,7 @@ plugins {
apply from: "../../common.gradle" apply from: "../../common.gradle"
android { android {
lintOptions { lint {
disable "StaticFieldLeak" disable "StaticFieldLeak"
} }
} }

View File

@ -4,7 +4,7 @@ plugins {
apply from: "../../common.gradle" apply from: "../../common.gradle"
android { android {
lintOptions { lint {
disable "Typos", "ExtraTranslation", "ImpliedQuantity", disable "Typos", "ExtraTranslation", "ImpliedQuantity",
"PluralsCandidate", "UnusedQuantity", "TypographyEllipsis" "PluralsCandidate", "UnusedQuantity", "TypographyEllipsis"
} }