diff options
author | Rich Slogar <rslogar@google.com> | 2014-11-07 15:17:36 -0800 |
---|---|---|
committer | Joe Fernandez <joefernandez@google.com> | 2014-12-07 20:08:45 -0800 |
commit | 5d9d761040fa54e6e67a060844a6481ae6fc74bc (patch) | |
tree | 4cb7a12eab5531537952e9077db77e0c895a9156 | |
parent | fc64b70a20bfd9cdc6ba488f4cd625dae2d5b923 (diff) | |
download | frameworks_base-5d9d761040fa54e6e67a060844a6481ae6fc74bc.zip frameworks_base-5d9d761040fa54e6e67a060844a6481ae6fc74bc.tar.gz frameworks_base-5d9d761040fa54e6e67a060844a6481ae6fc74bc.tar.bz2 |
docs: publishing with studio [CP]
Cherry-pick from Change-Id: I56ecbd655747c6a9def323eade7b21bb0d46aeb2
Change-Id: Id06ddbd8fae18b5ccdf09cfe943ef074925a935a
-rw-r--r-- | docs/html/tools/publishing/app-signing-eclipse.jd | 64 | ||||
-rw-r--r-- | docs/html/tools/publishing/app-signing.jd | 49 | ||||
-rw-r--r-- | docs/html/tools/publishing/preparing.jd | 58 | ||||
-rw-r--r-- | docs/html/tools/publishing/publishing_overview.jd | 8 | ||||
-rw-r--r-- | docs/html/tools/publishing/versioning.jd | 7 | ||||
-rw-r--r-- | docs/html/tools/tools_toc.cs | 42 |
6 files changed, 144 insertions, 84 deletions
diff --git a/docs/html/tools/publishing/app-signing-eclipse.jd b/docs/html/tools/publishing/app-signing-eclipse.jd new file mode 100644 index 0000000..738e488 --- /dev/null +++ b/docs/html/tools/publishing/app-signing-eclipse.jd @@ -0,0 +1,64 @@ +page.title=Signing Your Applications from Eclipse with ADT +@jd:body + +<div id="qv-wrapper"> +<div id="qv"> + +<h2>In this document</h2> + +<ol> +<li><a href="#signing">Signing Your App for Release</a></li> +</ol> + +<h2>See also</h2> + +<ol> +<li><a href="{@docRoot}tools/publishing/app-signing.html">Signing Your Applications</a></li> +</ol> + +</div> +</div> + + +<p>Android requires that all apps be digitally signed with a certificate before they can be +installed. Android uses this certificate to identify the author of an app, and the certificate +does not need to be signed by a certificate authority.</p> + +<p>This document provides detailed instructions about how to sign your apps in release mode with the +ADT plugin for Eclipse. For information about how to obtain a certificate for signing your app, see +<a href="{@docRoot}tools/publishing/app-signing.html">Signing Your Applications</a>. +</p> + + +<h2 id="signing">Signing Your App for Release</h2> + +<p>To sign your app for release with ADT, follow these steps:</p> + +<ol> +<li>Select the project in the Package Explorer and select <strong>File</strong> > +<strong>Export</strong>.</li> +<li>On the <em>Export</em> window, select <strong>Export Android Application</strong> and click +<strong>Next</strong>.</li> +<li>On the <em>Export Android Application</em> window, select the project you want to sign and +click <strong>Next</strong>.</li> +<li> +<p>On the next window, enter the location to create a keystore and a keystore password. If you +already have a keystore, select <strong>Use existing keystore</strong>, enter your keystore's +location and password, and go to step 6.</p> +<img src="{@docRoot}images/tools/signadt3.png" alt="" + width="488" height="270" style="margin-top:15px"/> +<p class="img-caption"><strong>Figure 6</strong>. Select a keystore in ADT.</p> +</li> +<li><p>On the next window, provide the required information as shown in figure 5.<p> +<p>Your key should be valid for at least 25 years, so you can sign app updates with the same key +through the lifespan of your app.</p> +<img src="{@docRoot}images/tools/signadt4.png" alt="" + width="488" height="448" style="margin-top:15px"/> +<p class="img-caption"><strong>Figure 7</strong>. Create a private key in ADT.</p> +</li> +<li><p>On the next window, select the location to export the signed APK.</p> +<img src="{@docRoot}images/tools/signadt5.png" alt="" + width="488" height="217" style="margin-top:15px"/> +<p class="img-caption"><strong>Figure 8</strong>. Export the signed APK in ADT.</p> +</li> +</ol> diff --git a/docs/html/tools/publishing/app-signing.jd b/docs/html/tools/publishing/app-signing.jd index 53e6e65..04e12cc 100644 --- a/docs/html/tools/publishing/app-signing.jd +++ b/docs/html/tools/publishing/app-signing.jd @@ -19,7 +19,7 @@ page.title=Signing Your Applications <li><a href="sign-auto">Automatically Signing Your App</a></li> </ol> </li> -<li><a href="#adt">Signing Your App with the ADT plugin for Eclipse</a></li> +<li><a href="#studio">Signing Your App with Android Studio</a></li> <li><a href="#considerations">Signing Considerations</a></li> <li><a href="#secure-key">Securing Your Private Key</a></li> <li><a href="#expdebug">Expiry of the Debug Certificate</a></li> @@ -56,13 +56,19 @@ your own certificate.</p> This certificate has a private key with a known password, so you can run and debug your app without typing the password every time you make a change to your project.</p> -<p>Android Studio and the ADT plugin for Eclipse sign your app in debug mode automatically when +<p>Android Studio signs your app in debug mode automatically when you run or debug your project from the IDE.</p> <p>You can run and debug an app signed in debug mode on the emulator and on devices connected to your development manchine through USB, but you cannot distribute an app signed in debug mode.</p> +<p>By default, the <em>debug</em> configuration uses a debug keystore, with a known +password and a default key with a known password. +The debug keystore is located in $HOME/.android/debug.keystore, and is created if not present. + +The debug build type is set to use this debug <code>SigningConfig</code> automatically. </p> + <p>For more information about how to build and run apps in debug mode, see <a href="{@docRoot}tools/building/index.html">Building and Running</a>.</p> @@ -88,7 +94,7 @@ any updates to your app, since you must always sign all versions of your app wit key.</p> <p>The rest of this document provides detailed instructions about how to generate a private -key and sign your apps in release mode with Android Studio and with the ADT plugin for Eclipse.</p> +key and sign your apps in release mode with Android Studio.</p> <h3 id="wear-apps">Signing Android Wear Apps</h3> @@ -154,41 +160,8 @@ more than one), and enter the required information.</p> </ol> <p>You can also specify your signing settings in Gradle configuration files. For more information, -see <a href="{@docRoot}sdk/installing/studio-build.html#configureSigning">Signing settings</a>.</p> - +see <a href="{@docRoot}tools/gradle/studio-build.html#configureSigning">Signing settings</a>.</p> -<h2 id="adt">Signing Your App with the ADT Plugin for Eclipse</h2> - -<p>To sign your app in release mode in ADT, follow these steps:</p> - -<ol> -<li>Select the project in the Package Explorer and select <strong>File</strong> > -<strong>Export</strong>.</li> -<li>On the <em>Export</em> window, select <strong>Export Android Application</strong> and click -<strong>Next</strong>.</li> -<li>On the <em>Export Android Application</em> window, select the project you want to sign and -click <strong>Next</strong>.</li> -<li> -<p>On the next window, enter the location to create a keystore and a keystore password. If you -already have a keystore, select <strong>Use existing keystore</strong>, enter your keystore's -location and password, and go to step 6.</p> -<img src="{@docRoot}images/tools/signadt3.png" alt="" - width="488" height="270" style="margin-top:15px"/> -<p class="img-caption"><strong>Figure 6</strong>. Select a keystore in ADT.</p> -</li> -<li><p>On the next window, provide the required information as shown in figure 5.<p> -<p>Your key should be valid for at least 25 years, so you can sign app updates with the same key -through the lifespan of your app.</p> -<img src="{@docRoot}images/tools/signadt4.png" alt="" - width="488" height="448" style="margin-top:15px"/> -<p class="img-caption"><strong>Figure 7</strong>. Create a private key in ADT.</p> -</li> -<li><p>On the next window, select the location to export the signed APK.</p> -<img src="{@docRoot}images/tools/signadt5.png" alt="" - width="488" height="217" style="margin-top:15px"/> -<p class="img-caption"><strong>Figure 8</strong>. Export the signed APK in ADT.</p> -</li> -</ol> <h2 id="considerations">Signing Considerations</h2> @@ -272,7 +245,7 @@ because the build tools generated an expired debug certificate</a>.</p> <h2 id="signing-manually">Signing Your App Manually</h2> -<p>You do not need Android Studio or the ADT plugin for Eclipse to sign your app. You can sign +<p>You do not need Android Studio to sign your app. You can sign your app from the command line using standard tools from the Android SDK and the JDK. To sign an app in release mode from the command line:</p> diff --git a/docs/html/tools/publishing/preparing.jd b/docs/html/tools/publishing/preparing.jd index 5265fce..b6b10fb 100644 --- a/docs/html/tools/publishing/preparing.jd +++ b/docs/html/tools/publishing/preparing.jd @@ -82,10 +82,10 @@ and it is optimized with the zipalign tool.</p> </div> <p>The signing and optimization tasks are usually seamless if you are building your application with -Eclipse and the ADT plugin or with the Ant build script (included with the Android SDK). For -example, you can use the Eclipse Export Wizard to compile, sign, and optimize your application all -at once. You can also configure the Ant build script to do the same when you build from the command -line.</p> +Android Studio. For example, you can use Android Studio with the Gradle build files to compile, sign, +and optimize your application all at once. You can also configure the Gradle build files to do the +same when you build from the command line. For more details about using the Gradle build files, see +<a href="{@docRoot}tools/gradle/studio-build.html">Building Your Project with Gradle</a>.</p> <p>To prepare your application for release you typically perform five main tasks (see figure 2). Each main task may include one or more smaller tasks depending on how you are releasing your @@ -114,8 +114,8 @@ developer holds the private key). The Android system uses the certificate as a m the author of an application and establishing trust relationships between applications. The certificate that you use for signing does not need to be signed by a certificate authority; the Android system allows you to sign your applications with a self-signed certificate. To learn about -certificate requirements, see <a href="{@docRoot}tools/publishing/app-signing.html#cert">Obtain a -suitable private key</a>.</p> +certificate requirements, see <a href="{@docRoot}tools/publishing/app-signing.html">Signing Your +Applications</a>.</p> <p class="caution"><strong>Important:</strong> Your application must be signed with a cryptographic key whose validity period ends after 22 October 2033.</p> @@ -226,9 +226,9 @@ tasks:</p> release.</li> </ul> -<h4>Review and update your manifest settings</h4> +<h4>Review and update your manifest and Gradle build settings</h4> -<p>Verify that the following manifest items are set correctly:</p> +<p>Verify that the following manifest and build files items are set correctly:</p> <ul> <li><a href="{@docRoot}guide/topics/manifest/uses-permission-element.html"> @@ -248,7 +248,7 @@ tasks:</p> </li> </ul> -<p>There are several additional manifest elements that you can set if you are releasing your +<p>There are several additional manifest or build file elements that you can set if you are releasing your application on Google Play. For example, the <code>android:minSdkVersion</code> and <code>android:targetSdkVersion</code> attributes, which are located in the <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html"> <uses-sdk></a> element. For more @@ -303,38 +303,24 @@ application, see <a href="{@docRoot}google/play/licensing/index.html">Applicatio <h2 id="publishing-build">Building Your Application for Release</h2> <p>After you finish configuring your application you can build it into a release-ready -<code>.apk</code> fle that is signed and optimized. The JDK includes the tools for signing the +<code>.apk</code> file that is signed and optimized. The JDK includes the tools for signing the <code>.apk</code> file (Keytool and Jarsigner); the Android SDK includes the tools for compiling and -optimizing the <code>.apk</code> file. If you are using Eclipse with the ADT plugin or you are using -the Ant build script from the command line, you can automate the entire build process.</p> +optimizing the <code>.apk</code> file. If you are using Android Studio or you are using +the Gradle build system from the command line, you can automate the entire build process. See +<a href="{@docRoot}tools/gradle/studio-build.html">Building Your Project with Gradle</a>.</p> -<h3>Building with Eclipse</h3> +<h3>Building with Android Studio</h3> -<p>You can use the Eclipse Export Wizard to build a release-ready <code>.apk</code> file that is -signed with your private key and optimized. To learn how to run the Export Wizard, see -<a href="{@docRoot}tools/publishing/app-signing.html#ExportWizard">Compile and sign with Eclipse -ADT</a>. The Export Wizard compiles your application for release, signs your application with your -private key, and optimizes your application with the zipalign tool. The Export Wizard should run -successfully if you have run or debugged your application from Eclipse and you have no errors in -your application (see <a href="{@docRoot}tools/building/building-eclipse.html">Building -and Running from Eclipse with ADT</a> for more information.</p> +<p>You can use the Gradle build system, integrated with Android Studio to build a release-ready +<code>.apk</code> file that is signed with your private key and optimized. To learn how to setup and +run builds from Android Studio, see +<a href="{@docRoot}tools/gradle/studio-build.html">Building Your Project with Gradle</a>.</p> -<p>The Export Wizard assumes that you have a <a href="#billing-keys">certificate and private key</a> +<p>The build process assumes that you have a certificate and private key suitable for signing your application. If you do not have a suitable certificate and private key, -the Export Wizard will help you generate one (see -<a href="{@docRoot}tools/publishing/app-signing.html">Signing Your Applications</a> for more -information about the signing process and signing guidelines.</p> - -<h3>Building with Ant</h3> - -<p>You can use the Ant build script (included in the Android SDK) to build a release-ready -<code>.apk</code> file that is signed with your private key and optimized. To learn how to do this, -see <a href="{@docRoot}tools/building/building-cmdline.html#ReleaseMode">Building in -Release Mode</a>. This build method assumes you have a <a href="#billing-keys">certificate and -private key</a> suitable for signing your application. If you do not have a suitable certificate and -private key, the Export Wizard will help you generate one (see -<a href="{@docRoot}tools/publishing/app-signing.html">Signing Your Applications</a> for more -information about the signing process and signing guidelines.</p> +Android Studio can help you generate one. For more information about the signing process, see +<a href="{@docRoot}tools/publishing/app-signing.html">Signing Your Applications</a>.</p> + <h2 id="publishing-resources">Preparing External Servers and Resources</h2> diff --git a/docs/html/tools/publishing/publishing_overview.jd b/docs/html/tools/publishing/publishing_overview.jd index c4b3bdf..3c56402 100644 --- a/docs/html/tools/publishing/publishing_overview.jd +++ b/docs/html/tools/publishing/publishing_overview.jd @@ -67,11 +67,13 @@ tasks:</p> <a href="{@docRoot}guide/topics/manifest/manifest-element.html"><manifest></a> element. You may also have to configure several other settings to meet Google Play requirements or accomodate whatever method you're using to release your application.</p> + <p>If you are using Gradle build files, you can use the <em>release</em> build type to set + your build settings for the published version of your app. </p> </li> <li>Building and signing a release version of your application. - <p>The Android Development Tools (ADT) plugin and the Ant build script that are provided - with the Android SDK tools provide everything you need to build and sign a release version of - your application.</p> + <p>You can use the Gradle build files with the <em>release</em> build type to build and sign a + release version of your application. See + <a href="{@docRoot}tools/gradle/studio-build.html">Building Your Project with Gradle</a>.</p> </li> <li>Testing the release version of your application. <p>Before you distribute your application, you should thoroughly test the release version on at diff --git a/docs/html/tools/publishing/versioning.jd b/docs/html/tools/publishing/versioning.jd index 6d3ec2f..f56dbc3 100644 --- a/docs/html/tools/publishing/versioning.jd +++ b/docs/html/tools/publishing/versioning.jd @@ -95,7 +95,8 @@ value for display to users.</p> </ul> <p>You define both of these version attributes in the -<code><manifest></code> element of the manifest file. </p> +<code><manifest></code> element of the manifest file or the Gradle build file. See +<a href="{@docRoot}tools/gradle/studio-build.html">Building Your Project with Gradle</a>.</p> <p>Here's an example manifest that shows the <code>android:versionCode</code> and <code>android:versionName</code> attributes in the @@ -171,4 +172,6 @@ maximum API Level. </p> <p>For more information, see the <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html"><code><uses-sdk></code></a> manifest element documentation and the <a -href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#ApiLevels">API Levels</a> document.</p> +href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#ApiLevels">API Levels</a> document. For +Gradle build settings, see +<a href="{@docRoot}tools/gradle/studio-build.html">Building Your Project with Gradle</a>.</p> diff --git a/docs/html/tools/tools_toc.cs b/docs/html/tools/tools_toc.cs index 8ae6916..6211368 100644 --- a/docs/html/tools/tools_toc.cs +++ b/docs/html/tools/tools_toc.cs @@ -219,6 +219,38 @@ class="en">MonkeyRunner</span></a></li> </ul> </li> + </li><!-- end of tools help --> + + +<!-- Build System menu--> + + <li class="nav-section"> + <div class="nav-section-header"> + <a href="<?cs var:toroot ?>tools/gradle/index.html">Build System</a> + </div> + <ul> + <li><a href="<?cs var:toroot ?>tools/gradle/studio-build.html"> + Building Your Project with Gradle</a></li> + <li><a href="<?cs var:toroot ?>tools/gradle/gradle-ref.html"> + Gradle for Android Reference</a></li> + </ul> + </li><!-- end of build system --> + + +<!-- Support Library menu--> + + <li class="nav-section"> + <div class="nav-section-header"><a href="<?cs var:toroot ?>tools/support-library/index.html"><span +class="en">Support Library</span></a></div> + <ul> + <li><a href="<?cs var:toroot ?>tools/support-library/features.html">Features</a></li> + <li><a href="<?cs var:toroot ?>tools/support-library/setup.html">Setup</a></li> + </ul> + </li><!-- end of support library --> + + +<!-- Revision menu--> + <li class="nav-section"> <div class="nav-section-header"><a href="<?cs var:toroot ?>tools/revisions/index.html"><span class="en">Revisions</span></a></div> @@ -265,12 +297,12 @@ class="en">MonkeyRunner</span></a></li> <span class="en">Eclipse with ADT</span></a> </div> <ul> - <li><a href="<?cs var:toroot ?>sdk/installing/migrate.html">Migrating to Android Studio</a></li> - <li><a href="<?cs var:toroot ?>sdk/installing/installing-adt.html">Installing</a></li> - <li><a href="<?cs var:toroot ?>tools/projects/projects-eclipse.html">Setting Up Projects</a></li> - <li><a href="<?cs var:toroot ?>tools/building/building-eclipse.html">Building</a></li> - <li><a href="<?cs var:toroot ?>tools/debugging/debugging-projects.html">Debugging</a></li> + <li><a href="<?cs var:toroot ?>tools/eclipse/migrate-adt.html">Migrating to Android Studio</a></li> + <li><a href="<?cs var:toroot ?>tools/projects/projects-eclipse.html">Managing Projects</a></li> + <li><a href="<?cs var:toroot ?>tools/building/building-eclipse.html">Building and Running</a></li> <li><a href="<?cs var:toroot ?>tools/testing/testing_eclipse.html">Testing</a></li> + <li><a href="<?cs var:toroot ?>tools/debugging/debugging-projects.html">Debugging</a></li> + <li><a href="<?cs var:toroot ?>tools/publishing/app-signing-eclipse.html">Signing Your Apps</a></li> </ul> </li><!-- end of Eclipse --> |