diff options
author | Duarte Meneses <duarte.meneses@sonarsource.com> | 2019-06-19 13:56:51 -0500 |
---|---|---|
committer | SonarTech <sonartech@sonarsource.com> | 2019-07-12 20:21:14 +0200 |
commit | 93dc9770902dc7e168869d88b5ad731bfc0bedd9 (patch) | |
tree | 97ba885661d5cd9a2115fe212df31bacec9f9947 /plugins | |
parent | 7c7d9b6b90244d2c974207862071caccdb2c9bb5 (diff) | |
download | sonarqube-93dc9770902dc7e168869d88b5ad731bfc0bedd9.tar.gz sonarqube-93dc9770902dc7e168869d88b5ad731bfc0bedd9.zip |
Extract implementation from plugin API and create new module sonar-plugin-api-impl
Diffstat (limited to 'plugins')
15 files changed, 47 insertions, 48 deletions
diff --git a/plugins/sonar-xoo-plugin/build.gradle b/plugins/sonar-xoo-plugin/build.gradle index eb6a3c603b5..675726d0a6e 100644 --- a/plugins/sonar-xoo-plugin/build.gradle +++ b/plugins/sonar-xoo-plugin/build.gradle @@ -11,11 +11,10 @@ dependencies { runtime project(path: ':sonar-plugin-api', configuration: 'shadow') compileOnly project(path: ':sonar-plugin-api') - testCompile project(path: ':sonar-scanner-engine') testCompile 'junit:junit' testCompile 'org.assertj:assertj-core' testCompile 'org.mockito:mockito-core' - testCompile project(':server:sonar-server') + testCompile project(':sonar-plugin-api-impl') } jar { diff --git a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/XooPluginTest.java b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/XooPluginTest.java index 892081dc202..7455f077caa 100644 --- a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/XooPluginTest.java +++ b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/XooPluginTest.java @@ -25,8 +25,8 @@ import org.junit.Test; import org.sonar.api.Plugin; import org.sonar.api.SonarQubeSide; import org.sonar.api.SonarRuntime; -import org.sonar.api.internal.PluginContextImpl; -import org.sonar.api.internal.SonarRuntimeImpl; +import org.sonar.api.impl.context.PluginContextImpl; +import org.sonar.api.impl.context.SonarRuntimeImpl; import org.sonar.api.utils.Version; import org.sonar.xoo.global.GlobalProjectSensor; import org.sonar.xoo.rule.OneExternalIssuePerLineSensor; diff --git a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/coverage/ItCoverageSensorTest.java b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/coverage/ItCoverageSensorTest.java index 1f5128ddc79..161cac8649f 100644 --- a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/coverage/ItCoverageSensorTest.java +++ b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/coverage/ItCoverageSensorTest.java @@ -28,9 +28,9 @@ import org.junit.Test; import org.junit.rules.ExpectedException; import org.junit.rules.TemporaryFolder; import org.sonar.api.batch.fs.InputFile; -import org.sonar.scanner.fs.TestInputFileBuilder; -import org.sonar.scanner.sensor.DefaultSensorDescriptor; -import org.sonar.scanner.sensor.SensorContextTester; +import org.sonar.api.impl.fs.TestInputFileBuilder; +import org.sonar.api.impl.sensor.DefaultSensorDescriptor; +import org.sonar.api.impl.sensor.SensorContextTester; import static org.assertj.core.api.Assertions.assertThat; diff --git a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/coverage/OverallCoverageSensorTest.java b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/coverage/OverallCoverageSensorTest.java index a6c88780840..71c336163f2 100644 --- a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/coverage/OverallCoverageSensorTest.java +++ b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/coverage/OverallCoverageSensorTest.java @@ -28,9 +28,9 @@ import org.junit.Test; import org.junit.rules.ExpectedException; import org.junit.rules.TemporaryFolder; import org.sonar.api.batch.fs.InputFile; -import org.sonar.scanner.fs.TestInputFileBuilder; -import org.sonar.scanner.sensor.DefaultSensorDescriptor; -import org.sonar.scanner.sensor.SensorContextTester; +import org.sonar.api.impl.fs.TestInputFileBuilder; +import org.sonar.api.impl.sensor.DefaultSensorDescriptor; +import org.sonar.api.impl.sensor.SensorContextTester; import static org.assertj.core.api.Assertions.assertThat; diff --git a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/coverage/UtCoverageSensorTest.java b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/coverage/UtCoverageSensorTest.java index 429a64722fd..dde6eddac2c 100644 --- a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/coverage/UtCoverageSensorTest.java +++ b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/coverage/UtCoverageSensorTest.java @@ -28,9 +28,9 @@ import org.junit.Test; import org.junit.rules.ExpectedException; import org.junit.rules.TemporaryFolder; import org.sonar.api.batch.fs.InputFile; -import org.sonar.scanner.fs.TestInputFileBuilder; -import org.sonar.scanner.sensor.DefaultSensorDescriptor; -import org.sonar.scanner.sensor.SensorContextTester; +import org.sonar.api.impl.fs.TestInputFileBuilder; +import org.sonar.api.impl.sensor.DefaultSensorDescriptor; +import org.sonar.api.impl.sensor.SensorContextTester; import static org.assertj.core.api.Assertions.assertThat; diff --git a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/extensions/XooPostJobTest.java b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/extensions/XooPostJobTest.java index 5474f266af6..0754cdc12c0 100644 --- a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/extensions/XooPostJobTest.java +++ b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/extensions/XooPostJobTest.java @@ -24,7 +24,7 @@ import org.junit.Rule; import org.junit.Test; import org.sonar.api.batch.postjob.PostJobContext; import org.sonar.api.utils.log.LogTester; -import org.sonar.scanner.postjob.DefaultPostJobDescriptor; +import org.sonar.api.impl.sensor.DefaultPostJobDescriptor; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; diff --git a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/lang/CpdTokenizerSensorTest.java b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/lang/CpdTokenizerSensorTest.java index 1464eaa8e62..aaad31d3da4 100644 --- a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/lang/CpdTokenizerSensorTest.java +++ b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/lang/CpdTokenizerSensorTest.java @@ -28,9 +28,9 @@ import org.junit.Test; import org.junit.rules.ExpectedException; import org.junit.rules.TemporaryFolder; import org.sonar.api.batch.fs.InputFile; -import org.sonar.scanner.fs.TestInputFileBuilder; -import org.sonar.scanner.sensor.DefaultSensorDescriptor; -import org.sonar.scanner.sensor.SensorContextTester; +import org.sonar.api.impl.fs.TestInputFileBuilder; +import org.sonar.api.impl.sensor.DefaultSensorDescriptor; +import org.sonar.api.impl.sensor.SensorContextTester; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.tuple; diff --git a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/lang/MeasureSensorTest.java b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/lang/MeasureSensorTest.java index 5d36dcf4097..bc6e6b00500 100644 --- a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/lang/MeasureSensorTest.java +++ b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/lang/MeasureSensorTest.java @@ -30,11 +30,11 @@ import org.junit.rules.ExpectedException; import org.junit.rules.TemporaryFolder; import org.sonar.api.batch.fs.InputFile; import org.sonar.api.batch.measure.MetricFinder; +import org.sonar.api.impl.fs.TestInputFileBuilder; +import org.sonar.api.impl.sensor.DefaultSensorDescriptor; +import org.sonar.api.impl.sensor.SensorContextTester; import org.sonar.api.measures.CoreMetrics; import org.sonar.api.measures.Metric; -import org.sonar.scanner.fs.TestInputFileBuilder; -import org.sonar.scanner.sensor.DefaultSensorDescriptor; -import org.sonar.scanner.sensor.SensorContextTester; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; diff --git a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/lang/SignificantCodeSensorTest.java b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/lang/SignificantCodeSensorTest.java index 5bd1c1377a5..6acb0ed39e1 100644 --- a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/lang/SignificantCodeSensorTest.java +++ b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/lang/SignificantCodeSensorTest.java @@ -29,11 +29,11 @@ import org.junit.rules.ExpectedException; import org.junit.rules.TemporaryFolder; import org.sonar.api.batch.fs.InputFile; import org.sonar.api.batch.fs.TextRange; -import org.sonar.scanner.fs.DefaultTextPointer; -import org.sonar.scanner.fs.DefaultTextRange; -import org.sonar.scanner.fs.TestInputFileBuilder; -import org.sonar.scanner.sensor.DefaultSensorDescriptor; -import org.sonar.scanner.sensor.SensorContextTester; +import org.sonar.api.impl.fs.DefaultTextPointer; +import org.sonar.api.impl.fs.DefaultTextRange; +import org.sonar.api.impl.fs.TestInputFileBuilder; +import org.sonar.api.impl.sensor.DefaultSensorDescriptor; +import org.sonar.api.impl.sensor.SensorContextTester; import static org.assertj.core.api.Assertions.assertThat; diff --git a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/lang/SymbolReferencesSensorTest.java b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/lang/SymbolReferencesSensorTest.java index a15596379af..1e91363bbed 100644 --- a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/lang/SymbolReferencesSensorTest.java +++ b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/lang/SymbolReferencesSensorTest.java @@ -27,11 +27,11 @@ import org.junit.Rule; import org.junit.Test; import org.junit.rules.TemporaryFolder; import org.sonar.api.batch.fs.InputFile; -import org.sonar.scanner.fs.DefaultTextPointer; -import org.sonar.scanner.fs.DefaultTextRange; -import org.sonar.scanner.fs.TestInputFileBuilder; -import org.sonar.scanner.sensor.DefaultSensorDescriptor; -import org.sonar.scanner.sensor.SensorContextTester; +import org.sonar.api.impl.fs.DefaultTextPointer; +import org.sonar.api.impl.fs.DefaultTextRange; +import org.sonar.api.impl.fs.TestInputFileBuilder; +import org.sonar.api.impl.sensor.DefaultSensorDescriptor; +import org.sonar.api.impl.sensor.SensorContextTester; import org.sonar.xoo.Xoo; import static org.assertj.core.api.Assertions.assertThat; diff --git a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/lang/SyntaxHighlightingSensorTest.java b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/lang/SyntaxHighlightingSensorTest.java index 8cc02238d0a..fc4e865dc01 100644 --- a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/lang/SyntaxHighlightingSensorTest.java +++ b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/lang/SyntaxHighlightingSensorTest.java @@ -27,10 +27,10 @@ import org.junit.Rule; import org.junit.Test; import org.junit.rules.TemporaryFolder; import org.sonar.api.batch.sensor.highlighting.TypeOfText; -import org.sonar.scanner.fs.DefaultInputFile; -import org.sonar.scanner.fs.TestInputFileBuilder; -import org.sonar.scanner.sensor.DefaultSensorDescriptor; -import org.sonar.scanner.sensor.SensorContextTester; +import org.sonar.api.impl.fs.DefaultInputFile; +import org.sonar.api.impl.fs.TestInputFileBuilder; +import org.sonar.api.impl.sensor.DefaultSensorDescriptor; +import org.sonar.api.impl.sensor.SensorContextTester; import static org.assertj.core.api.Assertions.assertThat; diff --git a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/rule/AnalysisErrorSensorTest.java b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/rule/AnalysisErrorSensorTest.java index 2f7d074ca10..060925067e4 100644 --- a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/rule/AnalysisErrorSensorTest.java +++ b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/rule/AnalysisErrorSensorTest.java @@ -30,10 +30,10 @@ import org.junit.Rule; import org.junit.Test; import org.junit.rules.TemporaryFolder; import org.sonar.api.batch.sensor.error.AnalysisError; -import org.sonar.scanner.fs.DefaultInputFile; -import org.sonar.scanner.fs.DefaultTextPointer; -import org.sonar.scanner.fs.TestInputFileBuilder; -import org.sonar.scanner.sensor.SensorContextTester; +import org.sonar.api.impl.fs.DefaultInputFile; +import org.sonar.api.impl.fs.DefaultTextPointer; +import org.sonar.api.impl.fs.TestInputFileBuilder; +import org.sonar.api.impl.sensor.SensorContextTester; import static org.assertj.core.api.Assertions.assertThat; diff --git a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/rule/OneIssuePerLineSensorTest.java b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/rule/OneIssuePerLineSensorTest.java index 67f9325575c..24bec8caf7d 100644 --- a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/rule/OneIssuePerLineSensorTest.java +++ b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/rule/OneIssuePerLineSensorTest.java @@ -27,12 +27,12 @@ import org.sonar.api.SonarEdition; import org.sonar.api.SonarQubeSide; import org.sonar.api.batch.rule.Severity; import org.sonar.api.batch.sensor.issue.Issue; -import org.sonar.api.internal.SonarRuntimeImpl; +import org.sonar.api.impl.fs.DefaultInputFile; +import org.sonar.api.impl.fs.TestInputFileBuilder; +import org.sonar.api.impl.sensor.DefaultSensorDescriptor; +import org.sonar.api.impl.sensor.SensorContextTester; +import org.sonar.api.impl.context.SonarRuntimeImpl; import org.sonar.api.utils.Version; -import org.sonar.scanner.fs.DefaultInputFile; -import org.sonar.scanner.fs.TestInputFileBuilder; -import org.sonar.scanner.sensor.DefaultSensorDescriptor; -import org.sonar.scanner.sensor.SensorContextTester; import org.sonar.xoo.Xoo; import static org.assertj.core.api.Assertions.assertThat; diff --git a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/rule/XooRulesDefinitionTest.java b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/rule/XooRulesDefinitionTest.java index 2a4c1eda98b..e37c8f5df6a 100644 --- a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/rule/XooRulesDefinitionTest.java +++ b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/rule/XooRulesDefinitionTest.java @@ -23,11 +23,11 @@ import org.sonar.api.SonarEdition; import org.junit.Before; import org.junit.Test; import org.sonar.api.SonarQubeSide; -import org.sonar.api.internal.SonarRuntimeImpl; +import org.sonar.api.impl.context.SonarRuntimeImpl; import org.sonar.api.server.debt.DebtRemediationFunction; import org.sonar.api.server.rule.RulesDefinition; import org.sonar.api.utils.Version; -import org.sonar.server.rule.RuleDefinitionContext; +import org.sonar.api.impl.server.RuleDefinitionContext; import static org.assertj.core.api.Assertions.assertThat; diff --git a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/scm/XooBlameCommandTest.java b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/scm/XooBlameCommandTest.java index 2b02d2df949..13a780e7dc7 100644 --- a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/scm/XooBlameCommandTest.java +++ b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/scm/XooBlameCommandTest.java @@ -31,10 +31,10 @@ import org.junit.rules.TemporaryFolder; import org.sonar.api.batch.scm.BlameCommand.BlameInput; import org.sonar.api.batch.scm.BlameCommand.BlameOutput; import org.sonar.api.batch.scm.BlameLine; +import org.sonar.api.impl.fs.DefaultFileSystem; +import org.sonar.api.impl.fs.DefaultInputFile; +import org.sonar.api.impl.fs.TestInputFileBuilder; import org.sonar.api.utils.DateUtils; -import org.sonar.scanner.fs.DefaultFileSystem; -import org.sonar.scanner.fs.DefaultInputFile; -import org.sonar.scanner.fs.TestInputFileBuilder; import org.sonar.xoo.Xoo; import static java.util.Collections.singletonList; |