[英]What is the difference between gradlew assemble and gradlew compile
I noticed that 我注意到
./gradlew tasks
for my android project gives me assemble*
and compile*
tasks. 为我的android项目提供了
assemble*
和compile*
任务。
What is the difference? 有什么区别?
I also noticed that the command lists the tasks compileDemoDebugSources
as well as compileDemoReleaseSources
(where demo
is a flavor and release
is a build type) but only assembleDemo
(instead of assembleDemoDebug
and assembleDemoRelease
) -- however the latter two work just as fine. 我还注意到该命令列出了任务
compileDemoDebugSources
以及compileDemoReleaseSources
(其中demo
是一种风味, release
是一种构建类型),但仅包含assembleDemo
(而不是assembleDemoDebug
和assembleDemoRelease
),但是后两项工作一样好。 Why is that? 这是为什么?
From official manual: 从官方手册:
|---------------------|-----------------------------|
| Task | Description -----------|
|---------------------|-----------------------------|
| compileJava | Compiles production Java |
| | source files using javac |
|---------------------|-----------------------------|
| assemble | Assembles all the archives |
| | in the project |
|---------------------|-----------------------------|
To investigate further, read Gradle 4.0 documentation: 要进一步调查,请阅读Gradle 4.0文档:
PS drkstr1 has already mentioned main differences in the comment. PS drkstr1已经在评论中提到了主要区别。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.