У меня есть многомодульный проект Gradle. Подмодули:
- (консольное приложение)
Код: Выделить всё
telegram-forwarder-bot - (библиотека)
Код: Выделить всё
telegram-forwarder-starter - (библиотека)
Код: Выделить всё
telegram-forwarder-starter-logging - (библиотека)
Код: Выделить всё
telegram-forwarder-starter-reddit - (библиотека)
Код: Выделить всё
telegram-forwarder-starter-thymeleaf
Код: Выделить всё
jacocoПлагин Теперь я хочу агрегировать отчеты JaCoCo из подмодулей в один отчет.
Я применил плагин jacoco-report-aggregation и добавил следующий код в корневой файл build.gradle:
Код: Выделить всё
plugins {
id 'jacoco-report-aggregation'
}
dependencies {
jacocoAggregation project(':telegram-forwarder-bot')
}
reporting {
reports {
testCodeCoverageReport(JacocoCoverageReport) {
testSuiteName = "test"
}
}
}
Код: Выделить всё
[Incubating] Problems report is available at: file:///C:/Users/Yevhen/IdeaProjects/reddit-telegram-forwarder/build/reports/problems/problems-report.html
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':testCodeCoverageReport'.
> Could not resolve all dependencies for configuration ':aggregateCodeCoverageReportResults'.
> Could not resolve project :telegram-forwarder-bot.
Required by:
root project :
> Unable to find a matching variant of root project ::
- No variants exist.
* Try:
> Creating consumable variants is explained in more detail at https://docs.gradle.org/8.14.3/userguide/declaring_dependencies.html#sec:resolvable-consumable-configs.
> Review the variant matching algorithm at https://docs.gradle.org/8.14.3/userguide/variant_attributes.html#sec:abm_algorithm.
> 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 3s
Подробнее здесь: https://stackoverflow.com/questions/797 ... le-project
Мобильная версия