diff options
author | David Rautureau <david.rautureau@sonarsource.com> | 2018-02-08 15:01:19 +0100 |
---|---|---|
committer | David Rautureau <david.rautureau@sonarsource.com> | 2018-03-09 11:33:38 +0100 |
commit | 1a17e4302e4b63de6b4ce7c049441803b9471524 (patch) | |
tree | 031bcfbf302c7909c5b45a7c31f1bbc00a2fce34 /server/sonar-web/build.gradle | |
parent | 21fbe3697bdb6e66016ef8d0bea49da574e02e7d (diff) | |
download | sonarqube-1a17e4302e4b63de6b4ce7c049441803b9471524.tar.gz sonarqube-1a17e4302e4b63de6b4ce7c049441803b9471524.zip |
Move To Gradle
Diffstat (limited to 'server/sonar-web/build.gradle')
-rw-r--r-- | server/sonar-web/build.gradle | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/server/sonar-web/build.gradle b/server/sonar-web/build.gradle new file mode 100644 index 00000000000..ee71411cf03 --- /dev/null +++ b/server/sonar-web/build.gradle @@ -0,0 +1,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 |