-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Description
Currently, the subprojects
host both Mockito extensions and integration-tests.
Both should be separated in their own hierarchy to improve the visual understanding of what is what. This would also help improve to apply different Gradle configurations for each kind of project.
There are other improvements trickling down
-
This structure led to a programmatic setup in
settings.gradle.kts
, that injects the location of the project, this should be avoided by using the parent, e.g.mockito-integration-tests:inline-mocks-tests
:- rootProject.children.forEach { project -> - val projectDirName = "subprojects/${project.name}" - project.projectDir = File(settingsDir, projectDirName) - project.buildFileName = "${project.name}.gradle" - require(project.projectDir.isDirectory) { - "Project directory ${project.projectDir} for project ${project.name} does not exist." - } - require(project.buildFile.isFile) { - "Build file ${project.buildFile} for project ${project.name} does not exist." - } - }
-
The
bom
project needs to filter which project has to figure out be included. Right now it uses a heuristic based on whether the project name ends withtest
. This can be simplified:- project.rootProject.subprojects.forEach { subproject -> - if (!subproject.name.endsWith("Test") && - !subproject.name.endsWith("-test") && - subproject.name != "bom") { - api(subproject) - } + project(":mockito-extensions").subprojects.forEach { + api(it) }
-
Moreover the subproject build scripts have a non conventional name, e.g.
androidTest.gradle
, rather thanbuild.gradle
. This needs to be changed.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status