@@ -37,12 +37,10 @@ import javax.inject.Inject
37
37
38
38
@Suppress(" UnstableApiUsage" )
39
39
class KordExPlugin @Inject constructor(
40
- problems : Problems ,
40
+ val problems : Problems ,
41
41
val dependencies : DependencyFactory ,
42
42
val providers : ProviderFactory ,
43
43
) : Plugin<Project> {
44
- val problemReporter = problems.forNamespace(" dev.kordex" )
45
-
46
44
@Suppress(" UnnecessaryParentheses" )
47
45
override fun apply (target : Project ) {
48
46
val extension = target.extensions.create<KordExExtension >(" kordEx" ).apply {
@@ -55,7 +53,7 @@ class KordExPlugin @Inject constructor(
55
53
56
54
KspPluginHelper .apply (target)
57
55
58
- target.checkTask(extension, versionsProvider, problemReporter )
56
+ target.checkTask(extension, versionsProvider, problems.reporter )
59
57
60
58
target.configurations.all {
61
59
dependencies.addAllLater(
@@ -120,15 +118,15 @@ class KordExPlugin @Inject constructor(
120
118
val versions = versionsProvider.get()
121
119
122
120
if (extension.hasBot && extension.hasPlugin) {
123
- problemReporter .throwing {
121
+ problems.reporter .throwing {
124
122
withException(
125
123
RuntimeException (
126
124
" Project is both bot and plugin - if you need both in the same project, split them into " +
127
125
" separate Gradle subprojects"
128
126
)
129
127
)
130
128
131
- id(" both-bot-and-plugin" , " Project is both bot and plugin" )
129
+ id(" dev.kordex.gradle.plugins.kordex. both-bot-and-plugin" , " Project is both bot and plugin" )
132
130
details(" Project ${target.name} cannot be both a bot and a plugin" )
133
131
solution(" If you need both in the same project, split them into separate Gradle subprojects" )
134
132
severity(Severity .ERROR )
0 commit comments