]> source.dussan.org Git - sonarqube.git/commitdiff
enable testFixtures plugin only on projects with testFixtures source
authorSébastien Lesaint <sebastien.lesaint@sonarsource.com>
Fri, 20 Sep 2019 13:22:55 +0000 (15:22 +0200)
committerSonarTech <sonartech@sonarsource.com>
Mon, 23 Sep 2019 18:21:06 +0000 (20:21 +0200)
build.gradle

index 290ce4d7ffbe305f4a53889748246cd999691e19..4f7028367951ba1801a5387a99362ba4f1259538 100644 (file)
@@ -95,13 +95,17 @@ subprojects {
   apply plugin: 'io.spring.dependency-management'
   apply plugin: 'jacoco'
   apply plugin: 'java'
-  apply plugin: 'java-test-fixtures'
   apply plugin: 'idea'
   apply plugin: 'org.owasp.dependencycheck'
 
   // do not deploy to Artifactory by default
   artifactoryPublish.skip = true
 
+  def testFixtureSrc = 'src/testFixtures'
+  if (file(testFixtureSrc).exists()) {
+    apply plugin: 'java-test-fixtures'
+  }
+
   ext {
     protobufVersion = '3.7.0'
   }