Gradle参数

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
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • Spring Cloud为开发人员提供了快速构建分布式系统中一些常见模式的工具(例如配置管理,服务发现,断路器,智...
    卡卡罗2017阅读 135,800评论 19 139
  • Android 自定义View的各种姿势1 Activity的显示之ViewRootImpl详解 Activity...
    passiontim阅读 175,900评论 25 709
  • Spring Boot 参考指南 介绍 转载自:https://www.gitbook.com/book/qbgb...
    毛宇鹏阅读 47,118评论 6 342
  • 久久是在一个咖啡馆里认识前任的。那一天,久久下课,等师妹一起去旧书店海淘的时候,正好在咖啡馆里上上网,改改...
    渔人子木阅读 3,325评论 4 4
  • 俗语说“十五的月亮十六圆”,这本是一种天文现象,却越来越被人们解读为迟到的祝福和错过的美丽。月亮自古以来被...
    尘寞阅读 2,206评论 7 16