From c31e7388a6a9f2cf20acc9c3f58a1e174d6e08dc Mon Sep 17 00:00:00 2001 From: Nigel Banks Date: Fri, 9 Jul 2021 11:30:25 +0100 Subject: [PATCH] Fix circular dependency in test --- README.md | 20 ++++++++++++++++++-- src/main/kotlin/IsleDocker.kt | 4 ++-- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 8ef7055..0454a04 100644 --- a/README.md +++ b/README.md @@ -123,12 +123,22 @@ Alternatively you can rely on the Github actions which will publish when a relea ## Using the Plugin +To include this plugin for versions 0.6+ add the following to your `build.gradle.kts` file: + +```kotlin +plugins { + id("com.github.nigelgbanks.IsleDocker") version "0.6" +} +``` + +## Using the Plugin from Source + To include this plugin in another project use the following snippet of Kotlin script in your Gradle project with the `settings.gradle.kts` file that allows the plugin source to be discoverable: ```kotlin sourceControl { - gitRepository(uri("https://github.com/Islandora-Devops/isle-gradle-docker-plugin.git")) { + gitRepository(uri("file:///PATH_TO_FOLDER/isle-gradle-docker-plugin/.git")) { producesModule("com.github.nigelgbanks:isle-gradle-docker-plugin") } } @@ -142,10 +152,16 @@ buildscript { gradlePluginPortal() } dependencies { - classpath("com.github.nigelgbanks:isle-gradle-docker-plugin:0.0.6") + classpath("com.github.nigelgbanks:isle-gradle-docker-plugin") { + version { + branch = "BRANCH_NAME" + } + } } } apply(plugin = "com.github.nigelgbanks.IsleDocker") ``` +Note that it will only use **committed** changes. + [Buildkit]: https://github.com/moby/buildkit/blob/main/frontend/dockerfile/docs/experimental.md diff --git a/src/main/kotlin/IsleDocker.kt b/src/main/kotlin/IsleDocker.kt index bd07af1..0761b81 100644 --- a/src/main/kotlin/IsleDocker.kt +++ b/src/main/kotlin/IsleDocker.kt @@ -508,7 +508,7 @@ class IsleDocker : Plugin { tasks.register("test") { group = isleBuildkitGroup description = "Test docker image(s)" - dependsOn(project.subprojects.mapNotNull { it.tasks.matching { task -> task.name == "test" } }) + dependsOn(this.project.subprojects.mapNotNull { it.tasks.matching { task -> task.name == "test" } }) } // All build tasks have a number of shared defaults that can be overridden. @@ -522,7 +522,7 @@ class IsleDocker : Plugin { val ipAddress: Property by it.extra listOf("${localRepository}:${ipAddress.get()}") }) - // Use the choosen builder. + // Use the chosen builder. builder.set(createBuilder.map { it.options.name.get() }) } tags.convention(defaultTags)