aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/build.gradle
blob: ee71411cf0313c38972d171a3c7daa6d3b53a16c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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/libs/third-party/**/*,src/main/js/libs/require.js,src/main/js/**/__tests__/**"
  }
}

apply plugin: 'com.moowork.node'
apply plugin: 'war'

configurations {
  branding
}
dependencies {
  branding 'com.sonarsource:sonarsource-branding:1.3.0.307@war'
}
task unzipBranding(type: Copy) {
  into projectDir
  from { zipTree(configurations.branding.singleFile) }
  include '**/*.js'
  include '**/*.svg'
  includeEmptyDirs = false
}

node {
  version = '8.5.0'
  yarnVersion = '1.1.0'
  download = true
}

yarn_run {
  if (release) { dependsOn unzipBranding }
  inputs.dir('scripts')
  inputs.dir('src/main/js')
  inputs.file('build.gradle')
  outputs.dir('src/main/webapp')

  args = ['build']
}

war.dependsOn yarn_run