Модули не найдены, которые требуются в module-info.java - PullRequest
0 голосов
/ 10 декабря 2018

Все необходимые модули, которые я объявил в module-info.java, не обнаруживаются при запуске gradle:

/Users/Joseph/eclipse-workspace/CheckMyDigitalFootprint/src/main/java/module-info.java:10: error: module not found: com.jfoenix
        requires com.jfoenix;
                    ^
/Users/Joseph/eclipse-workspace/CheckMyDigitalFootprint/src/main/java/module-info.java:11: error: module not found: google.api.client
        requires google.api.client;
                           ^
/Users/Joseph/eclipse-workspace/CheckMyDigitalFootprint/src/main/java/module-info.java:12: error: module not found: google.api.services.gmail.v1.rev83
        requires google.api.services.gmail.v1.rev83;
                                             ^
/Users/Joseph/eclipse-workspace/CheckMyDigitalFootprint/src/main/java/module-info.java:13: error: module not found: google.http.client
        requires google.http.client;
                            ^
/Users/Joseph/eclipse-workspace/CheckMyDigitalFootprint/src/main/java/module-info.java:14: error: module not found: google.http.client.jackson2
        requires google.http.client.jackson2;
                                   ^
/Users/Joseph/eclipse-workspace/CheckMyDigitalFootprint/src/main/java/module-info.java:15: error: module not found: google.oauth.client
        requires google.oauth.client;
                             ^
/Users/Joseph/eclipse-workspace/CheckMyDigitalFootprint/src/main/java/module-info.java:16: error: module not found: google.oauth.client.java6
        requires google.oauth.client.java6;
                                    ^
/Users/Joseph/eclipse-workspace/CheckMyDigitalFootprint/src/main/java/module-info.java:17: error: module not found: google.oauth.client.jetty
        requires google.oauth.client.jetty;
                                    ^
/Users/Joseph/eclipse-workspace/CheckMyDigitalFootprint/src/main/java/module-info.java:18: error: module not found: java.xml.bind
        requires java.xml.bind;
                         ^
/Users/Joseph/eclipse-workspace/CheckMyDigitalFootprint/src/main/java/module-info.java:23: error: module not found: org.json
        requires org.json;

module-info.java:

module footprint {

    requires com.jfoenix;
    requires google.api.client;
    requires google.api.services.gmail.v1.rev83;
    requires google.http.client;
    requires google.http.client.jackson2;
    requires google.oauth.client;
    requires google.oauth.client.java6;
    requires google.oauth.client.jetty;
    requires java.xml.bind;
    requires transitive javafx.base;
    requires javafx.controls;
    requires javafx.fxml;
    requires transitive javafx.graphics;
    requires org.json;
    requires java.prefs;

    opens checkmydigitalfootprint to javafx.fxml;


    exports checkmydigitalfootprint.util;
    exports checkmydigitalfootprint;
    exports checkmydigitalfootprint.model;
    exports checkmydigitalfootprint.view;
}

Структура папки:

enter image description here

1 Ответ

0 голосов
/ 10 декабря 2018

Вы, вероятно, должны убедиться, что изменили задачу compileJava как:

compileJava {
    inputs.property("moduleName", moduleName)
    doFirst {
        options.compilerArgs = [
            '--module-path', classpath.asPath,
        ]
        classpath = files()  
    }
}
...