Зависимость X используется и объявляется в подпроекте A.
Подпроект B зависит от подпроекта A.Сборка завершается неудачей, поскольку в подпроекте B отсутствует зависимость X.
Изменить I: почему сборка завершается неудачно? Только A должна нуждаться в зависимости. Это сообщение об ошибке в :subprojectB:compileJava, где SomeClass происходит из X.
Код: Выделить всё
C:\...\ClassSubpojectB.java:86: error: cannot access SomeClass
//some code
^
class file for SomeClass not found
1 error
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':subprojectB:compileJava'.
> Compilation failed; see the compiler error output for details.
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 1m 53s
Код: Выделить всё
Bla bla = Dao.get(Bla .class, new Key("id", id));
Код: Выделить всё
public static O get(Class c, Key key) {
SomeClass s = key.getSomeClass();
return get(c, s);
}
Подробнее здесь: https://stackoverflow.com/questions/793 ... s-not-used