From b36effd675d4fcc193f9afe11d3e60255c73ac5e Mon Sep 17 00:00:00 2001 From: Tadeas Kriz Date: Tue, 5 Sep 2023 23:24:30 -0400 Subject: [PATCH] Use buildscript of module where SKIE is applied to resolve the Gradle plugin instead of rootProject. --- .../co/touchlab/skie/plugin/SkieLoaderPlugin.kt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/SKIE/skie-gradle/plugin-loader/src/main/kotlin/co/touchlab/skie/plugin/SkieLoaderPlugin.kt b/SKIE/skie-gradle/plugin-loader/src/main/kotlin/co/touchlab/skie/plugin/SkieLoaderPlugin.kt index a370a6b60..e73461dfb 100644 --- a/SKIE/skie-gradle/plugin-loader/src/main/kotlin/co/touchlab/skie/plugin/SkieLoaderPlugin.kt +++ b/SKIE/skie-gradle/plugin-loader/src/main/kotlin/co/touchlab/skie/plugin/SkieLoaderPlugin.kt @@ -37,9 +37,9 @@ abstract class SkieLoaderPlugin: Plugin { log.info("Resolving SKIE gradle plugin for Kotlin plugin version $kotlinVersion and Gradle version $gradleVersion") KotlinCompilerVersion.registerIn(project.dependencies) - KotlinCompilerVersion.registerIn(rootProject.buildscript.dependencies) - val skieGradleConfiguration = rootProject.buildscript.configurations.detachedConfiguration( - project.dependencies.create(BuildConfig.SKIE_GRADLE_PLUGIN_DEPENDENCY) + KotlinCompilerVersion.registerIn(buildscript.dependencies) + val skieGradleConfiguration = buildscript.configurations.detachedConfiguration( + buildscript.dependencies.create(BuildConfig.SKIE_GRADLE_PLUGIN_DEPENDENCY) ).apply { this.isCanBeConsumed = false this.isCanBeResolved = true @@ -51,9 +51,9 @@ abstract class SkieLoaderPlugin: Plugin { ) attributes { - attribute(Category.CATEGORY_ATTRIBUTE, project.objects.named(Category.LIBRARY)) - attribute(Usage.USAGE_ATTRIBUTE, project.objects.named(Usage.JAVA_RUNTIME)) - attribute(LibraryElements.LIBRARY_ELEMENTS_ATTRIBUTE, project.objects.named(LibraryElements.JAR)) + attribute(Category.CATEGORY_ATTRIBUTE, objects.named(Category.LIBRARY)) + attribute(Usage.USAGE_ATTRIBUTE, objects.named(Usage.JAVA_RUNTIME)) + attribute(LibraryElements.LIBRARY_ELEMENTS_ATTRIBUTE, objects.named(LibraryElements.JAR)) attribute(Usage.USAGE_ATTRIBUTE, objects.named(Usage.JAVA_RUNTIME)) attribute(KotlinCompilerVersion.attribute, objects.named(kotlinVersion)) if (GradleVersion.current() >= GradleVersion.version("7.0")) {