Skip to content

Commit

Permalink
gradle: fix archivePath deprecation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
CAMOBAP committed Nov 14, 2023
1 parent d1e73af commit 765d092
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sdk/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
}
Expand All @@ -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")
}
Expand Down

0 comments on commit 765d092

Please sign in to comment.