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.6KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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. }
  10. }
  11. apply plugin: 'com.moowork.node'
  12. def webappDir = "${buildDir}/webapp"
  13. task copyBranding(type: Copy) {
  14. into projectDir
  15. if (findProject(':private:branding')) {
  16. from project(':private:branding').file('.')
  17. includeEmptyDirs = false
  18. }
  19. }
  20. yarn_run {
  21. if (official) { dependsOn copyBranding }
  22. inputs.property('official', official)
  23. ['config', 'public', 'scripts', 'src', '../sonar-docs/src'].each {
  24. inputs.dir(it).withPathSensitivity(PathSensitivity.RELATIVE)
  25. }
  26. ['.babelrc', 'package.json', 'tsconfig.json', 'yarn.lock'].each {
  27. inputs.file(it).withPathSensitivity(PathSensitivity.RELATIVE)
  28. }
  29. outputs.dir(webappDir)
  30. outputs.cacheIf { true }
  31. args = ['build']
  32. }
  33. build.dependsOn(yarn_run)
  34. def sources = fileTree(dir: "src") + fileTree(dir: "scripts") + fileTree(dir: "config")
  35. task licenseCheckWeb(type: com.hierynomus.gradle.license.tasks.LicenseCheck) {
  36. source = sources
  37. exclude 'main/js/helpers/standards.json'
  38. if (official) exclude 'main/js/app/components/GlobalFooterBranding.js'
  39. }
  40. licenseMain.dependsOn licenseCheckWeb
  41. task licenseFormatWeb(type: com.hierynomus.gradle.license.tasks.LicenseFormat) {
  42. source = sources
  43. if (official) exclude 'main/js/app/components/GlobalFooterBranding.js'
  44. }
  45. licenseFormat.dependsOn licenseFormatWeb