File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed
main/java/org/sonarsource/kotlin/plugin
test/java/org/sonarsource/kotlin/plugin Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change 16
16
*/
17
17
package org.sonarsource.kotlin.plugin
18
18
19
+ import com.sonarsource.plugins.kotlin.api.KotlinPluginExtensionsProvider
19
20
import org.sonar.api.Plugin
20
21
import org.sonar.api.SonarProduct
21
22
import org.sonar.api.config.PropertyDefinition
@@ -33,7 +34,7 @@ import org.sonarsource.kotlin.surefire.KotlinResourcesLocator
33
34
import org.sonarsource.kotlin.surefire.KotlinSurefireParser
34
35
import org.sonarsource.kotlin.surefire.KotlinSurefireSensor
35
36
36
- class KotlinPlugin : Plugin {
37
+ class KotlinPlugin : Plugin , KotlinPluginExtensionsProvider {
37
38
38
39
companion object {
39
40
// Subcategories
@@ -108,4 +109,8 @@ class KotlinPlugin : Plugin {
108
109
)
109
110
}
110
111
}
112
+
113
+ override fun registerKotlinPluginExtensions (extensions : KotlinPluginExtensionsProvider .Extensions ) {
114
+ // nothing to do
115
+ }
111
116
}
Original file line number Diff line number Diff line change 16
16
*/
17
17
package org.sonarsource.kotlin.plugin
18
18
19
+ import com.sonarsource.plugins.kotlin.api.KotlinPluginExtensionsProvider
19
20
import org.assertj.core.api.Assertions
20
21
import org.junit.jupiter.api.Test
21
22
import org.sonar.api.Plugin
@@ -27,11 +28,18 @@ import org.sonar.api.internal.SonarRuntimeImpl
27
28
import org.sonar.api.utils.Version
28
29
import kotlin.time.ExperimentalTime
29
30
import org.sonar.api.config.Configuration
30
- import org.sonarsource.kotlin.gradle.GRADLE_PROJECT_ROOT_PROPERTY
31
31
import java.util.Optional
32
32
33
33
@ExperimentalTime
34
34
internal class KotlinPluginTest {
35
+
36
+ @Test
37
+ fun `should implement KotlinPluginExtensionsProvider` () {
38
+ Assertions .assertThat(KotlinPlugin ::class .java.interfaces)
39
+ .describedAs(" To please dependency injection framework of SonarQube Cloud" )
40
+ .contains(KotlinPluginExtensionsProvider ::class .java)
41
+ }
42
+
35
43
@Test
36
44
fun testSonarQube () {
37
45
testSonarQube(19 )
You can’t perform that action at this time.
0 commit comments