Android Studio: How to exclude Doc Folder from Search and other functionality?

你说的曾经没有我的故事 提交于 2019-12-11 15:32:22

问题


I have a huge auto-generated documentation folder in my Android project.

Unfortunately, all the auto-generated doc files clutter the refactoring and search functionality of Android Studio (e.g. rename, find references, search and replace).

An obvious solution would be to move the entire Android Studio project to a subfolder of the git repo, but I want to avoid this route.

How can I make Android Studio ignore a selected documentation folder?

I have one more requirement: The solution must work for all fellow developers who clone the repo. I do not want any configuration that must be manually applied for each developer machine.


回答1:


The following snippet works for Android Studio 3.5. Put this into your root level build.gradle:

apply plugin: 'idea'
idea {
    module {
        excludeDirs += file('mydocfolder')
    }
}

Then sync with gradle and mydocfolder should appear in a different color in the project view. Note that excludeDirs.add(file('mydocfolder')) does not work.



来源:https://stackoverflow.com/questions/58033717/android-studio-how-to-exclude-doc-folder-from-search-and-other-functionality

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!