tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

apilint.rst (3189B)


      1 apilint release process
      2 ~~~~~~~~~~~~~~~~~~~~~~~
      3 
      4 To release a new version of `apilint <https://github.com/mozilla-mobile/gradle-apilint>`_, do the following:
      5 
      6 - Create a commit titled "Branch X.Y" and modify the files ``apilint/build.gradle`` and ``apilint/Config.java`` accordingly. See for example `Branch 0.5 <https://github.com/mozilla-mobile/gradle-apilint/commit/93a79ffddb8587ad018be67a361eb2a6ae777c63>`_. Note that it's not necessary to modify ``apilint/Config.java`` if there aren't any ``apidoc`` changes.
      7 
      8 - Create a git tag with the branch version
      9 
     10 .. code:: bash
     11 
     12  $ git tag X.Y
     13 
     14 - Run tests locally by running
     15 
     16 .. code:: bash
     17 
     18  $ ./gradlew build
     19 
     20 
     21 - Publish new version to local repository
     22 
     23 .. code:: bash
     24 
     25  $ ./gradlew publishToMavenLocal
     26 
     27 - Modify ``mozilla-central`` locally to test ``apilint`` with the new version, add ``mavenLocal()`` to every ``repositories {}`` block inside the root ``build.gradle``, e.g.
     28 
     29 
     30 .. code:: diff
     31 
     32  diff --git a/build.gradle b/build.gradle
     33  index 813ba09aa3d4b..753fdb8d958a6 100644
     34  --- a/build.gradle
     35  +++ b/build.gradle
     36  @@ -60,6 +60,7 @@ allprojects {
     37       }
     38 
     39       repositories {
     40  +        mavenLocal()
     41           gradle.mozconfig.substs.GRADLE_MAVEN_REPOSITORIES.each { repository ->
     42               maven {
     43                   url repository
     44  @@ -100,6 +101,7 @@ buildDir "${topobjdir}/gradle/build"
     45 
     46   buildscript {
     47       repositories {
     48  +        mavenLocal()
     49           gradle.mozconfig.substs.GRADLE_MAVEN_REPOSITORIES.each { repository ->
     50               maven {
     51                   url repository
     52  @@ -113,7 +115,7 @@ buildscript {
     53       ext.kotlin_version = '1.5.31'
     54 
     55       dependencies {
     56  -        classpath 'org.mozilla.apilint:apilint:0.5.2'
     57  +        classpath 'org.mozilla.apilint:apilint:0.X.Y'
     58           classpath 'com.android.tools.build:gradle:7.0.3'
     59           classpath 'com.getkeepsafe.dexcount:dexcount-gradle-plugin:0.8.2'
     60           classpath 'org.apache.commons:commons-exec:1.3'
     61 
     62 * Test integration running ``api-lint``, this should always pass with no ``api.txt`` modifications needed (there could be exceptions, but should be intentional).
     63 
     64 .. code:: bash
     65 
     66  $ ./mach lint -l android-api-lint
     67 
     68 - Push the tag to the remote repository (note, the branch commit is `not` pushed to the main branch).
     69 
     70 .. code:: bash
     71 
     72    $ git push -u origin X.Y
     73 
     74 - Wait until github automation finishes successfully.
     75 - (optional, if there are any ``apidoc`` changes) ask the Releng team to publish a new `apidoc` version, the bundle will be present under the github artifacts, e.g. see ``maven.zip`` in `releases/tag/0.5 <https://github.com/mozilla-mobile/gradle-apilint/releases/tag/0.5>`_. See also `Bug 1727585 <https://bugzilla.mozilla.org/show_bug.cgi?id=1727585>`_.
     76 
     77 - Add the ``plugins.gradle.org`` keys to your ``.gradle`` folder, see `publishing_gradle_plugins.html <https://docs.gradle.org/current/userguide/publishing_gradle_plugins.html>`_.
     78 
     79 - Publish plugin by running
     80 
     81 .. code:: bash
     82 
     83  $ ./gradlew apilint:publishPlugins
     84 
     85 - Finally, update ``mozilla-central`` to use the new version, e.g. see `this patch <https://hg.mozilla.org/mozilla-central/rev/0f746422db0e9fc6b70488bdb7114f08973191a0>`_.