aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-db-dao/build.gradle
diff options
context:
space:
mode:
authorSébastien Lesaint <sebastien.lesaint@sonarsource.com>2019-07-26 11:29:23 +0200
committerSonarTech <sonartech@sonarsource.com>2019-08-09 20:21:24 +0200
commitba3c8baa182f43e6e848ed2f503e4f260ce0aa1c (patch)
tree0cfbc5fbf1bdb55d3fbe8018ccbd3204081d0d97 /server/sonar-db-dao/build.gradle
parentb83c58503a60c532379a7797c3a5f630be77a1ff (diff)
downloadsonarqube-ba3c8baa182f43e6e848ed2f503e4f260ce0aa1c.tar.gz
sonarqube-ba3c8baa182f43e6e848ed2f503e4f260ce0aa1c.zip
CreateDb initialize DB without starting full SQ
+ db-core & db-migration UTS are executed only on H2
Diffstat (limited to 'server/sonar-db-dao/build.gradle')
-rw-r--r--server/sonar-db-dao/build.gradle10
1 files changed, 10 insertions, 0 deletions
diff --git a/server/sonar-db-dao/build.gradle b/server/sonar-db-dao/build.gradle
index b78b2b6fada..a5d3fb7698d 100644
--- a/server/sonar-db-dao/build.gradle
+++ b/server/sonar-db-dao/build.gradle
@@ -29,6 +29,7 @@ dependencies {
testCompile 'org.assertj:assertj-guava'
testCompile 'org.dbunit:dbunit'
testCompile 'org.mockito:mockito-core'
+ testCompile 'org.sonarsource.orchestrator:sonar-orchestrator'
testCompile project(':sonar-testing-harness')
testCompile project(':server:sonar-db-core').sourceSets.test.output
testCompile project(':sonar-plugin-api-impl')
@@ -51,6 +52,15 @@ task dumpSchema(type:JavaExec) {
}
tasks.check.dependsOn dumpSchema
+task createDB(type:JavaExec) {
+ main = 'org.sonar.db.createdb.CreateDb'
+ classpath = sourceSets.test.runtimeClasspath
+ systemProperty 'orchestrator.configUrl', System.getProperty('orchestrator.configUrl')
+ if (!project.version.endsWith("-SNAPSHOT")) {
+ systemProperty 'sonar.runtimeVersion', project.version
+ }
+}
+
task testJar(type: Jar) {
classifier = 'tests'
from sourceSets.test.output