123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- sonarqube {
- properties {
- property "sonar.projectName", "${projectTitle} :: Web"
- 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/**/__tests__/**"
- property "sonar.eslint.reportPaths", "eslint-report.json"
- property "sonar.typescript.lcov.reportPaths", "coverage/lcov.info"
- }
- }
-
- apply plugin: 'com.moowork.node'
-
- def webappDir = "${buildDir}/webapp"
-
- task copyBranding(type: Copy) {
- into projectDir
- if (findProject(':private:branding')) {
- from project(':private:branding').file('.')
- includeEmptyDirs = false
- }
- }
-
- yarn_run {
- if (official) { dependsOn copyBranding }
-
- inputs.property('official', official)
- ['config', 'public', 'scripts', 'src', '../sonar-docs/src'].each {
- inputs.dir(it).withPathSensitivity(PathSensitivity.RELATIVE)
- }
- ['.babelrc', 'package.json', 'tsconfig.json', 'yarn.lock'].each {
- inputs.file(it).withPathSensitivity(PathSensitivity.RELATIVE)
- }
- outputs.dir(webappDir)
- outputs.cacheIf { true }
- args = ['build']
- }
- build.dependsOn(yarn_run)
-
- def sources = fileTree(dir: "src") + fileTree(dir: "scripts") + fileTree(dir: "config")
-
- task licenseCheckWeb(type: com.hierynomus.gradle.license.tasks.LicenseCheck) {
- source = sources
- exclude 'main/js/helpers/standards.json'
- if (official) exclude 'main/js/app/components/GlobalFooterBranding.js'
- }
- licenseMain.dependsOn licenseCheckWeb
-
- task licenseFormatWeb(type: com.hierynomus.gradle.license.tasks.LicenseFormat) {
- source = sources
- if (official) exclude 'main/js/app/components/GlobalFooterBranding.js'
- }
- licenseFormat.dependsOn licenseFormatWeb
|