New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Android] Add a bunch of gradle/AS related stuff to gitignore. #597
[Android] Add a bunch of gradle/AS related stuff to gitignore. #597
Conversation
| .idea | ||
| gradle/ | ||
|
|
||
| # From old .gitignore |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
|
Does Android Studio not support out-of-source builds? While this looks mostly well-documented, I'd rather not add a new long-ish list of .gitignores for every random IDE out there. EDIT: Just noticed that this is not the "main" .gitignore, but the one in Android. Welp, point still stands, but is probably less critical. |
|
@neobrain That's a fair point, but there are two major IDEs available for Android, and one of them is likely to be deprecated soon. I think everyone is either using Android Studio or the command-line. We use Gradle for building the app, which means we've already tied ourselves to Android Studio. If someone new is going to pick a development environment with which to contribute to the Android project, it's likely they'll benefit from this. Also, it's not necessarily build related files that are affected by this ignore. As an example, /.idea/ contains files that dictate the project's code style, the path to the gradle executable, etc. |
|
Regardless, if Android Studio supports out-of-source builds (i.e. putting everything into a build directory rather than spreading files all over the place), that should be the recommended build practice instead of working around bad build setup. |
|
I'm not sure I understand your feedback. You can have gradle place build artifacts outside of the source directories, but that's the problem I'm trying to solve with this PR; rather, it's metadata generated and used by the IDE. Things like an XML file that lists what native libraries the project uses. I don't know of any way to get Android Studio not to generate these files, or to relocate them. I understand wanting to do things the right way, but what I've put into the .gitignore file is a pretty standard list of things IntelliJ/Eclipse/AS users generally put into their .gitignore files. If this isn't the correct usage of a .gitignore file, then what is? Also, as you've pointed out, this file will only affect the Android source. (I did forget to fix the lack of newline at EOF, I'll take care of it tonight) |
|
Is there a reason to ignore Eclipse project files when we don't support Eclipse as a build system anymore? |
|
The reason Eclipse is in there is because I pulled my additions out of the .gitignore i use for one of my personal projects, for which I did at one point use Eclipse. I don't think it harms anything to ignore those two very specific files, but if no one is using Eclipse it doesn't really matter; I'll remove it if you want. |
|
Apparently we are compatible with Eclipse still for compiling the UI. |
|
Looks fine |
|
Should be all set to merge now, pending @neobrain 's response. |
|
Welp, Android is not my business so if @Sonicadvance1 LGTM's this, then whatever. (Just don't hold this against me if this comes up for the main .gitignore again) |
[Android] Add a bunch of gradle/AS related stuff to gitignore.
There are a LOT of files in the repository that probably shouldn't be. it seems like every time I fire up Android Studio, some metadata file indicating which tab I clicked on last Thursday is being edited, and I have to manually remove them from my commits.
What I've added to gitignore should suffice for most Android Studio projects. I know that just adding it to gitignore won't take it out of the repository, but I think someone who's better at Git than me should handle that.