build task流程

javaPluginTasks.png
资源目录自定义
sourceSets {
main {
java {
srcDirs = ['src/main/java']
}
resources {
srcDirs = ['src/main/resources']
}
}
}
依赖配置关系
| Name | Extends | Used by tasks | Meaning |
|---|---|---|---|
| compile | - | - | Compile time dependencies |
| compileOnly | - | - | Compile time only dependencies, not used at runtime |
| compileClasspath | compile, compileOnly | compileJava | Compile classpath, used when compiling source |
| runtime | compile | - | Runtime dependencies |
| testCompile | compile | - | Additional dependencies for compiling tests |
| testCompileOnly | - | - | Additional dependencies only for compiling tests, not used at runtime |
| testCompileClasspath | testCompile, testCompileOnly | compileTestJava | Test compile classpath, used when compiling test sources |
| testRuntime | runtime, testCompile | test | Additional dependencies for running tests only |
| archives | - | uploadArchives | Artifacts (e.g. jars) produced by this project |
| default | runtime | - | The default configuration used by a project dependency on this project. Contains the artifacts and dependencies required by this project at runtime. |
依赖配置关系图

javaPluginConfigurations.png