Skip to content

Commit b36effd

Browse files
committed
Use buildscript of module where SKIE is applied to resolve the Gradle plugin instead of rootProject.
1 parent 481a0d4 commit b36effd

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

SKIE/skie-gradle/plugin-loader/src/main/kotlin/co/touchlab/skie/plugin/SkieLoaderPlugin.kt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ abstract class SkieLoaderPlugin: Plugin<Project> {
3737
log.info("Resolving SKIE gradle plugin for Kotlin plugin version $kotlinVersion and Gradle version $gradleVersion")
3838

3939
KotlinCompilerVersion.registerIn(project.dependencies)
40-
KotlinCompilerVersion.registerIn(rootProject.buildscript.dependencies)
41-
val skieGradleConfiguration = rootProject.buildscript.configurations.detachedConfiguration(
42-
project.dependencies.create(BuildConfig.SKIE_GRADLE_PLUGIN_DEPENDENCY)
40+
KotlinCompilerVersion.registerIn(buildscript.dependencies)
41+
val skieGradleConfiguration = buildscript.configurations.detachedConfiguration(
42+
buildscript.dependencies.create(BuildConfig.SKIE_GRADLE_PLUGIN_DEPENDENCY)
4343
).apply {
4444
this.isCanBeConsumed = false
4545
this.isCanBeResolved = true
@@ -51,9 +51,9 @@ abstract class SkieLoaderPlugin: Plugin<Project> {
5151
)
5252

5353
attributes {
54-
attribute(Category.CATEGORY_ATTRIBUTE, project.objects.named(Category.LIBRARY))
55-
attribute(Usage.USAGE_ATTRIBUTE, project.objects.named(Usage.JAVA_RUNTIME))
56-
attribute(LibraryElements.LIBRARY_ELEMENTS_ATTRIBUTE, project.objects.named(LibraryElements.JAR))
54+
attribute(Category.CATEGORY_ATTRIBUTE, objects.named(Category.LIBRARY))
55+
attribute(Usage.USAGE_ATTRIBUTE, objects.named(Usage.JAVA_RUNTIME))
56+
attribute(LibraryElements.LIBRARY_ELEMENTS_ATTRIBUTE, objects.named(LibraryElements.JAR))
5757
attribute(Usage.USAGE_ATTRIBUTE, objects.named(Usage.JAVA_RUNTIME))
5858
attribute(KotlinCompilerVersion.attribute, objects.named(kotlinVersion))
5959
if (GradleVersion.current() >= GradleVersion.version("7.0")) {

0 commit comments

Comments
 (0)