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
55
56
57
58
59
60
61
62
63
64
65
66
|
description = 'SonarSource :: Sonar UI Common'
sonarqube {
properties {
property "sonar.sources", "components,helpers"
property "sonar.exclusions", "**/__tests__/**"
property "sonar.test", "components,helpers"
property "sonar.test.inclusions", "**/__tests__/**"
property "sonar.eslint.reportPaths", "eslint-report.json"
property "sonar.javascript.lcov.reportPaths", "coverage/lcov.info"
property "sonar.coverage.exclusions", "components/icons/*,helpers/testUtils.ts,helpers/keycodes.ts"
property "sonar.typescript.lcov.reportPaths", "build/coverage/lcov.info"
property "sonar.eslint.reportPaths", "build/eslint-report.json"
}
}
yarn_run {
['config', 'scripts', 'components', 'helpers'].each {
inputs.dir(it).withPathSensitivity(PathSensitivity.RELATIVE)
}
['package.json', 'tsconfig.json', 'yarn.lock'].each {
inputs.file(it).withPathSensitivity(PathSensitivity.RELATIVE)
}
outputs.cacheIf { true }
args = ['build']
ignoreExitValue = false
}
"yarn_check-ci" {
// Note that outputs are not relocatable, because contain absolute paths, and that's why inputs are not relativized
['config', 'scripts', 'components', 'helpers'].each {
inputs.dir(it)
}
['package.json', 'yarn.lock', 'tsconfig.json'].each {
inputs.file(it)
}
dependsOn(yarn)
}
"yarn_validate-ci" {
// Note that outputs are not relocatable, because contain absolute paths, and that's why inputs are not relativized
['config', 'scripts', 'components', 'helpers'].each {
inputs.dir(it)
}
['.eslintrc', 'package.json', 'yarn.lock', 'tsconfig.json'].each {
inputs.file(it)
}
outputs.file("eslint-report.json")
outputs.dir("coverage")
outputs.cacheIf { true }
dependsOn(yarn)
}
def sources = fileTree(dir: "components") + fileTree(dir: "config") + fileTree(dir: "helpers")
task licenseCheckWeb(type: com.hierynomus.gradle.license.tasks.LicenseCheck) {
source = sources
}
licenseMain.dependsOn licenseCheckWeb
task licenseFormatWeb(type: com.hierynomus.gradle.license.tasks.LicenseFormat) {
source = sources
}
licenseFormat.dependsOn licenseFormatWeb
|