@@ -191,20 +191,17 @@ Within this PR, `spine-version-catalog` is a resident of `time` repository, but
191191it is a standalone project. Meaning, it has its own Gradle's ` settings ` file,
192192and doesn't relate anyhow to ` time ` .
193193
194- ` spine-version-catalog ` consists of several modules:
194+ ` spine-version-catalog ` consists of two modules:
195195
196- 1 . ` api ` – represents a facade upon Gradle's provided ` VersionCatalogBuilder ` .
197- This module hides an imperative nature of the builder, and, instead, provides
198- a declarative API to declare dependencies using Kotlin objects.
196+ 1 . ` catalog ` – provides a facade upon Gradle's provided ` VersionCatalogBuilder `
197+ and assembles ` SpineVersionCatalog ` , using that facade.
199198
200- 2 . ` catalog ` – contains all dependencies, declared using the declarative ` api ` .
201- The module publishes ` SpineVersionCatalog ` .
202-
203- 3 . ` func-test ` – performs testing of ` api ` with a real ` VersionCatalogBuilder ` .
199+ 2 . ` func-test ` – performs testing of the facade with a real instance of ` VersionCatalogBuilder ` .
204200To do that, the module does the following:
205201
206202 1 . Assembles a ` dummy-catalog ` with a single ` Dummy ` dependency and publishes
207- it to Maven local.
203+ it to Maven local. In order to declare ` Dummy ` , the module depends on ` :catalog ` ,
204+ which exposes the declarative facade.
208205 2 . Makes ` dummy-project ` use ` dummy-catalog ` from Maven local.
209206 3 . Builds ` dummy-project ` . It has assertions in its build file. Those assertions verify
210207 the generated type-safe accessors to ` Dummy ` dependency. When any of assertions
@@ -213,20 +210,6 @@ To do that, the module does the following:
213210
214211## Details about Functional Testing
215212
216- ` func-test ` module sets the next dependencies for ` test ` task:
217-
218- ``` kotlin
219- test {
220- dependsOn(
221- " :api:publishToMavenLocal" ,
222- " :func-test:dummy-catalog:publishToMavenLocal"
223- )
224- }
225- ```
226-
227- It is so, because ` dummy-project ` (which the test builds), fetches ` dummy-catalog `
228- from Maven local. Which, in turn, depends on ` api ` module. Thus, we need them both in Maven local.
229-
230213We have to do a true functional testing here, because Gradle does not provide
231214a test fixture for ` Settings ` , as it does for ` Project ` . For this reason, we test
232215it on a real Gradle project, with assertions right in a build file.
0 commit comments