Back to Compose Multiplatform

proejct-test-convention

repo/gradle-build-conventions/project-tests-convention/Readme.md

2.3.20662 B
Original Source

proejct-test-convention

Description

This plugin adds dependencies to the test tasks, building the required jars and tracking them as inputs, but it passes the absolute paths to the test as systemProperties.

This plugin is key for:

  • make tests cacheable, avoiding execution if no input changed
  • allow Gradle Predictive Test Selection to understand the code changes and have an accurate prediction

Usage

Apply it:

kotlin
plugins {
    id("project-tests-convention")
}

Add dependencies to the test classpath:

kotlin
projectTests {
    withJvmStdlibAndReflect()
    withStdlibCommon()
    withTestJar()
    withAnnotations()
    ...
}