2
我需要將Gradle構建標記爲失敗,並且如果運行lint會給我一個錯誤,它應該會自動停止。我根據需要對代碼進行了更改,但沒有導致任何更改。將lint添加到CI並在lint爲Android Studio項目產生錯誤時標記構建失敗
代碼:
lintOptions {
// set to true to turn off analysis progress reporting by lint
quiet true
// if true, stop the gradle build if errors are found
abortOnError true
// if true, only report errors
ignoreWarnings false
}
而且除了它,我需要皮棉添加到CI。我使用的CI軟件是Jenkins。所以我需要配置他們的Jenkins插件,以便構建停止並標記失敗,如果Lint給出錯誤。
我對lint和CI很新,所以請提供詳細的答案。