Gradle - Custom task classes in a custom folder within the same project

StackOverflow https://stackoverflow.com/questions/23595006

  •  20-07-2023
  •  | 
  •  

Frage

I have a custom Gradle Task in my project under /buildSrc/src/main/groovy. Since this folder is in parallel to the main project's /src/main/groovy folder, my IDE considers /buildSrc as a sub-project.

From the documentation, I understand the custom tasks can reside either under /buildSrc or under a separate project.

I don't want to create a new project, so I am thinking of keeping it somewhere other than /buildSrc. Is it possible to achieve this?

War es hilfreich?

Lösung

No, it isn't possible. The IDE likely considers buildSrc a subproject in order to offer IDE support for developing custom tasks and plugins (not because the directory is "parallel" to anything).

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top