<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Roger Taracha</title>
    <description>The latest articles on DEV Community by Roger Taracha (@thedancercodes).</description>
    <link>https://dev.to/thedancercodes</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F27307%2F72c58c61-7d1d-48ca-985b-8d0c6304d0e9.jpg</url>
      <title>DEV Community: Roger Taracha</title>
      <link>https://dev.to/thedancercodes</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/thedancercodes"/>
    <language>en</language>
    <item>
      <title>Gradle Build Cache Node Replication in Android</title>
      <dc:creator>Roger Taracha</dc:creator>
      <pubDate>Thu, 04 Mar 2021 13:02:51 +0000</pubDate>
      <link>https://dev.to/thedancercodes/gradle-build-cache-node-replication-in-android-14bc</link>
      <guid>https://dev.to/thedancercodes/gradle-build-cache-node-replication-in-android-14bc</guid>
      <description>&lt;p&gt;&lt;strong&gt;NOTE: To achieve build-cache node replication, you need to have an instance of Gradle Enterprise running.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In this post, I will share our experience at &lt;a href="https://www.premise.com/" rel="noopener noreferrer"&gt;Premise Data&lt;/a&gt; using build-cache node replication to serve our distributed teams across the globe. I will also share the inner workings of the Gradle build script solution for replicated node selection.&lt;/p&gt;

&lt;p&gt;But before we delve into build-cache node replication, let us do a brief recap of the gradle build cache.&lt;/p&gt;

&lt;h3&gt;
  
  
  Gradle Build Cache
&lt;/h3&gt;

&lt;p&gt;The Gradle build cache is a caching mechanism that aims to save the developer's time by reusing outputs produced by other builds. &lt;br&gt;
The build cache works by storing build outputs(&lt;em&gt;locally or remotely&lt;/em&gt;) and allowing builds to fetch these outputs from the cache when it is determined that inputs have not changed, avoiding the expensive work of regenerating them.&lt;/p&gt;

&lt;p&gt;The Build Cache is a build acceleration technology that enhances build performance. The benefits of the build cache are as follows:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Faster build times lead to faster feedback&lt;/li&gt;
&lt;li&gt;Faster feedback leads to better developer productivity &lt;/li&gt;
&lt;li&gt;Better developer productivity ships features quicker&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  Build Cache Nodes
&lt;/h3&gt;

&lt;p&gt;The Gradle build-cache node software is a freely available HTTP remote cache server for Gradle’s build caching functionality.&lt;/p&gt;

&lt;p&gt;The build-cache node can be used without a Gradle Enterprise installation with restricted functionality.&lt;/p&gt;

&lt;p&gt;Build-cache nodes can &lt;em&gt;optionally&lt;/em&gt; be connected with Gradle Enterprise for centralized management and monitoring, and to enable replicating cache entries between multiple nodes.&lt;/p&gt;

&lt;p&gt;By connecting remote nodes to a Gradle Enterprise instance, you are able to configure them centrally from Gradle Enterprise and have them replicate entries from the default built-in cache node.&lt;/p&gt;

&lt;p&gt;The installation and operation of remote build cache nodes is documented in the &lt;a href="https://docs.gradle.com/build-cache-node/" rel="noopener noreferrer"&gt;Build Cache Node User Manual&lt;/a&gt; and the process of connection of the cache nodes to Gradle Enterprise is documented in &lt;a href="https://docs.gradle.com/enterprise/admin/current/#connecting_with_gradle_enterprise" rel="noopener noreferrer"&gt;Connecting with Gradle Enterprise&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;
  
  
  Replication
&lt;/h3&gt;

&lt;p&gt;Replication allows users to use a cache node that they have a better network link to, while reusing artifacts from the main cache node that is further away. This is particularly effective for geographically distributed teams.&lt;/p&gt;

&lt;p&gt;In our case, the main cache node is located in &lt;strong&gt;US, Seattle&lt;/strong&gt; and we have replicated nodes to serve our developers in other places around the globe.&lt;/p&gt;

&lt;p&gt;The graphic below shows our team distribution by highlighting the developer locations:&lt;/p&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flnw353gqx5rbr85tij9z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flnw353gqx5rbr85tij9z.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;



&lt;p&gt;The replication settings for each node can be configured via the &lt;strong&gt;Nodes&lt;/strong&gt; configuration page in Gradle Enterprise. They can not be configured for remote nodes via the remote node’s user interface or configuration file.&lt;/p&gt;
&lt;h4&gt;
  
  
  Tip #1
&lt;/h4&gt;

&lt;p&gt;A typical arrangement is to have continuous integration builds push to a default built-in cache node on a local network, and have other nodes used by developers in different locations,( &lt;em&gt;ideally on their local network&lt;/em&gt;), use it as their replication source.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5chbywpklrzu6u2fnmio.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5chbywpklrzu6u2fnmio.png" alt="Node Replication"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The replication technology can be used to separate cache artifacts, distribute the load, and improve build performance by having a better network link between the developer's build and the node.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;NOTE: The bandwidth and latency of the network link between a build and a build cache significantly affect build performance. &lt;/p&gt;
&lt;/blockquote&gt;
&lt;h4&gt;
  
  
  Tip #2
&lt;/h4&gt;

&lt;p&gt;We keep an eye on the network bandwidth and latency using the &lt;a href="https://github.com/runningcode/gradle-doctor" rel="noopener noreferrer"&gt;Gradle Doctor plugin&lt;/a&gt; that outputs the &lt;a href="https://runningcode.github.io/gradle-doctor/remote-cache/" rel="noopener noreferrer"&gt;remote build-cache benchmark report&lt;/a&gt; whenever our builds run.&lt;/p&gt;
&lt;h4&gt;
  
  
  Value Proposition
&lt;/h4&gt;

&lt;p&gt;The main value proposition is that by replicating cache nodes, your developer's local build times will significantly be reduced. The effect will be faster feedback cycles &amp;amp; a highly satisfying developer experience.&lt;/p&gt;
&lt;h3&gt;
  
  
  Connecting to Gradle Enterprise
&lt;/h3&gt;

&lt;p&gt;The process of connecting a remote cache node to your Gradle Enterprise installation is pretty straightforward.&lt;/p&gt;
&lt;h4&gt;
  
  
  (1) Create a record for the node in Gradle Enterprise
&lt;/h4&gt;

&lt;p&gt;Visit &lt;code&gt;/cache-admin&lt;/code&gt; on your Gradle Enterprise dashboard, and select &lt;strong&gt;Nodes&lt;/strong&gt; from the left menu. In the &lt;strong&gt;Remote nodes &amp;gt; Create new node&lt;/strong&gt; section, enter the name for your node and click &lt;strong&gt;Create new node&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;In this example, we will assume we have a new engineer joining the team from Honduras.&lt;/p&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvtk7evkt80l8s952wwmg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvtk7evkt80l8s952wwmg.png" alt="Create New Node"&gt;&lt;/a&gt;&lt;/p&gt;



&lt;p&gt;The Honduras node will now be listed in the Existing nodes section. &lt;/p&gt;

&lt;p&gt;Each node is assigned a &lt;code&gt;key&lt;/code&gt; and a &lt;code&gt;secret&lt;/code&gt;. The node needs to be configured with the key and secret.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The secret is only viewable for 5 minutes after node creation. If the node secret is lost, use the regenerate function to issue a new secret which will then be viewable for 5 minutes. &lt;br&gt;
See screenshot below:&lt;/p&gt;
&lt;/blockquote&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2nyla9zefi3je84k7qva.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2nyla9zefi3je84k7qva.png" alt="Existing Nodes"&gt;&lt;/a&gt;&lt;/p&gt;


&lt;h4&gt;
  
  
  (2) Gradle Enterprise Registration
&lt;/h4&gt;

&lt;p&gt;We will now proceed to register and connect the build-cache node with our Gradle Enterprise installation. This registration enables centralized monitoring and cache entry replication which are extra features. &lt;/p&gt;

&lt;p&gt;The registration can be configured via the &lt;strong&gt;web interface&lt;/strong&gt; or via the &lt;strong&gt;config file&lt;/strong&gt;. In our case, we will configure it via the web interface.&lt;/p&gt;
&lt;h5&gt;
  
  
  (i) Web Interface Registration
&lt;/h5&gt;

&lt;p&gt;Open the web interface of your build cache node on your browser. Focus on the &lt;strong&gt;Gradle Enterprise&lt;/strong&gt; section on the web interface and expand the &lt;code&gt;Settings&lt;/code&gt; dropdown.&lt;/p&gt;

&lt;p&gt;Configure your node with the details of the Gradle Enterprise server to connect with. They include the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Gradle Enterprise server&lt;/strong&gt; ~ The URL of the Gradle Enterprise instance we desire to connect to.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;My address&lt;/strong&gt; ~ The public address of this build-cache node.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Key&lt;/strong&gt; ~ The identifying key of this node. This is obtained from Gradle Enterprise via the replication step above.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Secret&lt;/strong&gt; ~ The secret value for this node. This is obtained from Gradle Enterprise via the replication step above.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fptolwrpo1ytyijf4xo0q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fptolwrpo1ytyijf4xo0q.png" alt="Gradle Registration"&gt;&lt;/a&gt;&lt;/p&gt;



&lt;p&gt;Click the &lt;strong&gt;Save&lt;/strong&gt; button. If your setup is done correctly, your node should successfully connect to the Gradle Enterprise instance and should be available for replication.&lt;/p&gt;
&lt;h3&gt;
  
  
  Gradle Build Script Solution For Replicated Node Selection
&lt;/h3&gt;

&lt;p&gt;Now that we have our cache nodes setup, its time to explain our build script solution. The script enables a developer to use a cache node that they have a better network link to.&lt;/p&gt;

&lt;p&gt;The script is available in this &lt;a href="https://github.com/TheDancerCodes/gradle-build-cache-node-replication" rel="noopener noreferrer"&gt;Android project repo&lt;/a&gt;. The project has been setup to generate &lt;em&gt;build scans&lt;/em&gt; and leverage the &lt;em&gt;build-cache&lt;/em&gt; technology.&lt;/p&gt;

&lt;p&gt;The 3 main files to focus on are:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;build-cache-node-config.groovy&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;build.gradle(project level)&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;settings.gradle&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h6&gt;
  
  
  (i) build-cache-node-config.groovy
&lt;/h6&gt;

&lt;p&gt;This file contains the &lt;strong&gt;title&lt;/strong&gt; and &lt;strong&gt;URL&lt;/strong&gt; of all our build-cache nodes that are connected to our Gradle Enterprise instance.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;environments {
    default_node {
        nodeTitle = '# Default Build Cache Node'
        nodeUrl = 'https://gradle-enterprise.your-domain.com/cache/'
    }

    east_africa_node {
        nodeTitle = '# East Africa Build Cache Node'
        nodeUrl = 'https://east.xx.yyy.zzz/cache/'
    }

    west_africa_node {
        nodeTitle = '# West Africa Build Cache Node'
        nodeUrl = 'https://west.xx.yyy.zzz/cache/'
    }

    us_west_node {
        nodeTitle = '# US West Build Cache Node'
        nodeUrl = 'https://us-west.xx.yyy.zzz/cache/'
    }

    honduras_node {
        nodeTitle = '# Honduras Build Cache Node'
        nodeUrl = 'https://honduras.xx.yyy.zzz/cache/'
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Based on the node a user selects, the title and URL path will be output to a &lt;code&gt;build-cache-node-config.properties&lt;/code&gt; file that is created during the node selection process.&lt;/p&gt;

&lt;h6&gt;
  
  
  (ii) build.gradle
&lt;/h6&gt;

&lt;p&gt;This is the project level gradle file. It contains a code region responsible for generating the &lt;code&gt;build-cache-node-config.properties&lt;/code&gt; that contains the build-cache node selected by the developer.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// region Build Cache Node Replication Setup
def loadBuildCacheNodes() {
    def node_title = hasProperty('node') ? node: 'default_node'
    println "Current Build Cache Node: " + node_title

    def configFile = file('build-cache-node-config.groovy')
    def config = new ConfigSlurper(node_title).parse(configFile.toURL())
    project.ext.config = config
}

task setBuildCacheNode {
    doLast {
        if (project.hasProperty('node')) {
            loadBuildCacheNodes()

            new File(rootDir, "build-cache-node-config.properties").text =
                    """ $config.nodeTitle \n replicated_build_cache_node=$config.nodeUrl"""

            println "nodeTitle:  $config.nodeTitle"
            println "nodeUrl:  $config.nodeUrl"

        } else {
            // empty
        }
    }
}

task setEastAfricaBuildCacheNode() {
    group = "build setup"
    description = "Configures the remote build cache url for devs in East Africa"

    doFirst {
        project.ext.set("node", "east_africa_node")
    }
    finalizedBy "setBuildCacheNode"
}

task setWestAfricaBuildCacheNode() {
    group = "build setup"
    description = "Configures the remote build cache url for devs in West Africa"

    doFirst {
        project.ext.set("node", "west_africa_node")
    }
    finalizedBy "setBuildCacheNode"
}

task setUSABuildCacheNode() {
    group = "build setup"
    description = "Configures the remote build cache url for devs in the United States"

    doFirst {
        project.ext.set("node", "us_west_node")
    }
    finalizedBy "setBuildCacheNode"
}

task setHondurasBuildCacheNode() {
    group = "build setup"
    description = "Configures the remote build cache url for devs in Honduras"

    doFirst {
        project.ext.set("node", "honduras_node")
    }
    finalizedBy "setBuildCacheNode"
}

//endregion
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;loadBuildCacheNodes()&lt;/strong&gt; - This function loads the nodes available in the &lt;code&gt;build-cache-node-config.groovy&lt;/code&gt; file and passes it over to the &lt;code&gt;setBuildCacheNode&lt;/code&gt; task.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;setBuildCacheNode&lt;/strong&gt; - This task accepts the user's selected node as input and creates a new &lt;code&gt;build-cache-node-config.properties&lt;/code&gt; file containing the build cache node title and URL.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;setEastAfricaBuildCacheNode&lt;/strong&gt;, &lt;strong&gt;setWestAfricaBuildCacheNode&lt;/strong&gt;, &lt;strong&gt;setUSABuildCacheNode&lt;/strong&gt;, &lt;strong&gt;setHondurasBuildCacheNode&lt;/strong&gt; - These tasks set the required node as per the highlighted region and passes this node selection as input to the &lt;code&gt;setBuildCacheNode&lt;/code&gt; task.&lt;/p&gt;

&lt;h6&gt;
  
  
  (iii) settings.gradle
&lt;/h6&gt;

&lt;p&gt;In the &lt;code&gt;remote(HttpBuildCache)&lt;/code&gt; closure contained in this gradle file, we add some logic to determine the replicated cache node URL that our project will pull artifacts from.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;remote(HttpBuildCache) {

        // Create a variable called buildCacheNodesPropertiesFile and initialize it to your
        // build-cache-nodes.properties file, in the rootProject folder.
        def buildCacheNodesPropertiesFile = new File("build-cache-node-config.properties")

        if (!buildCacheNodesPropertiesFile.exists()) {
            url = "https://gradle-enterprise.your-domain.com/cache/"
        } else {
            // Initialize a new Properties() object called buildCacheNodesProperties
            def buildCacheNodesProperties = new Properties()

            // Load the build-cache-nodes.properties file into the buildCacheNodesProperties object.
            buildCacheNodesProperties.load(new FileInputStream(buildCacheNodesPropertiesFile))

            if (buildCacheNodesProperties != null
                    &amp;amp;&amp;amp; buildCacheNodesProperties.containsKey('replicated_build_cache_node')) {

                // Set the dev specified build cache node url
                url = buildCacheNodesProperties['replicated_build_cache_node']
            } else{
                // Set the default build cache node url
                url = buildCacheNodesProperties['default_build_cache_node']
            }
        }
...
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The above logic basically reads the contents of the &lt;code&gt;build-cache-node-config.properties&lt;/code&gt; file and determines whether our project leverages the &lt;strong&gt;selected replicated node&lt;/strong&gt; or whether it falls back to the &lt;strong&gt;default built-in cache node&lt;/strong&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  Build Cache Node Selection Process
&lt;/h4&gt;

&lt;p&gt;Now that we have an understanding of Gradle Enterprise, Build Cache Node Replication, and the inner workings of our Gradle build script, we will now go through the build cache node selection process.&lt;/p&gt;

&lt;p&gt;We will achieve this from our IDE. Our IDE of choice is Android Studio.&lt;/p&gt;

&lt;p&gt;There are 4 build-cache nodes for the 4 main regions our developers are currently located in:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;east_africa_node&lt;/code&gt; for East Africa.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;west_africa_node&lt;/code&gt; for West Africa.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;us_west_node&lt;/code&gt; for US West Coast.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;honduras_node&lt;/code&gt; for Honduras. (&lt;em&gt;The node we created in this blog post&lt;/em&gt;)&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In Android Studio, select the &lt;strong&gt;Gradle&lt;/strong&gt; tab and open the &lt;code&gt;build setup&lt;/code&gt; group of tasks. This should display the build cache node tasks available per region.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fje8wv58soa98ywizkdb4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fje8wv58soa98ywizkdb4.png" alt="Gradle Tab"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Click on your preferred gradle task (&lt;strong&gt;setHondurasBuildCacheNode&lt;/strong&gt;) and this action will result in the following output under the &lt;em&gt;Build&lt;/em&gt; tab in your IDE.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;4:19:56 PM: Executing task 'setHondurasBuildCacheNode'...

Executing tasks: [setHondurasBuildCacheNode] in project /Projects/Android/gradle-build-cache-node-replication

&amp;gt; Task :setHondurasBuildCacheNode

&amp;gt; Task :setBuildCacheNode
Current Build Cache Node: honduras_node
nodeTitle:  # Honduras Build Cache Node
nodeUrl:  https://honduras.xx.yyy.zzz/cache/

BUILD SUCCESSFUL in 552ms
2 actionable tasks: 2 executed

Publishing build scan...
https://gradle.com/s/s3x2bmklo2vjc

4:19:58 PM: Task execution finished 'setHondurasBuildCacheNode'.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This task action will generate a &lt;code&gt;build-cache-node-config.properties&lt;/code&gt; file at the root level of your project. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;NOTE: Changes to this file are not tracked by source control.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuw5cw4qkykq48xhyxi6b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuw5cw4qkykq48xhyxi6b.png" alt="Honduras Build Cache Node"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Also, if you open the generated build scan in your browser, you will confirm that our project is leveraging the Honduras cache node.&lt;/p&gt;




&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1rnnkkusluuxprvi2eig.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1rnnkkusluuxprvi2eig.png" alt="Honduras Build Scan"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;blockquote&gt;
&lt;p&gt;NOTE: The 4 Gradle tasks can also be run directly from the command line:&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;./gradlew setUSABuildCacheNode

./gradlew setEastAfricaBuildCacheNode

./gradlew setWestAfricaBuildCacheNode

./gradlew setWestAfricaBuildCacheNode
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  That's All Folks
&lt;/h3&gt;

&lt;p&gt;It is my hope that you found this useful. If there's anything specific I haven't mentioned above that you think other readers will benefit from, feel free to mention it in the comments section below.&lt;br&gt;
Enjoy!&lt;/p&gt;

</description>
      <category>android</category>
      <category>performance</category>
      <category>productivity</category>
      <category>gradle</category>
    </item>
    <item>
      <title>Embracing Developer Productivity Engineering in Android [Video Series]</title>
      <dc:creator>Roger Taracha</dc:creator>
      <pubDate>Wed, 23 Sep 2020 18:13:36 +0000</pubDate>
      <link>https://dev.to/thedancercodes/embracing-developer-productivity-engineering-in-android-video-series-1hii</link>
      <guid>https://dev.to/thedancercodes/embracing-developer-productivity-engineering-in-android-video-series-1hii</guid>
      <description>&lt;p&gt;&lt;strong&gt;Developer Productivity Engineering&lt;/strong&gt; is fast becoming an integral part of the development &amp;amp; release process in the Software Engineering world today. The benefits of investing in Productivity Engineering significantly outweigh the cost and frustration of inactivity in this space.&lt;/p&gt;

&lt;p&gt;In this &lt;a href="https://www.youtube.com/watch?v=yftd0YFTx-0&amp;amp;list=PLCZ2ZIqMhTUYX7_lFPwmqGEej9NmgVWfy"&gt;video series&lt;/a&gt;, we will cover the importance of productivity engineering and explore why Android developers &amp;amp; teams should embrace productivity engineering as part of their development lifecycle.&lt;/p&gt;

&lt;p&gt;We will cover the following key topics:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Tips to improve your Gradle builds by achieving faster, stable, and reproducible builds.&lt;/li&gt;
&lt;li&gt;Importance of Build Scans in solving build problems &amp;amp; improving team collaborations.&lt;/li&gt;
&lt;li&gt;Build Caching to significantly speed-up builds.&lt;/li&gt;
&lt;li&gt;Impact of Build Cache Node Replication on your builds.&lt;/li&gt;
&lt;li&gt;How to make a compelling, data-focused case for Productivity Engineering to your team and manager.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I will take you through a real-life example of using Gradle Enterprise to diagnose builds, improve the build experience, and make a business case for a focus on Productivity Engineering. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Gradle Enterprise&lt;/strong&gt; is a paid service that scans every developer &amp;amp; CI build and provides a remote cache for unchanged builds &amp;amp; tests artifacts. Gradle Enterprise gives you the data and tools to shrink wasted build time by up to &lt;strong&gt;90%&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Some of the key Gradle Enterprise features we will look into are:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Build Scans and Scan Comparisons&lt;/strong&gt; - Gaining access to Root Cause Analysis Data.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Trends and Insights&lt;/strong&gt; - Enables you to Practice Continuous Learning &amp;amp; Improvement.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Build Cache &amp;amp; Distributed Testing&lt;/strong&gt; - To Reduce Build &amp;amp; Test Times Up to 90%.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Failure Analytics&lt;/strong&gt; - Eliminate Flaky Tests and Other Avoidable Failures.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CI Build Cache &amp;amp; Resource Profiling&lt;/strong&gt; - To Optimize CI Cost &amp;amp; Resource Efficiency.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;We'll cover important build optimization properties and walkthrough several plugins to help diagnose and fix build issues.&lt;/p&gt;

&lt;p&gt;Lastly, we will highlight the value proposition of Gradle Enterprise and other open-source tools to make data-driven decisions to continuously improve your build process and developer productivity.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;My goal for you is to gain a better understanding and appreciation for Productivity Engineering. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If there's anything specific I haven't mentioned above that you would like me to cover, feel free to mention it in the comments section below.&lt;/p&gt;

&lt;h2&gt;
  
  
  Special thanks
&lt;/h2&gt;

&lt;p&gt;Thanks again to &lt;a href="https://twitter.com/n8ebel"&gt;Nate Ebel&lt;/a&gt; for reviewing an early draft.&lt;/p&gt;

</description>
      <category>android</category>
      <category>performance</category>
      <category>productivity</category>
      <category>gradle</category>
    </item>
  </channel>
</rss>
