У меня есть следующая структура проекта:
- application
- build.gradle
- build.gradle
- настройки .градле
application/build.gradle:
apply plugin: 'java'
settings.gradle:
include ':application'
build.gradle:
task custom << {
project.tasks.getByName("build").execute()
}
Итак, я хочу выполнить задачу «сборка» внутри задачи «на заказ». Но когда я запускаю «градуированный заказ», результат:
:custom FAILED
FAILURE: Build failed with an exception.
* Where:
Build file '/tmp/test/build.gradle' line: 3
* What went wrong:
Execution failed for task ':custom'.
> Task with name 'build' not found in root project 'test'.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 1.183 secs
Как я могу выполнить задачу «сборка» внутри задачи «на заказ»?