美文网首页
Gradle参数

Gradle参数

作者: Harlin_ | 来源:发表于2017-08-05 20:37 被阅读24次

    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

    相关文章

      网友评论

          本文标题:Gradle参数

          本文链接:https://www.haomeiwen.com/subject/lnkwlxtx.html