使用Gradle下载Cronet,自动计算md5

pull/1276/head
ag2s20150909 3 years ago
parent 5e63f271c7
commit 44df25f804
  1. 2
      app/download.gradle

@ -16,7 +16,7 @@ static def generateMD5(final file) {
MessageDigest digest = MessageDigest.getInstance("MD5") MessageDigest digest = MessageDigest.getInstance("MD5")
file.withInputStream() { is -> file.withInputStream() { is ->
byte[] buffer = new byte[1024] byte[] buffer = new byte[1024]
//int numRead = 0 int numRead = 0
while ((numRead = is.read(buffer)) > 0) { while ((numRead = is.read(buffer)) > 0) {
digest.update(buffer, 0, numRead) digest.update(buffer, 0, numRead)
} }

Loading…
Cancel
Save