You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

build.gradle 1.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. sonarqube {
  2. properties {
  3. property "sonar.projectName", "${projectTitle} :: Web"
  4. property "sonar.sources", "src/main/js"
  5. property "sonar.tests", "src/main/js"
  6. property "sonar.test.inclusions", "src/main/js/**/__tests__/**"
  7. property "sonar.exclusions", "src/main/js/**/__tests__/**"
  8. property "sonar.eslint.reportPaths", "eslint-report.json"
  9. property "sonar.typescript.lcov.reportPaths", "coverage/lcov.info"
  10. }
  11. }
  12. apply plugin: 'com.moowork.node'
  13. def webappDir = "${buildDir}/webapp"
  14. task copyBranding(type: Copy) {
  15. into projectDir
  16. if (findProject(':private:branding')) {
  17. from project(':private:branding').file('.')
  18. includeEmptyDirs = false
  19. }
  20. }
  21. yarn_run {
  22. if (official) { dependsOn copyBranding }
  23. inputs.property('official', official)
  24. ['config', 'public', 'scripts', 'src', '../sonar-docs/src'].each {
  25. inputs.dir(it).withPathSensitivity(PathSensitivity.RELATIVE)
  26. }
  27. ['.babelrc', 'package.json', 'tsconfig.json', 'yarn.lock'].each {
  28. inputs.file(it).withPathSensitivity(PathSensitivity.RELATIVE)
  29. }
  30. outputs.dir(webappDir)
  31. outputs.cacheIf { true }
  32. args = ['build']
  33. }
  34. build.dependsOn(yarn_run)
  35. def sources = fileTree(dir: "src") + fileTree(dir: "scripts") + fileTree(dir: "config")
  36. task licenseCheckWeb(type: com.hierynomus.gradle.license.tasks.LicenseCheck) {
  37. source = sources
  38. exclude 'main/js/helpers/standards.json'
  39. if (official) exclude 'main/js/app/components/GlobalFooterBranding.js'
  40. }
  41. licenseMain.dependsOn licenseCheckWeb
  42. task licenseFormatWeb(type: com.hierynomus.gradle.license.tasks.LicenseFormat) {
  43. source = sources
  44. if (official) exclude 'main/js/app/components/GlobalFooterBranding.js'
  45. }
  46. licenseFormat.dependsOn licenseFormatWeb