Skip to content

Cannot use CompileModuleOptions with compileJava task : Extension of type 'CompileModuleOptions' does not exist. Currently registered extension types: [ExtraPropertiesExtension] #274

Description

@dweil

I'm trying to use tje CompileModuleOptions to add Javafx modules for test and exec task but it failed when compile gradle script.
I'm using Kotlin, Java 17 and gradle 8.3.
When adding the following lines to my kotlin script :

plugins {
    id("org.javamodularity.moduleplugin") version "1.8.15"
}
...
tasks.compileJava {
    extensions.configure<CompileModuleOptions> {
        addModules = listOf("jdk.jdwp.agent")
    }
}

I get the following error message
Extension of type 'CompileModuleOptions' does not exist. Currently registered extension types: [ExtraPropertiesExtension]

Can

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions