From ef5eb5bca8629d990a58cfe627f9a3363fde39d7 Mon Sep 17 00:00:00 2001 From: MohitMaliFtechiz Date: Tue, 31 Dec 2024 14:41:55 +0530 Subject: [PATCH] Disabled the dependencies metadata for Singed APK. * Added comments in build.gradle.kts file of app module to inform devs why this is required and why we have disable this for APKs. --- app/build.gradle.kts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 3ce7bbb88..eb0ec5e9f 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -87,6 +87,27 @@ android { java.srcDirs("$rootDir/core/src/sharedTestFunctions/java") } } + // By default, Android generates dependency metadata (a file containing information + // about all the dependencies used in the project) and includes it in both APKs and app bundles. + // This metadata is particularly useful for the Google Play Store, as it provides actionable + // feedback on potential issues with project dependencies. However, other platforms cannot + // utilize this metadata. For example, platforms like IzzyOnDroid, GitHub, and our website do not + // require or utilize the metadata. + // Since we only upload app bundles to the Play Store for kiwix app, dependency metadata + // is enabled for app bundles to leverage Google Play Store's analysis + // and feedback. For APKs distributed outside the Play Store, we exclude this metadata + // as they do not require this. + // See https://github.com/kiwix/kiwix-android/issues/4053#issuecomment-2456951610 for details. + dependenciesInfo { + // Disables dependency metadata when building APKs. + // This is for the signed APKs posted on IzzyOnDroid, GitHub, and our website, + // where dependency metadata is not required or utilized. + includeInApk = false + // Enables dependency metadata when building Android App Bundles. + // This is specifically for the Google Play Store, where dependency metadata + // is analyzed to provide actionable feedback on potential issues with dependencies. + includeInBundle = true + } } play {