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

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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. inputs.property('release', release)
  25. ['config', 'public', 'scripts', 'src', '../sonar-docs/src'].each {
  26. inputs.dir(it).withPathSensitivity(PathSensitivity.RELATIVE)
  27. }
  28. ['.babelrc', 'package.json', 'tsconfig.json', 'yarn.lock'].each {
  29. inputs.file(it).withPathSensitivity(PathSensitivity.RELATIVE)
  30. }
  31. outputs.dir(webappDir)
  32. outputs.cacheIf { true }
  33. args = [release ? 'build-release' : 'build']
  34. }
  35. build.dependsOn(yarn_run)
  36. def sources = fileTree(dir: "src") + fileTree(dir: "scripts") + fileTree(dir: "config")
  37. task licenseCheckWeb(type: com.hierynomus.gradle.license.tasks.LicenseCheck) {
  38. source = sources
  39. exclude 'main/js/helpers/standards.json'
  40. if (official) exclude 'main/js/app/components/GlobalFooterBranding.js'
  41. }
  42. licenseMain.dependsOn licenseCheckWeb
  43. task licenseFormatWeb(type: com.hierynomus.gradle.license.tasks.LicenseFormat) {
  44. source = sources
  45. if (official) exclude 'main/js/app/components/GlobalFooterBranding.js'
  46. }
  47. licenseFormat.dependsOn licenseFormatWeb