aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-docs/build.gradle
diff options
context:
space:
mode:
authorMichal Duda <michal.duda@sonarsource.com>2019-08-07 12:39:35 +0200
committerSonarTech <sonartech@sonarsource.com>2019-08-12 20:21:13 +0200
commitd57f3071ec1060dc23c5c4bce542f3d802a252a7 (patch)
tree409cc66cdb3ca7689f4078c84d0cc527d4341987 /server/sonar-docs/build.gradle
parent05c8a2e004e9cc17a4d5963a42c835753eefb367 (diff)
downloadsonarqube-d57f3071ec1060dc23c5c4bce542f3d802a252a7.tar.gz
sonarqube-d57f3071ec1060dc23c5c4bce542f3d802a252a7.zip
SONAR-12384 update gradle build
Diffstat (limited to 'server/sonar-docs/build.gradle')
-rw-r--r--server/sonar-docs/build.gradle60
1 files changed, 59 insertions, 1 deletions
diff --git a/server/sonar-docs/build.gradle b/server/sonar-docs/build.gradle
index 51b967e54be..d851ab04c60 100644
--- a/server/sonar-docs/build.gradle
+++ b/server/sonar-docs/build.gradle
@@ -1,3 +1,9 @@
+import java.util.regex.Matcher
+import java.util.regex.Pattern
+
+Pattern PLUGIN_NAME_PATTERN = Pattern.compile("(sonar-.*-plugin)(.*)")
+
+
/**
* This module is building the zip file containing the static web site
*/
@@ -8,6 +14,58 @@ sonarqube {
group = 'com.sonarsource.sonarqube'
+configurations {
+ languagePlugin { transitive = false }
+}
+
+dependencies {
+ languagePlugin 'com.sonarsource.abap:sonar-abap-plugin@jar'
+ languagePlugin 'com.sonarsource.slang:sonar-apex-plugin@jar'
+ languagePlugin "org.sonarsource.dotnet:sonar-csharp-plugin@jar"
+ languagePlugin 'com.sonarsource.cpp:sonar-cfamily-plugin@jar'
+ languagePlugin 'com.sonarsource.cobol:sonar-cobol-plugin@jar'
+ languagePlugin 'org.sonarsource.css:sonar-css-plugin@jar'
+ languagePlugin 'org.sonarsource.flex:sonar-flex-plugin@jar'
+ languagePlugin 'org.sonarsource.go:sonar-go-plugin@jar'
+ languagePlugin 'org.sonarsource.java:sonar-java-plugin@jar'
+ languagePlugin 'org.sonarsource.javascript:sonar-javascript-plugin@jar'
+ languagePlugin "org.sonarsource.slang:sonar-kotlin-plugin@jar"
+ languagePlugin 'org.sonarsource.php:sonar-php-plugin@jar'
+ languagePlugin 'com.sonarsource.pli:sonar-pli-plugin@jar'
+ languagePlugin 'com.sonarsource.plsql:sonar-plsql-plugin@jar'
+ languagePlugin 'org.sonarsource.python:sonar-python-plugin@jar'
+ languagePlugin 'com.sonarsource.rpg:sonar-rpg-plugin@jar'
+ languagePlugin "org.sonarsource.slang:sonar-ruby-plugin@jar"
+ languagePlugin "org.sonarsource.slang:sonar-scala-plugin@jar"
+ languagePlugin 'com.sonarsource.swift:sonar-swift-plugin@jar'
+ languagePlugin 'org.sonarsource.typescript:sonar-typescript-plugin@jar'
+ languagePlugin 'com.sonarsource.tsql:sonar-tsql-plugin@jar'
+ languagePlugin "org.sonarsource.dotnet:sonar-vbnet-plugin@jar"
+ languagePlugin 'com.sonarsource.plugins.vb:sonar-vb-plugin@jar'
+ languagePlugin 'org.sonarsource.html:sonar-html-plugin@jar'
+ languagePlugin 'org.sonarsource.xml:sonar-xml-plugin@jar'
+}
+
+task extractAnalyzerDocFiles {
+ doLast {
+ configurations.languagePlugin.files.each {
+ File file = it
+ copy {
+ from(zipTree(file).matching { include 'static/documentation.md' }) {
+ eachFile { fcd ->
+ Matcher m = PLUGIN_NAME_PATTERN.matcher(file.getName())
+ if (m.find()) {
+ fcd.relativePath = new RelativePath(true, m.group(1) + '.md')
+ }
+ }
+ includeEmptyDirs = false
+ }
+ into "$buildDir/tmp/plugin-documentation/"
+ }
+ }
+ }
+}
+
yarn_run {
def docsVersion = version.split("[.-]").take(2).join('.')
environment = [ GATSBY_DOCS_VERSION: docsVersion ]
@@ -48,7 +106,7 @@ task zip(type: Zip) {
}
}
zip.dependsOn yarn_run
-assemble.dependsOn zip
+assemble.dependsOn zip, extractAnalyzerDocFiles
publishing {
publications {