-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
54 lines (44 loc) · 1.31 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
// Copyright (c) 2019 Gonzalo Müller Bravo.
// Licensed under the MIT License (MIT), see LICENSE.txt
plugins {
id 'checkstyle'
id 'codenarc'
}
repositories {
jcenter()
}
final ROOT_FOLDER = '.'
final CODE_FILES = ['*.gradle', '*.groovy', 'src/**/*.groovy']
checkstyle {
toolVersion = CHECKSTYLE_VERSION
}
codenarc {
toolVersion = CODENARC_VERSION
}
// TASKS
////////
task assess (type: Checkstyle) {
// Checkstyle task settings
configFile = file('java/src/config/common/common-checks.xml')
classpath = files('dummy') // Required by Checkstyle, Not required for Checker modules
source fileTree(ROOT_FOLDER) {
include CODE_FILES + ['java/src/config/', 'js/config/', '*.gitignore', '*.md', '*.properties', '*.txt']
}
// gradle task settings
description = 'Runs Checkstyle analysis for all files.'
group = GROUP_ASSESS
}
task assessGradle(type: CodeNarc) {
// CodeNarc task settings
configFile = file('java/src/config/groovy/groovy-rules.groovy')
source fileTree(ROOT_FOLDER) {
include CODE_FILES
exclude 'java/src/config/**/*'
}
// gradle task settings
description = 'Run Codenarc analysis for all gradle files.'
group = GROUP_ASSESS
}
// Default task
///////////////
defaultTasks 'assess', 'assessGradle', 'java:test', 'java:assembleArtifact', 'js:npmInstall', 'js:npm_run_check'