checkstyle プラグインに、別の jar ファイルに保存されている xml 構成を (依存関係として) 使用するように強制しようとしています。
その構成ファイルだけを含むパッケージを作成しました。
build.gradle には、次の構成があります。
apply plugin: 'checkstyle'
checkstyle {
checkstyleMain {
classpath += configurations.checkstyleDep
}
checkstyleTest {
classpath += configurations.checkstyleDep
}
configFile = new File(getClass().getResource("/checkstyle.xml").toURI())
println(configFile)
}
configurations {
checkstyleDep
}
dependencies {
checkstyleDep "com.example:checkstyle-common:1.0"
}
残念ながら、これにより gradle が依存関係を確認することはありません。
私のコードにはどのような問題がありますか? これを行うより良い方法はありますか?