From ca92ad267dd2ea22605f06288965e3a748d5acf6 Mon Sep 17 00:00:00 2001 From: Adam Brown Date: Thu, 15 Sep 2022 12:35:20 +0100 Subject: [PATCH 1/7] excluding compile time legacy support annotations from dependencies --- vector/build.gradle | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/vector/build.gradle b/vector/build.gradle index f6db2a61df..7658b07833 100644 --- a/vector/build.gradle +++ b/vector/build.gradle @@ -177,7 +177,9 @@ dependencies { // UI implementation 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1' implementation libs.google.material - api 'me.gujun.android:span:1.7' + api('me.gujun.android:span:1.7') { + exclude group: 'com.android.support', module: 'support-annotations' + } implementation libs.markwon.core implementation libs.markwon.extLatex implementation libs.markwon.inlineParser @@ -225,7 +227,9 @@ dependencies { kapt libs.dagger.hiltCompiler // Analytics - implementation 'com.posthog.android:posthog:1.1.2' + implementation('com.posthog.android:posthog:1.1.2') { + exclude group: 'com.android.support', module: 'support-annotations' + } // UnifiedPush implementation 'com.github.UnifiedPush:android-connector:2.0.1' From c61df899b4136c56fa347164d0985fe6936ee82d Mon Sep 17 00:00:00 2001 From: Adam Brown Date: Thu, 15 Sep 2022 12:44:38 +0100 Subject: [PATCH 2/7] removing unused dependency --- dependencies_groups.gradle | 2 -- vector/build.gradle | 1 - 2 files changed, 3 deletions(-) diff --git a/dependencies_groups.gradle b/dependencies_groups.gradle index bcd737acc9..433bc53568 100644 --- a/dependencies_groups.gradle +++ b/dependencies_groups.gradle @@ -69,8 +69,6 @@ ext.groups = [ 'com.gabrielittner.threetenbp', 'com.getkeepsafe.relinker', 'com.github.bumptech.glide', - 'com.github.filippudak', - 'com.github.filippudak.progresspieview', 'com.github.javaparser', 'com.github.piasy', 'com.github.shyiko.klob', diff --git a/vector/build.gradle b/vector/build.gradle index 7658b07833..9780fae895 100644 --- a/vector/build.gradle +++ b/vector/build.gradle @@ -208,7 +208,6 @@ dependencies { // Image Loading implementation libs.github.bigImageViewer implementation libs.github.glideImageLoader - implementation libs.github.progressPieIndicator implementation libs.github.glideImageViewFactory // implementation 'com.github.MikeOrtiz:TouchImageView:3.0.2' From 4e992171646650c6bcfe281a6209818493125777 Mon Sep 17 00:00:00 2001 From: Adam Brown Date: Thu, 15 Sep 2022 13:41:57 +0100 Subject: [PATCH 3/7] excluding jitsi's android-scalablevideoview fork's support library - The library exports a jetified artifact but doesn't remove the support library dependency /home/adam/dev/element/element-android/vector/build.gradle --- vector/build.gradle | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/vector/build.gradle b/vector/build.gradle index 9780fae895..069295be3d 100644 --- a/vector/build.gradle +++ b/vector/build.gradle @@ -100,7 +100,6 @@ android { viewBinding true } } - dependencies { implementation project(":vector-config") api project(":matrix-sdk-android") @@ -240,6 +239,19 @@ dependencies { // implementation 'org.webrtc:google-webrtc:1.0.+' implementation('com.facebook.react:react-native-webrtc:1.94.2-jitsi-10227332@aar') + // Exclude jitsi's android-scalablevideoview fork's support library + // The library exports a jetified artifact but doesn't remove the support library dependency + // https://github.com/MatrixFrog/Android-ScalableVideoView/blob/master/gradle.properties#L1 + components { + withModule("com.github.MatrixFrog:android-scalablevideoview") { + allVariants { + withDependencies { + removeAll { it.group == "com.android.support" && it.name == "appcompat-v7" } + } + } + } + } + // Jitsi api('org.jitsi.react:jitsi-meet-sdk:5.0.2') { exclude group: 'com.google.firebase' @@ -247,6 +259,7 @@ dependencies { exclude group: 'com.android.installreferrer' } + // QR-code // Stick to 3.3.3 because of https://github.com/zxing/zxing/issues/1170 implementation 'com.google.zxing:core:3.3.3' From 1d8b4ce63b743617c44be83f3779f3f5f4ea2ee6 Mon Sep 17 00:00:00 2001 From: Adam Brown Date: Thu, 15 Sep 2022 13:42:43 +0100 Subject: [PATCH 4/7] excluding support annotations from jsonviewer module dependency --- library/jsonviewer/build.gradle | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/library/jsonviewer/build.gradle b/library/jsonviewer/build.gradle index ad472b0b54..fcad3f1087 100644 --- a/library/jsonviewer/build.gradle +++ b/library/jsonviewer/build.gradle @@ -55,8 +55,9 @@ dependencies { implementation libs.airbnb.mavericks // Span utils - implementation 'me.gujun.android:span:1.7' - + implementation('me.gujun.android:span:1.7') { + exclude group: 'com.android.support', module: 'support-annotations' + } implementation libs.jetbrains.coroutinesCore implementation libs.jetbrains.coroutinesAndroid From be9c9f1640a9075ae9e4edd24f5a6b36bea129f6 Mon Sep 17 00:00:00 2001 From: Adam Brown Date: Thu, 15 Sep 2022 13:46:12 +0100 Subject: [PATCH 5/7] formatting --- vector/build.gradle | 1 - 1 file changed, 1 deletion(-) diff --git a/vector/build.gradle b/vector/build.gradle index 069295be3d..7d0263f236 100644 --- a/vector/build.gradle +++ b/vector/build.gradle @@ -259,7 +259,6 @@ dependencies { exclude group: 'com.android.installreferrer' } - // QR-code // Stick to 3.3.3 because of https://github.com/zxing/zxing/issues/1170 implementation 'com.google.zxing:core:3.3.3' From ae50f5a006f4c73af35a373f569edd1ca666a585 Mon Sep 17 00:00:00 2001 From: Adam Brown Date: Thu, 15 Sep 2022 14:05:51 +0100 Subject: [PATCH 6/7] adding changelog entry --- changelog.d/7140.misc | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/7140.misc diff --git a/changelog.d/7140.misc b/changelog.d/7140.misc new file mode 100644 index 0000000000..8f364e59bc --- /dev/null +++ b/changelog.d/7140.misc @@ -0,0 +1 @@ +Exclude legacy android support annotation library From 11e6ca178493c84ccc295415000ac083af2a88d1 Mon Sep 17 00:00:00 2001 From: Adam Brown Date: Fri, 16 Sep 2022 12:16:03 +0100 Subject: [PATCH 7/7] moving the jitsi exclude directly to the dependency so that other modules also get the exclusion - also excludes the support dependency from the barcode scanner --- vector/build.gradle | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/vector/build.gradle b/vector/build.gradle index 7d0263f236..ac3699454c 100644 --- a/vector/build.gradle +++ b/vector/build.gradle @@ -239,30 +239,27 @@ dependencies { // implementation 'org.webrtc:google-webrtc:1.0.+' implementation('com.facebook.react:react-native-webrtc:1.94.2-jitsi-10227332@aar') - // Exclude jitsi's android-scalablevideoview fork's support library - // The library exports a jetified artifact but doesn't remove the support library dependency - // https://github.com/MatrixFrog/Android-ScalableVideoView/blob/master/gradle.properties#L1 - components { - withModule("com.github.MatrixFrog:android-scalablevideoview") { - allVariants { - withDependencies { - removeAll { it.group == "com.android.support" && it.name == "appcompat-v7" } - } - } - } - } - // Jitsi api('org.jitsi.react:jitsi-meet-sdk:5.0.2') { exclude group: 'com.google.firebase' exclude group: 'com.google.android.gms' exclude group: 'com.android.installreferrer' + + // Exclude jitsi's android-scalablevideoview fork's support library + // The library exports a jetified artifact but doesn't remove the support library dependency + // https://github.com/MatrixFrog/Android-ScalableVideoView/blob/master/gradle.properties#L1 + exclude group: 'com.android.support', module: 'appcompat-v7' } // QR-code // Stick to 3.3.3 because of https://github.com/zxing/zxing/issues/1170 implementation 'com.google.zxing:core:3.3.3' - implementation 'me.dm7.barcodescanner:zxing:1.9.13' + + // Excludes the legacy support library annotation usages + // https://github.com/dm77/barcodescanner/blob/d036996c8a6f36a68843ffe539c834c28944b2d5/core/src/main/java/me/dm7/barcodescanner/core/CameraWrapper.java#L4 + implementation ('me.dm7.barcodescanner:zxing:1.9.13') { + exclude group: 'com.android.support', module: 'support-v4' + } // Emoji Keyboard api libs.vanniktech.emojiMaterial