From b9f3ad2e06030ff955a33d8e4638fa5d38d01732 Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C3=A9bastien=20Lesaint?= Date: Thu, 29 Aug 2019 15:01:10 +0200 Subject: [PATCH] use testFixtures instead of test configuration of ce-task --- .../sonar-ce-task-projectanalysis/build.gradle | 2 +- server/sonar-ce-task/build.gradle | 17 ++++------------- .../java/org/sonar/ce/task/ChangeLogLevel.java | 0 .../task/step/TestComputationStepContext.java | 0 4 files changed, 5 insertions(+), 14 deletions(-) rename server/sonar-ce-task/src/{test => testFixtures}/java/org/sonar/ce/task/ChangeLogLevel.java (100%) rename server/sonar-ce-task/src/{test => testFixtures}/java/org/sonar/ce/task/step/TestComputationStepContext.java (100%) diff --git a/server/sonar-ce-task-projectanalysis/build.gradle b/server/sonar-ce-task-projectanalysis/build.gradle index e9eca578474..99971d84553 100644 --- a/server/sonar-ce-task-projectanalysis/build.gradle +++ b/server/sonar-ce-task-projectanalysis/build.gradle @@ -57,7 +57,7 @@ dependencies { testCompile 'org.mockito:mockito-core' testCompile 'org.reflections:reflections' testCompile project(':sonar-testing-harness') - testCompile project(path: ":server:sonar-ce-task", configuration: "tests") + testCompile testFixtures(project(':server:sonar-ce-task')) testCompile testFixtures(project(':server:sonar-server-common')) } diff --git a/server/sonar-ce-task/build.gradle b/server/sonar-ce-task/build.gradle index 7509cd5dbb5..6a18c0ce329 100644 --- a/server/sonar-ce-task/build.gradle +++ b/server/sonar-ce-task/build.gradle @@ -24,8 +24,8 @@ dependencies { compile project(':server:sonar-server-common') compile project(':sonar-core') - compileOnly project(path: ':sonar-plugin-api', configuration: 'shadow') + compileOnly project(path: ':sonar-plugin-api', configuration: 'shadow') compileOnly 'com.google.code.findbugs:jsr305' testCompile 'ch.qos.logback:logback-access' @@ -36,22 +36,13 @@ dependencies { testCompile 'junit:junit' testCompile 'org.apache.logging.log4j:log4j-api' testCompile 'org.apache.logging.log4j:log4j-core' - testCompile 'org.assertj:assertj-core' testCompile 'org.assertj:assertj-guava' testCompile 'org.mockito:mockito-core' testCompile 'org.reflections:reflections' testCompile testFixtures(project(':server:sonar-db-dao')) -} -task testJar(type: Jar) { - classifier = 'tests' - from sourceSets.test.output -} - -configurations { - tests -} + testFixturesApi 'org.assertj:assertj-core' + testFixturesApi project(path: ':sonar-plugin-api', configuration: 'shadow') -artifacts { - tests testJar + testFixturesCompileOnly 'com.google.code.findbugs:jsr305' } diff --git a/server/sonar-ce-task/src/test/java/org/sonar/ce/task/ChangeLogLevel.java b/server/sonar-ce-task/src/testFixtures/java/org/sonar/ce/task/ChangeLogLevel.java similarity index 100% rename from server/sonar-ce-task/src/test/java/org/sonar/ce/task/ChangeLogLevel.java rename to server/sonar-ce-task/src/testFixtures/java/org/sonar/ce/task/ChangeLogLevel.java diff --git a/server/sonar-ce-task/src/test/java/org/sonar/ce/task/step/TestComputationStepContext.java b/server/sonar-ce-task/src/testFixtures/java/org/sonar/ce/task/step/TestComputationStepContext.java similarity index 100% rename from server/sonar-ce-task/src/test/java/org/sonar/ce/task/step/TestComputationStepContext.java rename to server/sonar-ce-task/src/testFixtures/java/org/sonar/ce/task/step/TestComputationStepContext.java -- 2.39.5