CINXE.COM

build.gradle - platform/frameworks/support - Git at Google

<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><title>build.gradle - platform/frameworks/support - Git at Google</title><link rel="stylesheet" type="text/css" href="/+static/base.css"><link rel="stylesheet" type="text/css" href="/+static/prettify/prettify.css"><!-- default customHeadTagPart --></head><body class="Site"><header class="Site-header"><div class="Header"><a class="Header-image" href="/"><img src="//www.gstatic.com/images/branding/lockups/2x/lockup_git_color_108x24dp.png" width="108" height="24" alt="Google Git"></a><div class="Header-menu"> <a class="Header-menuItem" href="https://accounts.google.com/AccountChooser?faa=1&amp;service=gerritcodereview&amp;continue=https://android.googlesource.com/login/platform/frameworks/support/%2B/refs/tags/android-vts-9.0_r19/build.gradle">Sign in</a> </div></div></header><div class="Site-content"><div class="Container "><div class="Breadcrumbs"><a class="Breadcrumbs-crumb" href="/?format=HTML">android</a> / <a class="Breadcrumbs-crumb" href="/platform/">platform</a> / <a class="Breadcrumbs-crumb" href="/platform/frameworks/">frameworks</a> / <a class="Breadcrumbs-crumb" href="/platform/frameworks/support/">support</a> / <a class="Breadcrumbs-crumb" href="/platform/frameworks/support/+/refs/tags/android-vts-9.0_r19">refs/tags/android-vts-9.0_r19</a> / <a class="Breadcrumbs-crumb" href="/platform/frameworks/support/+/refs/tags/android-vts-9.0_r19/">.</a> / <span class="Breadcrumbs-crumb">build.gradle</span></div><div class="u-sha1 u-monospace BlobSha1">blob: dd144dd9e36d1bded7f1cd7ae7d855b67a7ab8b6 [<a href="/platform/frameworks/support/+/refs/tags/android-vts-9.0_r19/build.gradle">file</a>] [<a href="/platform/frameworks/support/+log/refs/tags/android-vts-9.0_r19/build.gradle">log</a>] [<a href="/platform/frameworks/support/+blame/refs/tags/android-vts-9.0_r19/build.gradle">blame</a>]</div><table class="FileContents"><tr class="u-pre u-monospace FileContents-line"><td class="u-lineNum u-noSelect FileContents-lineNum" data-line-number="1"></td><td class="FileContents-lineContents" id="1"><span class="com">/*</span></td></tr><tr class="u-pre u-monospace FileContents-line"><td class="u-lineNum u-noSelect FileContents-lineNum" data-line-number="2"></td><td class="FileContents-lineContents" id="2"><span class="com"> * Copyright (C) 2017 The Android Open Source Project</span></td></tr><tr class="u-pre u-monospace FileContents-line"><td class="u-lineNum u-noSelect FileContents-lineNum" data-line-number="3"></td><td class="FileContents-lineContents" id="3"><span class="com"> *</span></td></tr><tr class="u-pre u-monospace FileContents-line"><td class="u-lineNum u-noSelect FileContents-lineNum" data-line-number="4"></td><td class="FileContents-lineContents" id="4"><span class="com"> * Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);</span></td></tr><tr class="u-pre u-monospace FileContents-line"><td class="u-lineNum u-noSelect FileContents-lineNum" data-line-number="5"></td><td class="FileContents-lineContents" id="5"><span class="com"> * you may not use this file except in compliance with the License.</span></td></tr><tr class="u-pre u-monospace FileContents-line"><td class="u-lineNum u-noSelect FileContents-lineNum" data-line-number="6"></td><td class="FileContents-lineContents" id="6"><span class="com"> * You may obtain a copy of the License at</span></td></tr><tr class="u-pre u-monospace FileContents-line"><td class="u-lineNum u-noSelect FileContents-lineNum" data-line-number="7"></td><td class="FileContents-lineContents" id="7"><span class="com"> *</span></td></tr><tr class="u-pre u-monospace FileContents-line"><td class="u-lineNum u-noSelect FileContents-lineNum" data-line-number="8"></td><td class="FileContents-lineContents" id="8"><span class="com"> * http://www.apache.org/licenses/LICENSE-2.0</span></td></tr><tr class="u-pre u-monospace FileContents-line"><td class="u-lineNum u-noSelect FileContents-lineNum" data-line-number="9"></td><td class="FileContents-lineContents" id="9"><span class="com"> *</span></td></tr><tr class="u-pre u-monospace FileContents-line"><td class="u-lineNum u-noSelect FileContents-lineNum" data-line-number="10"></td><td class="FileContents-lineContents" id="10"><span class="com"> * Unless required by applicable law or agreed to in writing, software</span></td></tr><tr class="u-pre u-monospace FileContents-line"><td class="u-lineNum u-noSelect FileContents-lineNum" data-line-number="11"></td><td class="FileContents-lineContents" id="11"><span class="com"> * distributed under the License is distributed on an &quot;AS IS&quot; BASIS,</span></td></tr><tr class="u-pre u-monospace FileContents-line"><td class="u-lineNum u-noSelect FileContents-lineNum" data-line-number="12"></td><td class="FileContents-lineContents" id="12"><span class="com"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></td></tr><tr class="u-pre u-monospace FileContents-line"><td class="u-lineNum u-noSelect FileContents-lineNum" data-line-number="13"></td><td class="FileContents-lineContents" id="13"><span class="com"> * See the License for the specific language governing permissions and</span></td></tr><tr class="u-pre u-monospace FileContents-line"><td class="u-lineNum u-noSelect FileContents-lineNum" data-line-number="14"></td><td class="FileContents-lineContents" id="14"><span class="com"> * limitations under the License.</span></td></tr><tr class="u-pre u-monospace FileContents-line"><td class="u-lineNum u-noSelect FileContents-lineNum" data-line-number="15"></td><td class="FileContents-lineContents" id="15"><span class="com"> */</span></td></tr><tr class="u-pre u-monospace FileContents-line"><td class="u-lineNum u-noSelect FileContents-lineNum" data-line-number="16"></td><td class="FileContents-lineContents" id="16"></td></tr><tr class="u-pre u-monospace FileContents-line"><td class="u-lineNum u-noSelect FileContents-lineNum" data-line-number="17"></td><td class="FileContents-lineContents" id="17"><span class="kwd">import</span><span class="pln"> androidx</span><span class="pun">.</span><span class="pln">build</span><span class="pun">.</span><span class="typ">DacOptions</span></td></tr><tr class="u-pre u-monospace FileContents-line"><td class="u-lineNum u-noSelect FileContents-lineNum" data-line-number="18"></td><td class="FileContents-lineContents" id="18"><span class="kwd">import</span><span class="pln"> androidx</span><span class="pun">.</span><span class="pln">build</span><span class="pun">.</span><span class="typ">PublishDocsRulesKt</span></td></tr><tr class="u-pre u-monospace FileContents-line"><td class="u-lineNum u-noSelect FileContents-lineNum" data-line-number="19"></td><td class="FileContents-lineContents" id="19"></td></tr><tr class="u-pre u-monospace FileContents-line"><td class="u-lineNum u-noSelect FileContents-lineNum" data-line-number="20"></td><td class="FileContents-lineContents" id="20"><span class="kwd">def</span><span class="pln"> currentJvmVersion </span><span class="pun">=</span><span class="pln"> org</span><span class="pun">.</span><span class="pln">gradle</span><span class="pun">.</span><span class="pln">api</span><span class="pun">.</span><span class="typ">JavaVersion</span><span class="pun">.</span><span class="pln">current</span><span class="pun">()</span></td></tr><tr class="u-pre u-monospace FileContents-line"><td class="u-lineNum u-noSelect FileContents-lineNum" data-line-number="21"></td><td class="FileContents-lineContents" id="21"><span class="kwd">if</span><span class="pln"> </span><span class="pun">(</span><span class="pln">currentJvmVersion</span><span class="pun">.</span><span class="pln">getMajorVersion</span><span class="pun">()</span><span class="pln"> </span><span class="pun">!=</span><span class="pln"> </span><span class="str">&quot;8&quot;</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span></td></tr><tr class="u-pre u-monospace FileContents-line"><td class="u-lineNum u-noSelect FileContents-lineNum" data-line-number="22"></td><td class="FileContents-lineContents" id="22"><span class="pln"> </span><span class="kwd">throw</span><span class="pln"> </span><span class="kwd">new</span><span class="pln"> </span><span class="typ">Exception</span><span class="pun">(</span><span class="str">&quot;Unsupported java version &#39;&quot;</span><span class="pln"> </span><span class="pun">+</span><span class="pln"> currentJvmVersion</span><span class="pun">.</span><span class="pln">toString</span><span class="pun">()</span><span class="pln"> </span><span class="pun">+</span><span class="pln"> </span><span class="str">&quot;&#39;. Please install java 8.\n&quot;</span><span class="pln"> </span><span class="pun">+</span></td></tr><tr class="u-pre u-monospace FileContents-line"><td class="u-lineNum u-noSelect FileContents-lineNum" data-line-number="23"></td><td class="FileContents-lineContents" id="23"><span class="str">&quot;\n&quot;</span><span class="pln"> </span><span class="pun">+</span></td></tr><tr class="u-pre u-monospace FileContents-line"><td class="u-lineNum u-noSelect FileContents-lineNum" data-line-number="24"></td><td class="FileContents-lineContents" id="24"><span class="str">&quot;If you have already installed java 8, you can instruct Gradle to use it by setting the environment variable JAVA_HOME equal to its file path.&quot;</span><span class="pun">)</span></td></tr><tr class="u-pre u-monospace FileContents-line"><td class="u-lineNum u-noSelect FileContents-lineNum" data-line-number="25"></td><td class="FileContents-lineContents" id="25"><span class="pun">}</span></td></tr><tr class="u-pre u-monospace FileContents-line"><td class="u-lineNum u-noSelect FileContents-lineNum" data-line-number="26"></td><td class="FileContents-lineContents" id="26"></td></tr><tr class="u-pre u-monospace FileContents-line"><td class="u-lineNum u-noSelect FileContents-lineNum" data-line-number="27"></td><td class="FileContents-lineContents" id="27"></td></tr><tr class="u-pre u-monospace FileContents-line"><td class="u-lineNum u-noSelect FileContents-lineNum" data-line-number="28"></td><td class="FileContents-lineContents" id="28"><span class="pln">buildscript </span><span class="pun">{</span></td></tr><tr class="u-pre u-monospace FileContents-line"><td class="u-lineNum u-noSelect FileContents-lineNum" data-line-number="29"></td><td class="FileContents-lineContents" id="29"><span class="pln"> ext</span><span class="pun">.</span><span class="pln">supportRootFolder </span><span class="pun">=</span><span class="pln"> project</span><span class="pun">.</span><span class="pln">projectDir</span></td></tr><tr class="u-pre u-monospace FileContents-line"><td class="u-lineNum u-noSelect FileContents-lineNum" data-line-number="30"></td><td class="FileContents-lineContents" id="30"><span class="pln"> apply </span><span class="kwd">from</span><span class="pun">:</span><span class="pln"> </span><span class="str">&#39;buildSrc/repos.gradle&#39;</span></td></tr><tr class="u-pre u-monospace FileContents-line"><td class="u-lineNum u-noSelect FileContents-lineNum" data-line-number="31"></td><td class="FileContents-lineContents" id="31"><span class="pln"> apply </span><span class="kwd">from</span><span class="pun">:</span><span class="pln"> </span><span class="str">&#39;buildSrc/init.gradle&#39;</span></td></tr><tr class="u-pre u-monospace FileContents-line"><td class="u-lineNum u-noSelect FileContents-lineNum" data-line-number="32"></td><td class="FileContents-lineContents" id="32"><span class="pln"> apply </span><span class="kwd">from</span><span class="pun">:</span><span class="pln"> </span><span class="str">&#39;buildSrc/build_dependencies.gradle&#39;</span></td></tr><tr class="u-pre u-monospace FileContents-line"><td class="u-lineNum u-noSelect FileContents-lineNum" data-line-number="33"></td><td class="FileContents-lineContents" id="33"><span class="pln"> init</span><span class="pun">.</span><span class="pln">setSdkInLocalPropertiesFile</span><span class="pun">()</span></td></tr><tr class="u-pre u-monospace FileContents-line"><td class="u-lineNum u-noSelect FileContents-lineNum" data-line-number="34"></td><td class="FileContents-lineContents" id="34"><span class="pln"> repos</span><span class="pun">.</span><span class="pln">addMavenRepositories</span><span class="pun">(</span><span class="pln">repositories</span><span class="pun">)</span></td></tr><tr class="u-pre u-monospace FileContents-line"><td class="u-lineNum u-noSelect FileContents-lineNum" data-line-number="35"></td><td class="FileContents-lineContents" id="35"></td></tr><tr class="u-pre u-monospace FileContents-line"><td class="u-lineNum u-noSelect FileContents-lineNum" data-line-number="36"></td><td class="FileContents-lineContents" id="36"><span class="pln"> dependencies </span><span class="pun">{</span></td></tr><tr class="u-pre u-monospace FileContents-line"><td class="u-lineNum u-noSelect FileContents-lineNum" data-line-number="37"></td><td class="FileContents-lineContents" id="37"><span class="pln"> classpath build_libs</span><span class="pun">.</span><span class="pln">gradle</span></td></tr><tr class="u-pre u-monospace FileContents-line"><td class="u-lineNum u-noSelect FileContents-lineNum" data-line-number="38"></td><td class="FileContents-lineContents" id="38"><span class="pln"> classpath build_libs</span><span class="pun">.</span><span class="pln">jacoco</span></td></tr><tr class="u-pre u-monospace FileContents-line"><td class="u-lineNum u-noSelect FileContents-lineNum" data-line-number="39"></td><td class="FileContents-lineContents" id="39"><span class="pln"> classpath build_libs</span><span class="pun">.</span><span class="pln">kotlin</span><span class="pun">.</span><span class="pln">gradle_plugin</span></td></tr><tr class="u-pre u-monospace FileContents-line"><td class="u-lineNum u-noSelect FileContents-lineNum" data-line-number="40"></td><td class="FileContents-lineContents" id="40"><span class="pln"> </span><span class="pun">}</span></td></tr><tr class="u-pre u-monospace FileContents-line"><td class="u-lineNum u-noSelect FileContents-lineNum" data-line-number="41"></td><td class="FileContents-lineContents" id="41"><span class="pun">}</span></td></tr><tr class="u-pre u-monospace FileContents-line"><td class="u-lineNum u-noSelect FileContents-lineNum" data-line-number="42"></td><td class="FileContents-lineContents" id="42"></td></tr><tr class="u-pre u-monospace FileContents-line"><td class="u-lineNum u-noSelect FileContents-lineNum" data-line-number="43"></td><td class="FileContents-lineContents" id="43"><span class="pln">repos</span><span class="pun">.</span><span class="pln">addMavenRepositories</span><span class="pun">(</span><span class="pln">repositories</span><span class="pun">)</span></td></tr><tr class="u-pre u-monospace FileContents-line"><td class="u-lineNum u-noSelect FileContents-lineNum" data-line-number="44"></td><td class="FileContents-lineContents" id="44"></td></tr><tr class="u-pre u-monospace FileContents-line"><td class="u-lineNum u-noSelect FileContents-lineNum" data-line-number="45"></td><td class="FileContents-lineContents" id="45"><span class="pln">init</span><span class="pun">.</span><span class="pln">setupRepoOutAndBuildNumber</span><span class="pun">()</span></td></tr><tr class="u-pre u-monospace FileContents-line"><td class="u-lineNum u-noSelect FileContents-lineNum" data-line-number="46"></td><td class="FileContents-lineContents" id="46"></td></tr><tr class="u-pre u-monospace FileContents-line"><td class="u-lineNum u-noSelect FileContents-lineNum" data-line-number="47"></td><td class="FileContents-lineContents" id="47"><span class="pln">init</span><span class="pun">.</span><span class="pln">configureSubProjects</span><span class="pun">()</span></td></tr><tr class="u-pre u-monospace FileContents-line"><td class="u-lineNum u-noSelect FileContents-lineNum" data-line-number="48"></td><td class="FileContents-lineContents" id="48"></td></tr><tr class="u-pre u-monospace FileContents-line"><td class="u-lineNum u-noSelect FileContents-lineNum" data-line-number="49"></td><td class="FileContents-lineContents" id="49"><span class="kwd">def</span><span class="pln"> buildTask </span><span class="pun">=</span><span class="pln"> init</span><span class="pun">.</span><span class="pln">configureBuildOnServer</span><span class="pun">()</span></td></tr><tr class="u-pre u-monospace FileContents-line"><td class="u-lineNum u-noSelect FileContents-lineNum" data-line-number="50"></td><td class="FileContents-lineContents" id="50"></td></tr><tr class="u-pre u-monospace FileContents-line"><td class="u-lineNum u-noSelect FileContents-lineNum" data-line-number="51"></td><td class="FileContents-lineContents" id="51"><span class="pln">init</span><span class="pun">.</span><span class="pln">setupRelease</span><span class="pun">()</span></td></tr><tr class="u-pre u-monospace FileContents-line"><td class="u-lineNum u-noSelect FileContents-lineNum" data-line-number="52"></td><td class="FileContents-lineContents" id="52"></td></tr><tr class="u-pre u-monospace FileContents-line"><td class="u-lineNum u-noSelect FileContents-lineNum" data-line-number="53"></td><td class="FileContents-lineContents" id="53"><span class="pln">apply </span><span class="kwd">from</span><span class="pun">:</span><span class="pln"> </span><span class="str">&#39;buildSrc/jetify.gradle&#39;</span></td></tr><tr class="u-pre u-monospace FileContents-line"><td class="u-lineNum u-noSelect FileContents-lineNum" data-line-number="54"></td><td class="FileContents-lineContents" id="54"></td></tr><tr class="u-pre u-monospace FileContents-line"><td class="u-lineNum u-noSelect FileContents-lineNum" data-line-number="55"></td><td class="FileContents-lineContents" id="55"><span class="kwd">def</span><span class="pln"> allDocs </span><span class="pun">=</span><span class="pln"> init</span><span class="pun">.</span><span class="pln">enableDoclavaAndJDiff</span><span class="pun">(</span><span class="kwd">this</span><span class="pun">,</span><span class="pln"> </span><span class="kwd">new</span><span class="pln"> </span><span class="typ">DacOptions</span><span class="pun">(</span><span class="str">&quot;androidx&quot;</span><span class="pun">,</span><span class="pln"> </span><span class="str">&quot;ANDROIDX_DATA&quot;</span><span class="pun">),</span></td></tr><tr class="u-pre u-monospace FileContents-line"><td class="u-lineNum u-noSelect FileContents-lineNum" data-line-number="56"></td><td class="FileContents-lineContents" id="56"><span class="pln"> </span><span class="pun">[</span><span class="typ">PublishDocsRulesKt</span><span class="pun">.</span><span class="pln">RELEASE_RULE</span><span class="pun">])</span></td></tr><tr class="u-pre u-monospace FileContents-line"><td class="u-lineNum u-noSelect FileContents-lineNum" data-line-number="57"></td><td class="FileContents-lineContents" id="57"></td></tr><tr class="u-pre u-monospace FileContents-line"><td class="u-lineNum u-noSelect FileContents-lineNum" data-line-number="58"></td><td class="FileContents-lineContents" id="58"><span class="pln">buildTask</span><span class="pun">.</span><span class="pln">dependsOn</span><span class="pun">(</span><span class="pln">allDocs</span><span class="pun">)</span></td></tr><tr class="u-pre u-monospace FileContents-line"><td class="u-lineNum u-noSelect FileContents-lineNum" data-line-number="59"></td><td class="FileContents-lineContents" id="59"></td></tr><tr class="u-pre u-monospace FileContents-line"><td class="u-lineNum u-noSelect FileContents-lineNum" data-line-number="60"></td><td class="FileContents-lineContents" id="60"><span class="com">///// FLATFOOT START</span></td></tr><tr class="u-pre u-monospace FileContents-line"><td class="u-lineNum u-noSelect FileContents-lineNum" data-line-number="61"></td><td class="FileContents-lineContents" id="61"></td></tr><tr class="u-pre u-monospace FileContents-line"><td class="u-lineNum u-noSelect FileContents-lineNum" data-line-number="62"></td><td class="FileContents-lineContents" id="62"><span class="com">///// FLATFOOT END</span></td></tr></table><script nonce="PtWGLqg_mJJYPeOOBJs4YA">for (let lineNumEl of document.querySelectorAll('td.u-lineNum')) {lineNumEl.onclick = () => {window.location.hash = `#${lineNumEl.getAttribute('data-line-number')}`;};}</script></div> <!-- Container --></div> <!-- Site-content --><footer class="Site-footer"><div class="Footer"><span class="Footer-poweredBy">Powered by <a href="https://gerrit.googlesource.com/gitiles/">Gitiles</a>| <a href="https://policies.google.com/privacy">Privacy</a>| <a href="https://policies.google.com/terms">Terms</a></span><span class="Footer-formats"><a class="u-monospace Footer-formatsItem" href="?format=TEXT">txt</a> <a class="u-monospace Footer-formatsItem" href="?format=JSON">json</a></span></div></footer></body></html>

Pages: 1 2 3 4 5 6 7 8 9 10