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

Add information about build variants to contributors guide #77

Merged
merged 24 commits into from
Apr 17, 2021
Merged
Show file tree
Hide file tree
Changes from 22 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
_static/vid/**/* filter=lfs diff=lfs merge=lfs -text
img/**/* filter=lfs diff=lfs merge=lfs -text

# images
*.bmp filter=lfs diff=lfs merge=lfs -text
*.gif filter=lfs diff=lfs merge=lfs -text
Expand All @@ -10,16 +9,13 @@ img/**/* filter=lfs diff=lfs merge=lfs -text
*.psd filter=lfs diff=lfs merge=lfs -text
*.tiff filter=lfs diff=lfs merge=lfs -text
*.xcf filter=lfs diff=lfs merge=lfs -text

# video
*.mov filter=lfs diff=lfs merge=lfs -text
*.mp4 filter=lfs diff=lfs merge=lfs -text
*.mpeg filter=lfs diff=lfs merge=lfs -text

# audio
*.mp3 filter=lfs diff=lfs merge=lfs -text
*.wav filter=lfs diff=lfs merge=lfs -text

# documents, etc.
*.doc filter=lfs diff=lfs merge=lfs -text
*.docx filter=lfs diff=lfs merge=lfs -text
Expand All @@ -28,9 +24,10 @@ img/**/* filter=lfs diff=lfs merge=lfs -text
*.pptx filter=lfs diff=lfs merge=lfs -text
*.xls filter=lfs diff=lfs merge=lfs -text
*.xlsx filter=lfs diff=lfs merge=lfs -text

# archives
*.7z filter=lfs diff=lfs merge=lfs -text
*.rar filter=lfs diff=lfs merge=lfs -text
*.tar filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.ogg filter=lfs diff=lfs merge=lfs -text
Tracking filter=lfs diff=lfs merge=lfs -text
29 changes: 29 additions & 0 deletions odkx-src/build-scripts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,36 @@ To run the UI tests:

./gradlew clean testSnapshotBasicDebug connectedSnapshotBasicDebugAndroidTest

Build Variants
~~~~~~~~~~~~~~~~~~

wbrunette marked this conversation as resolved.
Show resolved Hide resolved

ODK-X has a modular framework design with inter-dependencies between various ODK-X tools. To manage accepting code contributions, bug fixes, and other enhancements that might affect other tools in an unforeseen way ODK-X uses a 3 staged release workflow that involves 3 branches.

- development: the branch where new development, upgrades, and features are contributed and tested
- demo: This branch is the last stable version of development. This provides a staging area used for testing before moving to an official release. This is where preview releases are staged.
- master: The current stable release.

Since the branches are at different stages of development the dependency libraries are at different stages of development. To make sure you are building against the correct dependencies you need to either checkout a local copy of the dependencies using the same branch name in the same directory OR you can adjust the build variant to match the dependencies causing Gradle and Android Studio to fetch the correct dependencies when compiling.Each build variant represents a different version of your app that you can build.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

compiling.Each build variant

Missing space before Each


.. note::

The build variant corresponding to the source branches:

1. **development**: **snapshotBasicRelease** is the build variant that corresponds to a release build of the development branch. **snapshotBasicDebug** is the build variant that corresponds to a debug build of the development branch. This branch is where the new development, upgrades, and features are contributed and tested.
2. **demo**: **demoBasicRelease** is the build variant that corresponds to a release build of the demo branch. **demoBasicDebug** is the build variant that corresponds to a debug build of the demo branch. This is the preview release of an application before launching the official release. This branch can be used by project maintainers for testing out the application if it is not creating any errors.
3. **master**: **masterBasicRelease** is the build variant that corresponds to a release build of the master branch. **masterBasicDebug** is the build variant that corresponds to a debug build of the master branch. It is the official and stable release of an application, this is the latest release of ODK-X application.

Gradle creates a build variant for every possible combination of the product flavor and build types that you configure. As different code bases is used for each flavor variant.

Steps to change build variants in Android studio:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Android studio
Android Studio


1. To change the build variant Android Studio uses, select **Build** > **Select Build Variant** in the menu bar.
2. The Build Variants panel has two columns: **Module** and **Active Build Variant**. The **Active Build Variant** value for the module determines which build variant the IDE(android studio) deploys to your connected device and is visible in the editor.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given that this section only applies to Android Studio, you can replace IDE with Android Studio.


.. image:: /img/survey-using/build-variants.*
:alt: "Change build variant"
:class: device-screen-vertical

.. _build-scripts-internal:

Expand Down
3 changes: 3 additions & 0 deletions odkx-src/img/survey-using/build-variants.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions odkx-src/spelling_wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ esthetics
ethiopian
extensibility
fallback
flavor
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

flavor should not need to be added to the list. It was a style check problem disliking the usage of "flavour" in favor of "flavor".

fiducial
firebase
Firebase
Expand Down