如何使用最新的R8 Shrinker版本 [英] How to use latest R8 Shrinker version

查看:66
本文介绍了如何使用最新的R8 Shrinker版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于一个错误,我使用了R8 Shrinker的本地jar文件(由R8团队建议),并在顶部gradle.build中添加了类路径:

Because of a bug, I have used local jar file for R8 Shrinker (as recommended by R8 team) with adding the classpath to top gradle.build :

classpath files($..../R8.jar/$)

现在,无论对Android Studio进行任何更新,Gradle构建都仍使用我在V. 1.4.55之前使用的旧版本的R8

Now regardless of any update to the Android Studio the Gradle build still using the old version of R8 that I have used before V. 1.4.55

最近我看到他们发布了最新版本:V. 1.4.69 https://r8.googlesource.com/r8/

Recently I'm seeing that they have published newest version: V. 1.4.69 https://r8.googlesource.com/r8/

所以我的问题是:如何配置gradle以告知使用最新版本的R8,因为我没有关于此的任何文档

So my question is: How to configure gradle to tell to use latest version of R8, because I don't see any documentation about this

推荐答案

您应添加以下内容:

buildscript {
    repositories {
        maven {
            url 'http://storage.googleapis.com/r8-releases/raw'
        }
    }
    dependencies {
        classpath 'com.android.tools:r8:1.4.71'  //Must be before the Gradle Plugin for Android. - Or any other version
        classpath 'com.android.tools.build:gradle:...'
     }
}

这篇关于如何使用最新的R8 Shrinker版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆