Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delombok fails: module not found #808

Open
dtrunk90 opened this issue Jun 9, 2023 · 0 comments
Open

Delombok fails: module not found #808

dtrunk90 opened this issue Jun 9, 2023 · 0 comments

Comments

@dtrunk90
Copy link

dtrunk90 commented Jun 9, 2023

Trying to build my project with following module-info.java:

module example {
    exports com.acme.example;

    requires static com.ibm.icu;
    requires static lombok;
}
plugins {
    alias(libs.plugins.lombok)
}

java {
    registerFeature('transliterator') {
        usingSourceSet sourceSets.main
    }
}

dependencies {
    transliteratorImplementation libs.icu4j
}
> Task :delombok
/home/danny/workspace/test/src/main/java/module-info.java:4: error: module not found: com.ibm.icu
    requires static com.ibm.icu;
                           ^
/home/danny/workspace/test/src/main/java/com/acme/example/Example.java:3: error: package com.ibm.icu.text is not visible
import com.ibm.icu.text.Transliterator;
                  ^
  (package com.ibm.icu.text is declared in the unnamed module, but module com.ibm.icu.text does not read it)

icu4j has no module-info.class but an Automatic-Module-Name attribute in its MANIFEST.MF. But I guess it's because the lib is not in the module path for :delombok, because the following works:

java -jar ~/Downloads/lombok.jar delombok --module-path ~/Downloads/icu4j-73.1.jar -d delombok src

With the following config at the end of my build file it seems to work but I'm not sure if this is the right way to solve this:

delombok {
    modulePath = sourceSets.main.compileClasspath
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant