You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a basic example. The real project has many more modules. The idea, though, is that the root build.gradle is applying the plugin to all subprojects except for certain ones. In this case, let's say we're excluding "bar".
The problem, though, is that by applying it in "foo" the sources in "bar" will automatically be formatted.
For now, I can configure this myself and have each project specify only its Java source folders as GJF sources, but it would be nice if this was the default. Operating outside of these folders would then become the thing which required explicit configuration.
The text was updated successfully, but these errors were encountered:
There are arguments against using the project's java sourceSets as default input (see #3 and #11). I'm not sure if this is still an issue for Android builds.
Adding default excludes for subproject directories might be a solution. Would that solve your problem?
Ah, good 'ol Android Gradle plugin. I did search for history on the topic but didn't read past the issue descriptions. The important bits are in the follow-up comments of those.
There's really only two plugins (or at least their supertypes) that cover 99.99% of use cases, right? The Java base plugin and Android base plugin. Detecting these would give you a working plugin without configuration in almost every case. Anyone doing something more bespoke could still do something custom.
Excluding subproject directories would certainly seem to solve it, though.
By using the project directory as the default input, nested projects are automatically formatted.
For example,
This is a basic example. The real project has many more modules. The idea, though, is that the root
build.gradle
is applying the plugin to all subprojects except for certain ones. In this case, let's say we're excluding "bar".The problem, though, is that by applying it in "foo" the sources in "bar" will automatically be formatted.
For now, I can configure this myself and have each project specify only its Java source folders as GJF sources, but it would be nice if this was the default. Operating outside of these folders would then become the thing which required explicit configuration.
The text was updated successfully, but these errors were encountered: