Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get version of R8 that is being used by the Android Gradle Plugin?

How can I find out which version of R8 is being used by the Android Gradle Plugin for let's say 4.0.1?

buildscript {
  repositories {
    google()
    mavenCentral()
  }
  dependencies {
    classpath 'com.android.tools.build:gradle:4.0.1'
  }
}
like image 380
Niklas Avatar asked Mar 01 '23 20:03

Niklas


1 Answers

This can be done by writing println(com.android.tools.r8.Version.getVersionString()) anywhere in your Gradle script and executing any Gradle Task or just calling the Gradle Wrapper.

buildscript {
  repositories {
    google()
    mavenCentral()
  }
  dependencies {
    classpath 'com.android.tools.build:gradle:4.0.1'
  }
}

println(com.android.tools.r8.Version.getVersionString())

Output:

$ ./gradlew

2.0.88 (build 19b089a1d5a73df8f00a27fda8b29b49782c621c from go/r8bot (luci-r8-ci-archive-0-z0tz))
like image 170
Niklas Avatar answered Apr 27 '23 04:04

Niklas