1
私はcheckstyleタスクを使用するプロジェクト(マルチモジュール)を持っています。私は正常に動作するように7.4ツールのバージョンをダウングレードする場合Androidスタジオcheckstyleタスク
Execution failed for task ':domain:checkstyle'. Unable to create Root Module: configLocation {[my_project_path]\quality_tools\checkstyle\google_checks.xml}, classpath {null}.
:
apply plugin: 'checkstyle'
check.dependsOn 'checkstyle'
// Set the directory for quality config files
def configDir = "${project.rootDir}/quality_tools"
// Set the directory for quality reports
def reportsDir = "${project.buildDir}/reports"
checkstyle {
toolVersion = "7.6"
configFile file("$configDir/checkstyle/google_checks.xml")
configProperties.checkstyleSuppressionsPath = file("$configDir/checkstyle/suppressions.xml").absolutePath
}
@ParallelizableTask
class ParallelCheckstyle extends Checkstyle {}
task checkstyle(type: ParallelCheckstyle, group: 'verification') {
description 'Runs Checkstyle inspection against Android sourcesets.'
source 'src'
include '**/*.java'
exclude '**/gen/**'
exclude '**/test/**'
exclude '**/androidTest/**'
exclude '**/R.java'
exclude '**/BuildConfig.java'
classpath = files()
}
これは私に次のエラーを与える:これは関連する構成です。 最新のバージョンで動作させる方法はありますか、または設定に何か問題があった場合は誰にでも教えてください。
ありがとうございます。
私は 'google_checks'を最新バージョンで更新しました。現在は動作しているようです。 私はここからスタイルを使用しています:https://github.com/checkstyle/checkstyle/blob/master/src/main/resources/google_checks.xml このエラーは誤解を招いていました、それはいくつかのプロパティがそうではないようですサポートされなくなりました(またはそれらが置き換えられました)。 –