Skip to content

Commit 314b061

Browse files
authored
Add information about build variants to contributors guide (odk-x#77)
Fixes odk-x/tool-suite-X#229
1 parent f4602ae commit 314b061

File tree

3 files changed

+34
-0
lines changed

3 files changed

+34
-0
lines changed

.gitattributes

+2
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,5 @@ img/**/* filter=lfs diff=lfs merge=lfs -text
2929
*.rar filter=lfs diff=lfs merge=lfs -text
3030
*.tar filter=lfs diff=lfs merge=lfs -text
3131
*.zip filter=lfs diff=lfs merge=lfs -text
32+
*.ogg filter=lfs diff=lfs merge=lfs -text
33+
Tracking filter=lfs diff=lfs merge=lfs -text

odkx-src/build-scripts.rst

+29
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,36 @@ To run the UI tests:
148148
149149
./gradlew clean testSnapshotBasicDebug connectedSnapshotBasicDebugAndroidTest
150150
151+
Build Variants
152+
~~~~~~~~~~~~~~~~~~
153+
154+
155+
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.
156+
157+
- development: the branch where new development, upgrades, and features are contributed and tested
158+
- 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.
159+
- master: The current stable release.
160+
161+
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.
162+
163+
.. note::
164+
165+
The build variant corresponding to the source branches:
166+
167+
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.
168+
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.
169+
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.
170+
171+
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.
172+
173+
Steps to change build variants in Android Studio:
174+
175+
1. To change the build variant Android Studio uses, select **Build** > **Select Build Variant** in the menu bar.
176+
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 Android Studio deploys to your connected device and is visible in the editor.
151177

178+
.. image:: /img/survey-using/build-variants.*
179+
:alt: "Change build variant"
180+
:class: device-screen-vertical
152181

153182
.. _build-scripts-internal:
154183

Loading

0 commit comments

Comments
 (0)