SourceSet excludes not enforced in Android Studio?

68 views
Skip to first unread message

Michael Wallstedt

unread,
Jul 1, 2014, 5:57:04 PM7/1/14
to adt...@googlegroups.com
I'd like to add an android library to our project where only sources from a particular subdirectory are included. I've tried using the 'includes' and 'excludes' attributes on the gradle SourceSet, but when I view the generated module in Android Studio, the undesired sources are still visible. Furthermore, this seems to cause issues with an existing module since its sources overlap with those that should be excluded. This existing module disappears from the project view when the new module is added.

Alternatively, it might work to define the content root in the subdirectory that would include only the sources I want, if there was a way to set a package prefix on the module.

Xavier Ducrohet

unread,
Jul 1, 2014, 8:30:10 PM7/1/14
to adt...@googlegroups.com
AFAIK IntelliJ doesn't support include/exclude patterns on source folders.


On Tue, Jul 1, 2014 at 2:57 PM, Michael Wallstedt <mikewa...@google.com> wrote:
I'd like to add an android library to our project where only sources from a particular subdirectory are included. I've tried using the 'includes' and 'excludes' attributes on the gradle SourceSet, but when I view the generated module in Android Studio, the undesired sources are still visible. Furthermore, this seems to cause issues with an existing module since its sources overlap with those that should be excluded. This existing module disappears from the project view when the new module is added.

Alternatively, it might work to define the content root in the subdirectory that would include only the sources I want, if there was a way to set a package prefix on the module.

--
You received this message because you are subscribed to the Google Groups "adt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adt-dev+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Xavier Ducrohet
Android SDK Tech Lead
Google Inc.
http://developer.android.com | http://tools.android.com

Please do not send me questions directly. Thanks!
Reply all
Reply to author
Forward
0 new messages