国产chinesehdxxxx野外,国产av无码专区亚洲av琪琪,播放男人添女人下边视频,成人国产精品一区二区免费看,chinese丰满人妻videos

使用資源設(shè)置

2018-07-01 17:06 更新

你可以通過 sourceSets 屬性來使用資源設(shè)置. 它其實(shí)是一個(gè)項(xiàng)目資源設(shè)置的容器, 它的類型是SourceSetContainer. 同時(shí)也有 sourceSets { } 腳本模塊, 在這個(gè)模塊里, 你可以通過閉包配置資源設(shè)置容器. 資源設(shè)置容器的工作方式和其余容器幾乎一模一樣, 比如 tasks.

例 22.3. 進(jìn)入資源設(shè)置

build.gradle

// Various ways to access the main source set
println sourceSets.main.output.classesDir
println sourceSets['main'].output.classesDir
sourceSets {
    println main.output.classesDir
}
sourceSets {
    main {
        println output.classesDir
    }
}

// Iterate over the source sets
sourceSets.all {
    println name
}

為了配置一個(gè)已經(jīng)存在的資源集, 你只需要使用上面提及的訪問方法來設(shè)置資源集的屬性. 下面就是一個(gè)配置 Java 資源目錄的例子:

例 22.4. 配置資源集的源目錄

build.gradle

sourceSets {
    main {
        java {
            srcDir 'src/java'
        }
        resources {
            srcDir 'src/resources'
        }
    }
}


以上內(nèi)容是否對(duì)您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號(hào)
微信公眾號(hào)

編程獅公眾號(hào)