How to skip certain modules?

Using Gradle 5.0 and working with a big repo with some hundred modules I’m trying to replace some technology in one of the core parts which makes many projects fail while in transition.
Since I would still like to use the CI/CD for the time being I’m looking for a way to disable theses projects temporary.

I prefere a central location to disable these projects to reduce conflicts when rebasing / merging with updates from the development branch.

Can this be done programatically in build.gradle or settings.gradle similar to the way -xworks on the command line?