sonarqube { properties { property "sonar.projectName", "${projectTitle} :: VSTS" property "sonar.sources", "src/main/js" property "sonar.tests", "src/main/js" property "sonar.test.inclusions", "src/main/js/**/__tests__/**" property "sonar.exclusions", "src/main/js/libs/third-party/**/*,src/main/js/**/__tests__/**" property "sonar.eslint.reportPaths", "eslint-report.json" property "sonar.typescript.lcov.reportPaths", "coverage/lcov.info" } } yarn_run { ['config', 'public', 'scripts', 'src', '../sonar-web/src/main/js/api', '../sonar-web/src/main/js/app', '../sonar-web/src/main/js/components', '../sonar-web/src/main/js/helpers' ].each { inputs.dir(it).withPathSensitivity(PathSensitivity.RELATIVE) } ['babel.config.js', 'package.json', 'tsconfig.json', 'yarn.lock'].each { inputs.file(it).withPathSensitivity(PathSensitivity.RELATIVE) } outputs.dir('build/webapp') outputs.cacheIf { true } args = ['build'] } build.dependsOn(yarn_run) "yarn_validate-ci" { // Note that outputs are not relocatable, because contain absolute paths, and that's why inputs are not relativized ['config', 'src/main/js', '../sonar-web/src/main/js/api', '../sonar-web/src/main/js/app', '../sonar-web/src/main/js/components', '../sonar-web/src/main/js/helpers' ].each { inputs.dir(it) } ['package.json', 'yarn.lock', 'tsconfig.json', '.eslintrc', '.eslintignore'].each { inputs.file(it) } outputs.file('eslint-report.json') outputs.dir('coverage') outputs.cacheIf { true } } def sources = fileTree(dir: "src") + fileTree(dir: "scripts") + fileTree(dir: "config") 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