any suggestions for plugins to detect unused depen...
# gradle
w
any suggestions for plugins to detect unused dependencies in a kotlin DSL android project? I have seen https://github.com/Faire/gradle-kotlin-buildozer but I get an error about needing java 16
Copy code
Incompatible because this component declares an API of a component compatible with Java 16 and the consumer needed a runtime of a component compatible with Java 11
any other suggestions to try?
m
Does
gradle-kotlin-buildozer
really requires Java16 ?
There's an issue that by default, Gradle will use the version of java that was used to build the lib as the required version while that's not always the case
w
just looked in their build.gradle and i see
Copy code
java {
  toolchain {
    languageVersion.set(JavaLanguageVersion.of(16))
  }
}
not sure why though
so seems intentional at least
m
Java16 can generate JDK8 compatible bytecode. Usually that's what you want as a lib author to have the widest compatibility as possible
I'd open an issue on this repo to confirm this was intentional.
w
yeah good idea
v
❤️ 1
m
Looks like buildozer is a Kotlin fork of Tony's plugin
v
m
Ooohhh right, I misread 🤦‍♂️ . Yea +1 to
<https://github.com/autonomousapps/dependency-analysis-android-gradle-plugin|dependency-analysis-android-gradle-plugin>
. I was expecting this one too much 🙂
w
checking it out now android dance
v
Is
gradle-dependency-analzye
and
gradle-kotlin-buildozer
even Android optimized? Their readmes don't mention it while Tony explicitly states support. Could be red herring though of course 🙂
655 Views