Skip to content

Move root project to dedicated core folder #3444

@bric3

Description

@bric3

Currently the main Mockito source code lives in the root folder. This is not ideal:

  1. That means that we have next to each other src/main/java and subprojects, this is strange and almost confusing for any new contributors.
  2. This doesn't align with what other notable projects (spring, micronaut, micrometer, etc.) do, i.e. they have a root folder and their various components are located in sub-modules of the root folder.
  3. The root Gradle build script has to mix configurations for both the root project, mockito-core and the subprojects

We could imagine something like this :

├── ./mockito-core
└── ./mockito-extensions
│   ├── ./bom
│   └── ./subclass-mockmacker 
└── ./mockito-integration-tests
    ├── ...
    └── ./java-21-tests

This will enable a clear separation of the build scripts.

Cons, git will perceive this as a move and could make diffs a tad more difficult, by using a --follow. Even in IntelliJ automatically follows the file when looking at the file history (clicking on the colored line expand them with the new name).

Github has improved at tracking this.

I believe the benefit outweighs this issue.


As a side note: This is not the first time that sources are moved in Mockito history, when Mockito moved from SVN to Mercurial, then to git, the source folder was also different (we had src then src/main/java).

Depends on #3443

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions