Skip to content

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

@dweil

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

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