plugins { id 'ca.platform-module' id 'me.champeau.jmh' } jmh { jmhVersion = libs.versions.jmh.get() includeTests = true } dependencies { api project(':messaging:messaging-core-api') api project(':messaging:messaging-policy') api project(':messaging:messaging-transport-spi') api 'org.junit.jupiter:junit-jupiter' api 'org.assertj:assertj-core' } // The repository contracts of the whole library: every module's public signatures against its // declared `api` scope, and the one owner of the `app.messaging` settings namespace. They read other // modules' sources and build scripts, so they run in a lane of their own that declares exactly those // files as inputs and receives the repository root; the plain `test` lane gets no root, and a test // that reads the repository without the tag fails there. The template ran them in its app-bootstrap // `repositoryContractTest` lane until the library left it. Part of `check`, so of the pull-request // stage. def repositoryRoot = rootProject.projectDir strictTestLanes { lane('repositoryContractTest') { tag = 'repository-contract' description = 'Holds every module to its declared api scope and the one owner of app.messaging.' systemProperty 'ca.repository.root', repositoryRoot.absolutePath customize { Test task -> task.inputs.files(fileTree(repositoryRoot) { include 'messaging/*/build.gradle', 'messaging/*/src/main/**', 'gradle/libs.versions.toml' exclude '**/build/**' }).withPathSensitivity(PathSensitivity.RELATIVE).withPropertyName('repositoryContractInputs') } } } tasks.named('test', Test) { useJUnitPlatform { excludeTags 'repository-contract' } } tasks.named('check') { dependsOn 'repositoryContractTest' }