Kotlin-dsl-samples: JDK 9 Compatibility

Created on 25 Sep 2017  路  7Comments  路  Source: gradle/kotlin-dsl-samples

I'm trying to execute a task within my buildscript and I'm receiving unusual errors after switching to JDK 9. I believe this has something to do with the platform modules/modules in general.

Expected Behavior

On JDK 8, the buildscript functions as expected.

Current Behavior

Here's the error I'm getting:
> Configure project : e: Supertypes of the following classes cannot be resolved. Please make sure you have the required dependencies in the classpath: class org.gradle.api.Project, unresolved supertypes: Comparable<Project> class org.gradle.api.plugins.ExtensionAware, unresolved supertypes: Object class org.gradle.api.plugins.PluginAware, unresolved supertypes: Object class groovy.lang.Closure, unresolved supertypes: Cloneable, Runnable, Serializable class groovy.lang.GroovyObjectSupport, unresolved supertypes: Object class groovy.lang.GroovyObject, unresolved supertypes: Object class groovy.lang.GroovyCallable, unresolved supertypes: Callable<V> class org.gradle.api.Action, unresolved supertypes: Object class org.gradle.api.NamedDomainObjectFactory, unresolved supertypes: Object class org.gradle.api.NamedDomainObjectSet, unresolved supertypes: Set<T> class org.gradle.api.DomainObjectCollection, unresolved supertypes: Collection<T> class org.gradle.util.Configurable, unresolved supertypes: Object class org.gradle.api.Task, unresolved supertypes: Comparable<Task>

Steps to Reproduce (for bugs)


  1. Make sure you're using Gradle Kotlin DSL 0.11.1 with JDK 9.
  2. Download my buildscript.
  3. Generate the wrapper via gradle generateWrapper.
  4. Execute the greeting task via gradlew greeting.

Most helpful comment

Mid-October with Gradle 4.3.

All 7 comments

Duplicate of #454

This should probably be fixed in the next release.

Hi @PavanChohan,

0.11.1 didn't ship with support for JDK 9. It will be supported in the next release.

@bamboo Do you have any idea as to when the next release will be available?

Mid-October with Gradle 4.3.

@bamboo When is support for Java 9 modules coming? Thanks.

In what respect? Can you be a bit more specific with your question?

@JLLeitschuh Essentially what I'm doing with my projects is decoupling their code into separate modules. By doing this however, modules dependent on one another aren't found on the _module-path_ because the _compileKotlin_ configuration doesn't configure it appropriately.

I've tried using the experimental Java 9 plugin but it only works for Java projects.

I guess I could try to add the compiler args myself but I'm not too knowledgeable on doing so myself.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

eskatos picture eskatos  路  3Comments

jaredsburrows picture jaredsburrows  路  3Comments

mkobit picture mkobit  路  3Comments

AlexCzar picture AlexCzar  路  3Comments

deeprim picture deeprim  路  4Comments