Class GradleTestKitSupportExtension
-
- All Implemented Interfaces:
public abstract class GradleTestKitSupportExtensionUsage:
gradleTestKitSupport { withIncludedBuildProjects("build-logic:plugin", ...) withClasspaths("myCustomClasspath", ...) disablePublication() }
-
-
Constructor Summary
Constructors Constructor Description GradleTestKitSupportExtension(Project project)
-
Method Summary
Modifier and Type Method Description final UnitwithIncludedBuildProjects(String projects)Include projects from included builds. final UnitwithClasspaths(String classpaths)gradleTestKitSupport { // Install projects on `myCustomClasspath` withClasspaths("myCustomClasspath", ...) }final UnitdisablePublication()Disable the creation of a test publication (probably as a workaround for issues with other plugins that also configure publications a little too automatically). final UnitwithSupportLibrary(String version)Adds a dependency on com.autonomousapps:gradle-testkit-supportwith version DEFAULT_SUPPORT_VERSION unless otherwise specified.final UnitwithSupportLibrary()Adds a dependency on com.autonomousapps:gradle-testkit-supportwith version DEFAULT_SUPPORT_VERSION unless otherwise specified.final UnitwithTruthLibrary(String version)Adds a dependency on com.autonomousapps:gradle-testkit-truthwith version DEFAULT_TRUTH_VERSION unless otherwise specified.final UnitwithTruthLibrary()Adds a dependency on com.autonomousapps:gradle-testkit-truthwith version DEFAULT_TRUTH_VERSION unless otherwise specified.-
-
Method Detail
-
withIncludedBuildProjects
final Unit withIncludedBuildProjects(String projects)
Include projects from included builds. Must be the fully-qualified path to the project. For example, if your included build is named "build-logic" (you have the statement
includeBuild("build-logic")in your settings script), and the build-logic project has a subproject "plugin", then call this method like this:gradleTestKitSupport { includeProjects("build-logic:plugin", ...) }TODO(tsr): this can be automated.
-
withClasspaths
final Unit withClasspaths(String classpaths)
gradleTestKitSupport { // Install projects on `myCustomClasspath` withClasspaths("myCustomClasspath", ...) }
-
disablePublication
final Unit disablePublication()
Disable the creation of a test publication (probably as a workaround for issues with other plugins that also configure publications a little too automatically).
-
withSupportLibrary
@JvmOverloads() final Unit withSupportLibrary(String version)
Adds a dependency on
com.autonomousapps:gradle-testkit-supportwith version DEFAULT_SUPPORT_VERSION unless otherwise specified.
-
withSupportLibrary
@JvmOverloads() final Unit withSupportLibrary()
Adds a dependency on
com.autonomousapps:gradle-testkit-supportwith version DEFAULT_SUPPORT_VERSION unless otherwise specified.
-
withTruthLibrary
@JvmOverloads() final Unit withTruthLibrary(String version)
Adds a dependency on
com.autonomousapps:gradle-testkit-truthwith version DEFAULT_TRUTH_VERSION unless otherwise specified.
-
withTruthLibrary
@JvmOverloads() final Unit withTruthLibrary()
Adds a dependency on
com.autonomousapps:gradle-testkit-truthwith version DEFAULT_TRUTH_VERSION unless otherwise specified.
-
-
-
-