2016-05-17 77 views
2

之前,我已經得到了這個任務到的build.gradleAndroid的搖籃正在運行的任務建設

apply plugin: 'checkstyle' 

task checkstyle(type: Checkstyle) { 
    // Cleaning the old log because of the creation for the new ones 
    delete fileTree(dir: "${project.rootDir}/app/build/reports") 
    source 'src' 
    include '**/*.java' 
    exclude '**/gen/**' 
    // empty classpath 
    classpath = files() 
    //Do not fail build 
    ignoreFailures = false 
} 

我想,當我嘗試構建應用程序這個自動運行,如果發現錯誤失敗的構建。我不知道如何以及在哪裏調用任務。

回答