Skip to content

Commit

Permalink
Use buildscript of module where SKIE is applied to resolve the Gradle…
Browse files Browse the repository at this point in the history
… plugin instead of rootProject.
  • Loading branch information
TadeasKriz committed Sep 6, 2023
1 parent 481a0d4 commit b36effd
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ abstract class SkieLoaderPlugin: Plugin<Project> {
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
Expand All @@ -51,9 +51,9 @@ abstract class SkieLoaderPlugin: Plugin<Project> {
)

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")) {
Expand Down

0 comments on commit b36effd

Please sign in to comment.