Я пытаюсь настроить пользовательская конфигурация стиля проверки в моем проекте Gradle из зависимости (JAR), которая была импортирована в мой проект. Зависимость успешно извлечена из нашего внутреннего репозитория Nexus Maven (я вижу файлы в разделе «Внешние библиотеки» в IntelliJ).
Вот мой build.gradle:
Код: Выделить всё
plugins {
id 'checkstyle'
}
repositories {
mavenCentral()
maven {
url = uri('https://repository..../repository/maven-releases')
}
}
dependencies {
implementation("tech.qa:UICheckstyle:1.0.8")
}
Вот все, что я пробовал:
- Когда я запускаю сборку gradle для вышеуказанной настройки, я получаю следующую ошибку:< /li>
Код: Выделить всё
Execution failed for task ':checkstyleMain'.
> A failure occurred while executing org.gradle.api.plugins.quality.internal.CheckstyleAction
> An unexpected error occurred configuring and executing Checkstyle.
> Unable to create Root Module: config {/Users/arjunvijayakumar/Desktop/workspaces/ui-automation/config/checkstyle/checkstyle.xml}, classpath {null}.
- Обновите зависимости до:
Код: Выделить всё
dependencies {
checkstyle("tech.qa:UICheckstyle:1.0.8")
}
Код: Выделить всё
Execution failed for task ':checkstyleMain'.
> A failure occurred while executing org.gradle.api.plugins.quality.internal.CheckstyleAction
> java.lang.ClassNotFoundException: com.puppycrawl.tools.checkstyle.ant.CheckstyleAntTask
- Добавлен блок Checkstyle:
Код: Выделить всё
checkstyle {
configFile = rootProject.file("config/configuration/checkstyle.xml")
// This is obviously wrong. I am not sure how to access the file inside the JAR
}
Дайте мне знать, может ли кто-нибудь мне с этим помочь?
Спасибо. заранее.
Подробнее здесь: https://stackoverflow.com/questions/784 ... -in-gradle
Мобильная версия