DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Please enter at least three characters to search
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Last call! Secure your stack and shape the future! Help dev teams across the globe navigate their software supply chain security challenges.

Modernize your data layer. Learn how to design cloud-native database architectures to meet the evolving demands of AI and GenAI workloads.

Releasing software shouldn't be stressful or risky. Learn how to leverage progressive delivery techniques to ensure safer deployments.

Avoid machine learning mistakes and boost model performance! Discover key ML patterns, anti-patterns, data strategies, and more.

Related

  • How it Feels to Switch from Eclipse to Android Studio
  • Overview of Android Networking Tools: Receiving, Sending, Inspecting, and Mock Servers
  • How to Rectify R Package Error in Android Studio
  • Exploring the Salesforce Mobile SDK Using Android Studio

Trending

  • Issue and Present Verifiable Credentials With Spring Boot and Android
  • *You* Can Shape Trend Reports: Join DZone's Software Supply Chain Security Research
  • AI-Based Threat Detection in Cloud Security
  • The Modern Data Stack Is Overrated — Here’s What Works
  1. DZone
  2. Testing, Deployment, and Maintenance
  3. Deployment
  4. Version Control of Android Studio Project via SVN

Version Control of Android Studio Project via SVN

In this tutorial, we'll learn how to add version control to our Android-based applications using Apache's open source SVN.

By 
Devika Nigam user avatar
Devika Nigam
·
Sep. 18, 18 · Tutorial
Likes (1)
Comment
Save
Tweet
Share
17.8K Views

Join the DZone community and get the full member experience.

Join For Free

Apache Subversion (SVN)

SVN stands for Apache Subversion, a software versioning and revision control system distributed as open source under the Apache License.

In order to demonstrate the process of adding an Android Studio project to SVN,  let's first create a new project in Android Studio and name it HelloWorldProject.

The project structure looks like this :

Now that the project has been created, let us import it into SVN. The steps for importing are:

  1. Enable Version Control: Go to VCS menu → Enable Version Control Integration
  2. In the popup, select Subversion from the dropdown list.
  3. Add Your SVN Repository URL Go to VCS menu → Checkout from Version Control → Subversion Enter the Repository URL in the popup. This URL is the link to the SVN cloud where your repository will be stored. After adding the URL, select the Checkout button. You will be asked to select the checkout directory (in our case it will be:...\AndroidStudioProjects\HelloWorldProject).
  4. After the above step is completed, another popup is shown to select the checkout options like below: Here select the destination and go with the defaults. Now you will be required to enter the authentication credentials.
  5. Now that the project has been set up, it is time to add the files and folders to SVN. NOTE: Only those files or folders must be added to SVN that are project relevant, i.e, all the files or folders that can be generated by the IDE at the time of project initialization must be ignored from adding to SVN. In this case, files and folders that must be added to SVN are: Within the "HelloWorldProject" folder:
    1. "gradle" folder
    2. "build.gradle" file
    3. "gradlew" and "gradlew.bat" files
    4. "settings.gradle" file
    5. "gradle.properties" file
    6. Within "app" folder
      • "libs" folder
      • "src" folder
      • "build.gradle" file
      • "proguard-rules.pro" file

Note: Any other files such as, "google-services.json", "lint", etc., that act as an integral part of the source code of the project must be added to SVN.

Note: For any other module (any library SDK, like Facebook SDK), the same steps used in the "app" folder must be followed.  

  • The list of files and folders that must be ignored are:
    • Within "app" folder :
      •  "build" folder
      • ".gradle" folder".idea" folder
      • ".svn" (hidden) folder
      • "build" folder
      • "local.properties" file
      • "App_Name.iml" file
      •  "app.iml" file NOTE : "app" folder can be named something else as well (for example it can be named "xyz". In that case, there will be "xyz.iml" which need not be committed).
      • As you can see in the above list (Ignore list), all the files or folders are generated by the IDE, (i.e., Android Studio). Hence whenever the SVN project is downloaded and run on any other system (within Android Studio), the files or folders ignored will be generated again as per that system's properties.
  • In order to always ignore these files from SVN, a simple way is to add them to the Ignore list.
  • Now commit those previously added files to SVN. Go to VCS menu → Commit Changes Whenever changes are made to the existing files in the project or new files are added, repeat the above-mentioned steps to add them to SVN.

The version control process via SVN is now complete!

Version control Android Studio Android (robot)

Published at DZone with permission of Devika Nigam. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • How it Feels to Switch from Eclipse to Android Studio
  • Overview of Android Networking Tools: Receiving, Sending, Inspecting, and Mock Servers
  • How to Rectify R Package Error in Android Studio
  • Exploring the Salesforce Mobile SDK Using Android Studio

Partner Resources

×

Comments
Oops! Something Went Wrong

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends:

Likes
There are no likes...yet! 👀
Be the first to like this post!
It looks like you're not logged in.
Sign in to see who liked this post!