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

Conversation

khushishikhu
Copy link

closes odk-x/tool-suite-X#229

addresses odk-x/tool-suite-X#229

What is included in this PR?

This PR includes the documentation for the contributor's guide about build variants which has been asked in the issue.

What problems did you encounter?

I am not sure of one that is this the correct location where this documentation to be written. Please correct me if I was wrong in identifying it.

Copy link
Member

@wbrunette wbrunette left a comment

Choose a reason for hiding this comment

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

@khushishikhu Great start!

Please make the requested changes and then hit the refresh/recycle button in review and the system will notify us that the pull request is ready for review again.

odkx-src/build-scripts.rst Show resolved Hide resolved
odkx-src/build-scripts.rst Outdated Show resolved Hide resolved
odkx-src/build-scripts.rst Outdated Show resolved Hide resolved
odkx-src/build-scripts.rst Outdated Show resolved Hide resolved
odkx-src/build-scripts.rst Outdated Show resolved Hide resolved
odkx-src/build-scripts.rst Outdated Show resolved Hide resolved
@khushishikhu
Copy link
Author

@wbrunette Thank you!! for reviewing my PR. I have made all the changes in all those places you asked for to do. Kindly check the changes now and let me know what more it requires.

Copy link
Member

@linl33 linl33 left a comment

Choose a reason for hiding this comment

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

Thanks for getting this documented.

-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 a 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.
Copy link
Member

Choose a reason for hiding this comment

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

are a different
are at different

~~~~~~~~~~~~~~~~~~


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 effect other tools in a unforeseen way ODK-X uses a 3 staged release workflow that involves 3 branches.
Copy link
Member

Choose a reason for hiding this comment

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

in a unforeseen
in an unforeseen

~~~~~~~~~~~~~~~~~~


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 effect other tools in a unforeseen way ODK-X uses a 3 staged release workflow that involves 3 branches.
Copy link
Member

Choose a reason for hiding this comment

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

might effect
might affect

you can configure build variants to create different versions of your app from a single project, and how to properly manage your dependencies and signing configurations. Each build variant represents a different version of your app that You can configure a dependency for a specific build variant. For more information refer to https://developer.android.com/studio/build/build-variants


-development: the branch where new development, upgrades, and features are contributed and tested
Copy link
Member

Choose a reason for hiding this comment

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

Please check the formatting for this paragraph. Everything is displayed on a single line.


.. image:: /img/survey-using/build-variants.*
:alt: Survey Form List
Copy link
Member

Choose a reason for hiding this comment

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

Please update the alt to reflect this image.

2. **demo**: **demoBasicRelease** here is the build variant that corresponds do demo branch . This is basically the preview release of an application before launching the official release. Which can bu used by project maintainers for testing out the application if it is not creating any errors.
3. **master**: **masterBasicRlease** is the official and stable release of an application, this is the latest release of odkx application.

On changing any build variant that will run in the gradle command line as it runs for other vanriants, you are just aware of which version is presenting of that application. That has different functionalities in every version as all those are made for different purpose.
Copy link
Member

Choose a reason for hiding this comment

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

Could you rephrase these 2 sentences? It's not clear what you're trying to say here.


1. **development**: **snapshotBasicRelease** is one of the build variant corresponds to development branch. All the required changes and forks are done from this branch in which the new development, upgrades and features should be contributed and tested.
2. **demo**: **demoBasicRelease** here is the build variant that corresponds do demo branch . This is basically the preview release of an application before launching the official release. Which can bu used by project maintainers for testing out the application if it is not creating any errors.
3. **master**: **masterBasicRlease** is the official and stable release of an application, this is the latest release of odkx application.
Copy link
Member

Choose a reason for hiding this comment

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

odkx
ODK-X

The Build variant corresponding to the source branches:

1. **development**: **snapshotBasicRelease** is one of the build variant corresponds to development branch. All the required changes and forks are done from this branch in which the new development, upgrades and features should be contributed and tested.
2. **demo**: **demoBasicRelease** here is the build variant that corresponds do demo branch . This is basically the preview release of an application before launching the official release. Which can bu used by project maintainers for testing out the application if it is not creating any errors.
Copy link
Member

Choose a reason for hiding this comment

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

corresponds do
corresponds to

can bu
can be

@linl33
Copy link
Member

linl33 commented Apr 9, 2021

@khushishikhu It looks like your Git LFS isn't configured correctly. The image you added isn't tracked in Git LFS. Could you try to get the image in Git LFS and then force push to remove the copy of the image tracked in regular Git.

@khushishikhu
Copy link
Author

@linl33 I have made all the required changes you asked for and also tracked the file in git LFS. Please review it and let me know what else needs to be corrected more.

@wbrunette
Copy link
Member

@khushishikhu please make sure your pull requests passes the build checks as we cannot merge something that won't build properly.

@wbrunette
Copy link
Member

@khushishikhu it looks like spelling errors so it shouldn't be too hard to fix :)

@khushishikhu
Copy link
Author

@wbrunette I have fixed the errors. The checks are passing now. Please review it now

@wbrunette wbrunette changed the title Contributors guide Add information about build variants to contributors guide Apr 12, 2021
@wbrunette
Copy link
Member

@khushishikhu I just took a look and some of the grammar issues that @linl33 pointed out still exist. Please make all the corrections listed.

@khushishikhu
Copy link
Author

sorry!! @wbrunette I don't know why the changes I have done was not committed but I have done again the suggested changes and reviewed also. Please check if it is correct now.

Copy link
Member

@linl33 linl33 left a comment

Choose a reason for hiding this comment

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

Looks like your image still isn't in Git LFS. You can check the files track by Git LFS using git lfs ls-files

odkx-src/build-scripts.rst Outdated Show resolved Hide resolved
odkx-src/build-scripts.rst Outdated Show resolved Hide resolved
odkx-src/build-scripts.rst Outdated Show resolved Hide resolved
odkx-src/build-scripts.rst Outdated Show resolved Hide resolved
odkx-src/build-scripts.rst Outdated Show resolved Hide resolved
odkx-src/build-scripts.rst Outdated Show resolved Hide resolved
odkx-src/build-scripts.rst Outdated Show resolved Hide resolved
@khushishikhu
Copy link
Author

@wbrunette I have done the suggested changes. Please have a look now

Copy link
Member

@wbrunette wbrunette left a comment

Choose a reason for hiding this comment

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

@elmps2018 this is close to be ready, as a non expert can you give it read and see if it makes sense to you. If you ask questions in your review it might help to clarify something that is not clear to a new user.


1. **development**: **snapshotBasicRelease** is the build variant 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 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. Which 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.
Copy link
Member

@wbrunette wbrunette Apr 15, 2021

Choose a reason for hiding this comment

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

Missing a space: "branch.It is the official"


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 configure a dependency for a specific build variant. https://developer.android.com/studio/build/build-variants
Copy link
Contributor

Choose a reason for hiding this comment

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

This sentence does not quite make sense. Does it mean "Each build variant represents a different version of your app that you can configure a dependency for"?

Copy link
Author

Choose a reason for hiding this comment

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

@elmps2018 Yes it does.

Copy link
Contributor

Choose a reason for hiding this comment

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

Please revise to say that instead.


.. note::

The Build variant corresponding to the source branches:
Copy link
Contributor

Choose a reason for hiding this comment

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

minor edit -- build should be lower case


The Build variant corresponding to the source branches:

1. **development**: **snapshotBasicRelease** is the build variant 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.
Copy link
Contributor

Choose a reason for hiding this comment

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

minor grammar: "is the build variant that corresponds" (that missing)

The Build variant corresponding to the source branches:

1. **development**: **snapshotBasicRelease** is the build variant 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 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. Which can be used by project maintainers for testing out the application if it is not creating any errors.
Copy link
Contributor

Choose a reason for hiding this comment

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

to a release build (missing a)

Copy link
Contributor

Choose a reason for hiding this comment

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

"Which can..." should be "This branch can..."

Steps to change build variants in 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 deploys to your connected device and is visible in the editor.
Copy link
Contributor

Choose a reason for hiding this comment

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

What is IDE? might need to define this acronym.


.. _build-scripts-internal:

Internal Build Files
------------------------

This section covers the files that are stored inside each of the Android projects. These paths follow the same pattern for each Android project, just the project name differs. For clarity, the root level of the project will be referred to as :file:`root` and the app/lib level of the project will be referred to as :file:`app`. So, for example, the path :file:`services/services_app/build.gradle` becomes :file:`project/app/build.gradle`.
This section covers the files that are stored inside each of the Android projects. These paths follow the same pattern for each Android project, the project name differs. For clarity, the root level of the project will be referred to as :file:`root` and the app/lib level of the project will be referred to as :file:`app`. So, for example, the path :file:`services/services_app/build.gradle` becomes :file:`project/app/build.gradle`.
Copy link
Contributor

Choose a reason for hiding this comment

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

I think just or something similar should be here, "each Android project, the project name differs" does not scan.

- 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


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

Steps to change build variants in 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.

@elmps2018
Copy link
Contributor

@khushishikhu this looks good now to me! @wbrunette and @linl33 did you have any further comments?

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

@linl33 linl33 merged commit 314b061 into odk-x:master Apr 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Contributors Guide: Document Build Variants
4 participants