Skip to content

Commit

Permalink
Fix circular dependency in test
Browse files Browse the repository at this point in the history
  • Loading branch information
nigelgbanks committed Jul 9, 2021
1 parent f9e594a commit c31e738
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
20 changes: 18 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
}
Expand All @@ -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
4 changes: 2 additions & 2 deletions src/main/kotlin/IsleDocker.kt
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ class IsleDocker : Plugin<Project> {
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.
Expand All @@ -522,7 +522,7 @@ class IsleDocker : Plugin<Project> {
val ipAddress: Property<String> 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)
Expand Down

0 comments on commit c31e738

Please sign in to comment.