Skip to content
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

Merged
merged 1 commit into from Aug 4, 2014

Conversation

sigmabeta
Copy link
Contributor

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.

.idea
gradle/

# From old .gitignore

This comment was marked as off-topic.

This comment was marked as off-topic.

@neobrain
Copy link
Member

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.

@sigmabeta
Copy link
Contributor Author

@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.

@neobrain
Copy link
Member

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.

@sigmabeta
Copy link
Contributor Author

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)

@Sonicadvance1
Copy link
Contributor

Is there a reason to ignore Eclipse project files when we don't support Eclipse as a build system anymore?
Other than that I don't see an issue, we already ignore visual studio generated files in the main gitignore as well.
No reason to be picky about which build system's files we are ignoring here when we support multiple.

@sigmabeta
Copy link
Contributor Author

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.

@Sonicadvance1
Copy link
Contributor

Apparently we are compatible with Eclipse still for compiling the UI.
So meeh.
This LGTM.

@lioncash
Copy link
Member

Looks fine

@sigmabeta
Copy link
Contributor Author

Should be all set to merge now, pending @neobrain 's response.

@neobrain
Copy link
Member

neobrain commented Aug 4, 2014

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)

neobrain added a commit that referenced this pull request Aug 4, 2014
[Android] Add a bunch of gradle/AS related stuff to gitignore.
@neobrain neobrain merged commit 99dc069 into dolphin-emu:master Aug 4, 2014
@sigmabeta sigmabeta deleted the android-studio-gitignore branch June 9, 2015 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants