-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename ociDependencies extension -> ociImageDependencies
Rename image dependency collector -> runtime Rename imageScope(String) dependency collector -> runtimeScope(String)
- Loading branch information
Showing
6 changed files
with
59 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 0 additions & 36 deletions
36
src/main/kotlin/io/github/sgtsilvio/gradle/oci/dsl/OciDependenciesExtension.kt
This file was deleted.
Oops, something went wrong.
37 changes: 37 additions & 0 deletions
37
src/main/kotlin/io/github/sgtsilvio/gradle/oci/dsl/OciImageDependenciesExtension.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package io.github.sgtsilvio.gradle.oci.dsl | ||
|
||
import org.gradle.api.Action | ||
import org.gradle.api.plugins.jvm.JvmTestSuite | ||
import org.gradle.api.tasks.TaskProvider | ||
import org.gradle.api.tasks.testing.Test | ||
|
||
/** | ||
* @author Silvio Giebl | ||
*/ | ||
interface OciImageDependenciesExtension : DependencyConstraintFactories { | ||
|
||
fun forTestSuite(testSuite: JvmTestSuite): OciImageDependenciesForRuntime | ||
|
||
fun forTestSuite(testSuite: JvmTestSuite, action: Action<in OciImageDependenciesForRuntime>) = | ||
action.execute(forTestSuite(testSuite)) | ||
|
||
fun forTest(testTask: TaskProvider<Test>): OciImageDependenciesForRuntime | ||
|
||
fun forTest(testTask: TaskProvider<Test>, action: Action<in OciImageDependenciesForRuntime>) = | ||
action.execute(forTest(testTask)) | ||
|
||
// dsl syntactic sugar | ||
|
||
val JvmTestSuite.runtime get() = forTestSuite(this).runtime | ||
|
||
fun JvmTestSuite.runtimeScope(scope: String) = forTestSuite(this).runtimeScope(scope) | ||
|
||
// no dsl syntactic sugar for Test because is should not be used inside a lazy task configuration | ||
} | ||
|
||
interface OciImageDependenciesForRuntime : DependencyConstraintFactories { | ||
|
||
val runtime: ResolvableOciImageDependencies | ||
|
||
fun runtimeScope(scope: String): ResolvableOciImageDependencies | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters