1page.title=Codelines, Branches, and Releases
2@jd:body
3
4<!--
5    Copyright 2013 The Android Open Source Project
6
7    Licensed under the Apache License, Version 2.0 (the "License");
8    you may not use this file except in compliance with the License.
9    You may obtain a copy of the License at
10
11        http://www.apache.org/licenses/LICENSE-2.0
12
13    Unless required by applicable law or agreed to in writing, software
14    distributed under the License is distributed on an "AS IS" BASIS,
15    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16    See the License for the specific language governing permissions and
17    limitations under the License.
18-->
19<div id="qv-wrapper">
20  <div id="qv">
21    <h2>In this document</h2>
22    <ol id="auto-toc">
23    </ol>
24  </div>
25</div>
26
27<p>
28  The Android Open Source Project (AOSP) maintains a complete software stack to be ported by
29  OEMs and other device implementors and run on their own hardware. To maintain the quality of
30  Android, Google has contributed full-time engineers, product managers, user interface designers,
31  quality assurance testers, and all the other roles required to bring modern devices to market.
32</p>
33
34<p>
35  Accordingly, we maintain a number of "code lines" to clearly separate the current stable
36  version of Android from unstable experimental work. We roll the open source administration
37  and maintenance of the Android code lines into the larger product development cycle.
38</p>
39
40<p>
41  The chart below depicts at a conceptual level how AOSP manages code and releases. We're
42  referring to these as "code lines" instead of "branches" simply because at any given moment
43  there may be more than one branch for a given "code line". For instance, when a
44  release is cut, it may or may not become a new branch based on the needs of the moment.
45</p>
46<ol>
47  <li>
48	<p>
49	  At any given moment, there is a current latest release of the Android platform. This
50	  typically takes the form of a branch in the tree.
51	</p>
52  </li>
53  <li>
54	<p>
55	  Device builders and contributors work with the current latest release, fixing bugs,
56	  launching new devices, experimenting with new features, and so on.
57	</p>
58  </li>
59  <li>
60	<p>
61	  In parallel, Google works internally on the next version of the Android platform and
62	  framework according to the product's needs and goals. We develop the next
63	  version of Android by working with a device partner on a flagship device whose
64	  specifications are chosen to push Android in the direction we believe it should go.
65	</p>
66  </li>
67  <li>
68	<p>
69	  When the "n+1"th version is ready, it will be published to the public source tree and
70	  become the new latest release.
71	</p>
72  </li>
73</ol>
74<p>
75  <img src="{@docRoot}images/code-lines.png" alt="code-line diagram">
76</p>
77
78<h2 id="terms-and-caveats">
79  Terms and Caveats
80</h2>
81<ul>
82  <li>
83	<p>
84	  A <em>release</em> corresponds to a formal version of the Android platform, such as 1.5,
85	  2.1, and so on. Generally speaking, a release of the platform corresponds to the version in
86	  the <code>SdkVersion</code> field of AndroidManifest.xml files and defined within
87	  <code>frameworks/base/api</code> in the source tree.
88	</p>
89  </li>
90  <li>
91	<p>
92	  An <em>upstream</em> project is an open-source project from which the Android stack is
93	  pulling code. These include obvious projects such as the Linux kernel and WebKit.
94	  Over time we are migrating some of the semi-autonomous Android projects (such as ART,
95	  the Android SDK tools, Bionic, and so on) to work as "upstream" projects. Generally,
96	  these projects are developed entirely in the public tree. For some upstream projects,
97	  development is done by contributing directly to the upstream project itself. See <a href=
98	  "submit-patches.html#upstream-projects">Upstream Projects</a> for details. In both cases,
99	  snapshots will be periodically pulled into releases.
100	</p>
101  </li>
102  <li>
103	<p>
104	  At all times, a release code-line (which may actually consist of more than one actual
105	  branch in git) is considered the sole canonical source code for a given Android platform
106	  version. OEMs and other groups building devices should pull only from a release branch.
107	</p>
108  </li>
109  <li>
110	<p>
111	  "Experimental" code-lines are established to capture changes from the community so they can
112          be iterated on with an eye toward stability.
113	</p>
114  </li>
115  <li>
116	<p>
117	  Changes that prove stable will eventually be pulled into a release branch. Note this
118	  applies only to bug fixes, application improvements, and other changes that do not affect the
119	  APIs of the platform.
120	</p>
121  </li>
122  <li>
123	<p>
124	  Changes will be pulled into release branches from upstream projects (including the
125	  Android "upstream" projects) as necessary.
126	</p>
127  </li>
128  <li>
129	<p>
130	  The "n+1"th version (that is, next major version of the framework and platform APIs) will
131	  be developed by Google internally. See <a href=
132          "#about-private-code-lines">About Private Codelines</a> for details.
133	</p>
134  </li>
135  <li>
136	<p>
137	  Changes will be pulled from upstream, release, and experimental branches into Google's
138	  private branch as necessary.
139	</p>
140  </li>
141  <li>
142	<p>
143	  When the platform APIs for the next version have stabilized and been fully tested, Google
144	  will cut a release of the next platform version. (This specifically refers to a new
145	  <code>SdkVersion</code>.) This will also correspond to the internal code-line being made
146	  a public release branch, and the new current platform code-line.
147	</p>
148  </li>
149  <li>
150	<p>
151	  When a new platform version is cut, a corresponding experimental code-line will be
152	  created at the same time.
153	</p>
154  </li>
155</ul>
156
157<h2 id="about-private-code-lines">
158  About Private Codelines
159</h2>
160<p>
161  The source management strategy above includes a code-line that Google will keep private. The
162  reason for this is to focus attention on the current public version of Android.
163</p>
164<p>
165  OEMs and other device builders naturally want to ship devices with the latest version of
166  Android. Similarly, application developers don't want to deal with more platform
167  versions than strictly necessary. Meanwhile, Google retains responsibility for the strategic
168  direction of Android as a platform and a product. Our approach focuses on a small number of
169  flagship devices to drive features while securing protections of Android-related intellectual
170  property. 
171</p>
172<p>
173  As a result, Google frequently has possession of confidential information from third parties.
174  And we must refrain from revealing sensitive features until we've secured the appropriate
175  protections. In addition, there are real risks to the platform arising from having too many
176  platform versions extant at once. For these reasons, we have structured the open-source
177  project -- including third-party contributions -- to focus on the currently-public stable
178  version of Android. "Deep development" on the next version of the platform will happen in
179  private until it's ready to become an official release.
180</p>
181<p>
182  We recognize many contributors will disagree with this approach. We respect others
183  may have a different point of view; however, this is the approach we feel is best, and
184  the one we've chosen to implement.
185</p>
186