mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 10:49:06 +01:00
Compare commits
2 Commits
sqlite-jdb
...
checkstyle
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9c42af1489 | ||
|
|
4496df723a |
@@ -5,6 +5,7 @@ targetCompatibility = 1.8
|
|||||||
apply plugin: 'ru.vyarus.animalsniffer'
|
apply plugin: 'ru.vyarus.animalsniffer'
|
||||||
apply plugin: 'witness'
|
apply plugin: 'witness'
|
||||||
apply from: 'witness.gradle'
|
apply from: 'witness.gradle'
|
||||||
|
apply plugin: 'checkstyle'
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation "com.google.dagger:dagger:$dagger_version"
|
implementation "com.google.dagger:dagger:$dagger_version"
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ apply plugin: 'idea'
|
|||||||
apply plugin: 'witness'
|
apply plugin: 'witness'
|
||||||
apply from: 'witness.gradle'
|
apply from: 'witness.gradle'
|
||||||
apply from: '../dagger.gradle'
|
apply from: '../dagger.gradle'
|
||||||
|
apply plugin: 'checkstyle'
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation project(path: ':bramble-api', configuration: 'default')
|
implementation project(path: ':bramble-api', configuration: 'default')
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ apply plugin: 'idea'
|
|||||||
apply plugin: 'witness'
|
apply plugin: 'witness'
|
||||||
apply from: 'witness.gradle'
|
apply from: 'witness.gradle'
|
||||||
apply from: '../dagger.gradle'
|
apply from: '../dagger.gradle'
|
||||||
|
apply plugin: 'checkstyle'
|
||||||
|
|
||||||
configurations {
|
configurations {
|
||||||
tor
|
tor
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
apply plugin: 'com.android.application'
|
apply plugin: 'com.android.application'
|
||||||
apply plugin: 'witness'
|
apply plugin: 'witness'
|
||||||
apply from: 'witness.gradle'
|
apply from: 'witness.gradle'
|
||||||
|
apply plugin: 'checkstyle'
|
||||||
|
// Need to manually apply this as the Java plugin is not applied to this module hence this is not
|
||||||
|
// done automatically.
|
||||||
|
apply from: "${rootProject.rootDir}/gradle/checkstyle.gradle"
|
||||||
|
|
||||||
def getStdout = { command, defaultValue ->
|
def getStdout = { command, defaultValue ->
|
||||||
def stdout = new ByteArrayOutputStream()
|
def stdout = new ByteArrayOutputStream()
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ targetCompatibility = 1.8
|
|||||||
apply plugin: 'ru.vyarus.animalsniffer'
|
apply plugin: 'ru.vyarus.animalsniffer'
|
||||||
apply plugin: 'witness'
|
apply plugin: 'witness'
|
||||||
apply from: 'witness.gradle'
|
apply from: 'witness.gradle'
|
||||||
|
apply plugin: 'checkstyle'
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation project(path: ':bramble-api', configuration: 'default')
|
implementation project(path: ':bramble-api', configuration: 'default')
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ apply plugin: 'idea'
|
|||||||
apply plugin: 'witness'
|
apply plugin: 'witness'
|
||||||
apply from: 'witness.gradle'
|
apply from: 'witness.gradle'
|
||||||
apply from: '../dagger.gradle'
|
apply from: '../dagger.gradle'
|
||||||
|
apply plugin: 'checkstyle'
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation project(path: ':briar-api', configuration: 'default')
|
implementation project(path: ':briar-api', configuration: 'default')
|
||||||
|
|||||||
19
config/checkstyle/checkstyle.xml
Normal file
19
config/checkstyle/checkstyle.xml
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
<!DOCTYPE module PUBLIC
|
||||||
|
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
|
||||||
|
"https://checkstyle.org/dtds/configuration_1_3.dtd">
|
||||||
|
<module name="Checker">
|
||||||
|
<property name="tabWidth" value="4"/>
|
||||||
|
<property name="charset" value="UTF-8"/>
|
||||||
|
<module name="LineLength">
|
||||||
|
<property name="fileExtensions" value="java"/>
|
||||||
|
<property name="max" value="1000"/>
|
||||||
|
<property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://"/>
|
||||||
|
</module>
|
||||||
|
<module name="TreeWalker">
|
||||||
|
<module name="RegexpSinglelineJava">
|
||||||
|
<property name="format" value="^\t* +\t*\S"/>
|
||||||
|
<property name="message" value="Line has leading space characters; indentation should be performed with tabs only."/>
|
||||||
|
<property name="ignoreComments" value="true"/>
|
||||||
|
</module>
|
||||||
|
</module>
|
||||||
|
</module>
|
||||||
29
gradle/checkstyle.gradle
Normal file
29
gradle/checkstyle.gradle
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
task checkstyleMain(type: Checkstyle) {
|
||||||
|
source 'src/main/java'
|
||||||
|
include '**/*.java'
|
||||||
|
classpath = files()
|
||||||
|
reports {
|
||||||
|
xml {
|
||||||
|
destination file("build/reports/checkstyle/main.xml")
|
||||||
|
}
|
||||||
|
html {
|
||||||
|
destination file("build/reports/checkstyle/main.html")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
check.dependsOn it
|
||||||
|
}
|
||||||
|
|
||||||
|
task checkstyleTest(type: Checkstyle) {
|
||||||
|
source 'src/test/java'
|
||||||
|
include '**/*.java'
|
||||||
|
classpath = files()
|
||||||
|
reports {
|
||||||
|
xml {
|
||||||
|
destination file("build/reports/checkstyle/test.xml")
|
||||||
|
}
|
||||||
|
html {
|
||||||
|
destination file("build/reports/checkstyle/test.html")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
check.dependsOn it
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user