Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In Android development, what files should be committed to a repository?

Tags:

android

Which files in an Android project should be committed to a version control repository? Which files should not be committed?

Right now my .gitignore file consists of the following lines:

# Android generated files # ########################### android.keystore local.properties bin/ gen/ libs/ obj/  # OS generated files # ###################### .DS_Store* ehthumbs.db Icon? Thumbs.db  # Eclipse generated files # ########################### .settings/org.eclipse.jdt.core.prefs 

Am I missing anything?

like image 443
Eric Avatar asked Dec 14 '11 16:12

Eric


People also ask

Which file contains used in an Android application development project?

xml: Every project in Android includes a manifest file, which is AndroidManifest. xml, stored in the root directory of its project hierarchy. The manifest file is an important part of our app because it defines the structure and metadata of our application, its components, and its requirements.

What are repositories in Android?

A repository class isolates data sources, such as a Room database and web services, from the rest of the app. The repository class provides a clean API for data access to the rest of the app. Using repositories is a recommended best practice for code separation and architecture.


1 Answers

GitHub maintains an official list of recommended .gitignore files at this public repository.

For Android you can find it here

Or just copy/paste :

# Built application files *.apk *.aar *.ap_ *.aab  # Files for the ART/Dalvik VM *.dex  # Java class files *.class  # Generated files bin/ gen/ out/ #  Uncomment the following line in case you need and you don't have the release build type files in your app # release/  # Gradle files .gradle/ build/  # Local configuration file (sdk path, etc) local.properties  # Proguard folder generated by Eclipse proguard/  # Log Files *.log  # Android Studio Navigation editor temp files .navigation/  # Android Studio captures folder captures/  # IntelliJ *.iml .idea/workspace.xml .idea/tasks.xml .idea/gradle.xml .idea/assetWizardSettings.xml .idea/dictionaries .idea/libraries # Android Studio 3 in .gitignore file. .idea/caches .idea/modules.xml # Comment next line if keeping position of elements in Navigation Editor is relevant for you .idea/navEditor.xml  # Keystore files # Uncomment the following lines if you do not want to check your keystore files in. #*.jks #*.keystore  # External native build folder generated in Android Studio 2.2 and later .externalNativeBuild .cxx/  # Google Services (e.g. APIs or Firebase) # google-services.json  # Freeline freeline.py freeline/ freeline_project_description.json  # fastlane fastlane/report.xml fastlane/Preview.html fastlane/screenshots fastlane/test_output fastlane/readme.md  # Version control vcs.xml  # lint lint/intermediates/ lint/generated/ lint/outputs/ lint/tmp/ # lint/reports/ 
like image 154
mt0s Avatar answered Oct 23 '22 14:10

mt0s