Search code examples
gradlebuildjava-8guavajava-9

missing library after update to java 1.9


I want to understand why after updating from Java8 to Java9, I need to specify in build.gradle (Gradle Version: 4.5.1 ):

compile group: 'com.google.guava', name: 'guava', version: '24.0-jre'

[EDIT]: Yes it might sound odd but running gradle with Java 1.8 I builded. Running it with Java 1.9 I needed to add the dependency in the build.gradle file.

Java8: jdk1.8.0_162 builded.

Java9: jdk-9.0.4 did not.

package com.google.common.cache does not exist

Is there an obviously answer that I did not notice?


Solution

  • it does not have nothing to do with java 9.

    There is a dependency which has changed and does not include guava anymore.

    Thats why guava must be explicity declared.