From 765d092362cb4f5bf349b7cf633923dc14e0497c Mon Sep 17 00:00:00 2001 From: Alexande B Date: Tue, 14 Nov 2023 23:57:39 +0100 Subject: [PATCH] gradle: fix archivePath deprecation warning --- sdk/build.gradle | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sdk/build.gradle b/sdk/build.gradle index 2407aa6..5a02fe3 100644 --- a/sdk/build.gradle +++ b/sdk/build.gradle @@ -133,8 +133,8 @@ android.libraryVariants.all { variant -> dependsOn variant.packageLibraryProvider doFirst { - String aarPath = variant.packageLibraryProvider.get().archivePath - long aarSizeKb = file(aarPath).length() / 1024 + var aarPath = variant.packageLibraryProvider.get().archiveFile.get().getAsFile() + long aarSizeKb = aarPath.length() / 1024 println("File ${aarPath} is ${aarSizeKb}Kbyte") } } @@ -145,8 +145,8 @@ android.libraryVariants.all { variant -> dependsOn variant.packageLibraryProvider doFirst { - String aarPath = variant.packageLibraryProvider.get().archivePath - long aarSizeKb = file(aarPath).length() / 1024 + var aarFile = variant.packageLibraryProvider.get().archiveFile.get().getAsFile() + long aarSizeKb = aarFile.length() / 1024 if (aarSizeKb > MAX_AAR_SIZE_KB) { throw new GradleException("${aarPath} size exceeded! ${aarSizeKb}Kbyte > ${MAX_AAR_SIZE_KB}Kbyte") }