我正在为构建环境设置一个新的build.gradle。 为此,我想将现有的makefiles目标转换为gradle目标
以下代码属于makefile:
Default: Dest
@${ECHO} ""
@${ECHO} "Done building ${COMPONENT_NAME} $@."
Dest: Dest-Native
@${ECHO} ""
@${ECHO} "Done building ${COMPONENT_NAME} $@."
Clean: All-Dirs Clean-Native
All-Dirs :
@${ECHO} ""
@${ECHO} "Done building ${COMPONENT_NAME} $@."
Clean-Native :
@${ECHO} ""
@${ECHO} "Done building ${COMPONENT_NAME} $@."
请帮助我找到解决方案。
答案 0 :(得分:0)
查看gradle官方教程:
https://docs.gradle.org/current/userguide/tutorial_using_tasks.html
简单任务定义:
task hello {
doLast {
println 'Hello world!'
}
}
task intro {
dependsOn hello
doLast {
println "I'm Gradle"
}
}
因此,命令行gradle intro
将执行hello
和intro
任务
#a_gradle>gradle intro
Starting a Gradle Daemon (subsequent builds will be faster)
> Task :hello
Hello world!
> Task :intro
I'm Gradle