Hi @twof! Welcome to the Gradle community.
Unfortunately, the project (swagger) you are depending on is built with Maven. Source dependencies currently only work with projects that have a Gradle build.
You would need to build your modified version locally with Maven and then depend on it. You can do that, for example, by installing a snapshot with Maven to mavenLocal() and then depending on it in Gradle.
https://docs.gradle.org/current/userguide/declaring_repositories.html#sec:case-for-maven-local