2017-12-08 25 views
1

나는이 : 나는 내 자신의 checkstyle 규칙을 만들려고 해요어떤 checkstyle 버전을 찾으십니까? 내 Gradle을 파일에서

apply plugin: 'checkstyle' 

. 이런 이유로 내 gradle 파일에 종속성을 추가했습니다.

dependencies { 
    checkstyle 'com.puppycrawl.tools:checkstyle:8.2' 
} 

"check"checkstyle 클래스를 확장하려고합니다. 하지만 checkstyle 버전이 많이 있으며, 어느 것이 gradle에서 사용되는지는 알지 못합니다.

gradle이 사용하고있는 checkstyle의 정확한 버전 번호는 어떻게 찾을 수 있습니까?

답변

2

내가 생각할 수있는 세 가지 방법이 지금 첫째, 적어도 매력이 있습니다

  • Gradle source code을 들여다 볼 수 있습니다.
  • Checkstyle Compatibility Matrix (열 M, 노란색 셀)을 확인할 수 있습니다.
    둘 다 Gradle 3.3 이후 버전에서 Checkstyle의 기본 버전은 6.19입니다. 전에는 5.9였습니다. 2.4 이전의 Gradle 버전 만이 이전 버전의 Checkstyle을 사용했습니다. 때문에 당신이 할 수있는,

    checkstyle { 
        configFile file('your/checkstyle.xml'); 
        toolVersion '8.2'; // your choice here 
    } 
    

    이 기본 버전에 의존하는 것보다 낫다 :

  • 그러나 권장되는 방법은 build.gradle 파일을 지정하여 명시 적으로 Checkstyle 버전을 선택 하는 것입니다 훨씬 새로운 버전의 Checkstyle을 사용하십시오. 그러면 Gradle을 업데이트 할 때 Checkstyle 설정이 중단되지 않습니다.

0

아웃 - 오브 - 박스 apply plugin: 'checkstyle'와의 checkstyle은 v6.19를 사용합니다.

다운로드 한 종속성

Download https://repo1.maven.org/maven2/com/puppycrawl/tools/checkstyle/6.19/checkstyle-6.19.pom 
Download https://repo1.maven.org/maven2/org/antlr/antlr4-runtime/4.5.3/antlr4-runtime-4.5.3.pom 
Download https://repo1.maven.org/maven2/org/antlr/antlr4-master/4.5.3/antlr4-master-4.5.3.pom 
Download https://repo1.maven.org/maven2/commons-beanutils/commons-beanutils/1.9.3/commons-beanutils-1.9.3.pom 
Download https://repo1.maven.org/maven2/commons-cli/commons-cli/1.3.1/commons-cli-1.3.1.pom 
Download https://repo1.maven.org/maven2/org/apache/commons/commons-parent/41/commons-parent-41.pom 
Download https://repo1.maven.org/maven2/commons-cli/commons-cli/1.3.1/commons-cli-1.3.1.jar 
Download https://repo1.maven.org/maven2/com/puppycrawl/tools/checkstyle/6.19/checkstyle-6.19.jar 
Download https://repo1.maven.org/maven2/commons-beanutils/commons-beanutils/1.9.3/commons-beanutils-1.9.3.jar 
Download https://repo1.maven.org/maven2/org/antlr/antlr4-runtime/4.5.3/antlr4-runtime-4.5.3.jar 

dependencies { checkstyle 'com.puppycrawl.tools:checkstyle:8.2' } 후, 다운로드 한 종속 목록 :

Download https://repo1.maven.org/maven2/com/puppycrawl/tools/checkstyle/8.2/checkstyle-8.2.pom 
Download https://repo1.maven.org/maven2/org/antlr/antlr4-runtime/4.7/antlr4-runtime-4.7.pom 
Download https://repo1.maven.org/maven2/org/antlr/antlr4-master/4.7/antlr4-master-4.7.pom 
Download https://repo1.maven.org/maven2/commons-cli/commons-cli/1.4/commons-cli-1.4.pom 
Download https://repo1.maven.org/maven2/net/sf/saxon/Saxon-HE/9.8.0-4/Saxon-HE-9.8.0-4.pom 
Download https://repo1.maven.org/maven2/org/antlr/antlr4-runtime/4.7/antlr4-runtime-4.7.jar 
Download https://repo1.maven.org/maven2/net/sf/saxon/Saxon-HE/9.8.0-4/Saxon-HE-9.8.0-4.jar 
Download https://repo1.maven.org/maven2/commons-cli/commons-cli/1.4/commons-cli-1.4.jar 
Download https://repo1.maven.org/maven2/com/puppycrawl/tools/checkstyle/8.2/checkstyle-8.2.jar