<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Gradle &#8211; Best DevOps</title>
	<atom:link href="https://www.bestdevops.com/tag/gradle/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.bestdevops.com</link>
	<description>Lets Learn, Do it &#38; Share! Thats a Best DevOps!!!</description>
	<lastBuildDate>Wed, 14 Oct 2026 15:17:59 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.3</generator>
	<item>
		<title>Gradle: The Definitive Guide to Architecture, Use Cases, Workflow, and Getting Started</title>
		<link>https://www.bestdevops.com/gradle-the-definitive-guide-to-architecture-use-cases-workflow-and-getting-started/</link>
					<comments>https://www.bestdevops.com/gradle-the-definitive-guide-to-architecture-use-cases-workflow-and-getting-started/#respond</comments>
		
		<dc:creator><![CDATA[vijay1 vijay1]]></dc:creator>
		<pubDate>Wed, 21 May 2025 05:08:17 +0000</pubDate>
				<category><![CDATA[DevOps]]></category>
		<category><![CDATA[AndroidDevelopment]]></category>
		<category><![CDATA[BuildAutomation]]></category>
		<category><![CDATA[ContinuousIntegration]]></category>
		<category><![CDATA[Gradle]]></category>
		<category><![CDATA[OpenSource]]></category>
		<category><![CDATA[SoftwareDevelopment]]></category>
		<guid isPermaLink="false">https://www.bestdevops.com/?p=31240</guid>

					<description><![CDATA[What is Gradle? Gradle is a modern, open-source build automation system designed to automate the compilation, testing, deployment, and packaging [&#8230;]]]></description>
										<content:encoded><![CDATA[
<figure class="wp-block-image size-large"><img fetchpriority="high" decoding="async" width="1024" height="579" src="https://www.bestdevops.com/wp-content/uploads/2025/05/image-75-1024x579.png" alt="" class="wp-image-31243" srcset="https://www.bestdevops.com/wp-content/uploads/2025/05/image-75-1024x579.png 1024w, https://www.bestdevops.com/wp-content/uploads/2025/05/image-75-300x170.png 300w, https://www.bestdevops.com/wp-content/uploads/2025/05/image-75-768x434.png 768w, https://www.bestdevops.com/wp-content/uploads/2025/05/image-75.png 1038w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 class="wp-block-heading">What is Gradle?</h2>



<p class="wp-block-paragraph">Gradle is a modern, open-source build automation system designed to automate the compilation, testing, deployment, and packaging of software applications. First introduced in 2007 by Hans Dockter, Gradle bridges the gap between traditional build tools like Apache Ant and Apache Maven by combining their best features with a flexible and powerful domain-specific language (DSL) based on Groovy and, more recently, Kotlin.</p>



<p class="wp-block-paragraph">Gradle allows developers to define build logic programmatically, supports multi-language builds (including Java, Kotlin, Scala, C/C++, and more), and is especially prevalent in Android development where it is the official build system. Its primary goal is to simplify and accelerate the build process by supporting incremental builds, dependency management, and extensive customization.</p>



<p class="wp-block-paragraph">By leveraging a declarative yet programmable DSL, Gradle enables fine-grained control over every aspect of the build process while maintaining simplicity for common tasks. Its extensible plugin ecosystem and compatibility with existing repositories (like Maven Central and Ivy) make it a favorite tool in modern continuous integration and continuous delivery (CI/CD) pipelines.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 class="wp-block-heading">Major Use Cases of Gradle</h2>



<p class="wp-block-paragraph">Gradle&#8217;s versatility enables it to be used in many different scenarios:</p>



<h3 class="wp-block-heading">1. <strong>Building JVM Applications</strong></h3>



<p class="wp-block-paragraph">Gradle supports Java, Kotlin, Groovy, and Scala projects natively. It compiles source code, manages dependencies, executes tests, and packages applications into JAR, WAR, or other formats. Developers appreciate Gradle for its powerful incremental build support and task configuration avoidance, which speeds up compilation and testing cycles.</p>



<h3 class="wp-block-heading">2. <strong>Android App Development</strong></h3>



<p class="wp-block-paragraph">Google’s Android Studio uses Gradle as its default build system. Gradle handles multiple build variants, flavors, and signing configurations required for Android projects. Its incremental build capabilities help manage complex projects efficiently, and its plugin system integrates with Android SDK tools seamlessly.</p>



<h3 class="wp-block-heading">3. <strong>Multi-language and Polyglot Projects</strong></h3>



<p class="wp-block-paragraph">Beyond JVM languages, Gradle supports native languages like C/C++ and Swift, as well as scripting languages such as Python and JavaScript through plugins. This makes it ideal for polyglot projects where multiple languages and build tools coexist.</p>



<h3 class="wp-block-heading">4. <strong>Continuous Integration and Delivery</strong></h3>



<p class="wp-block-paragraph">Gradle integrates with CI/CD tools (e.g., Jenkins, GitHub Actions, GitLab CI) to automate builds, tests, and deployments. Its build cache and daemon drastically reduce build times, enabling faster feedback in automated pipelines.</p>



<h3 class="wp-block-heading">5. <strong>Dependency Management</strong></h3>



<p class="wp-block-paragraph">Gradle&#8217;s flexible dependency resolution mechanism supports version conflicts, dynamic versions, and custom repositories, simplifying complex dependency trees for large projects.</p>



<h3 class="wp-block-heading">6. <strong>Extensible Build Automation</strong></h3>



<p class="wp-block-paragraph">Custom tasks and plugins enable teams to automate ancillary processes, such as generating documentation, code quality checks, or deploying to artifact repositories.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 class="wp-block-heading">How Gradle Works Along with Architecture</h2>



<figure class="wp-block-image size-full is-resized"><img decoding="async" width="596" height="315" src="https://www.bestdevops.com/wp-content/uploads/2025/05/image-78.png" alt="" class="wp-image-31247" style="width:833px;height:auto" srcset="https://www.bestdevops.com/wp-content/uploads/2025/05/image-78.png 596w, https://www.bestdevops.com/wp-content/uploads/2025/05/image-78-300x159.png 300w" sizes="(max-width: 596px) 100vw, 596px" /></figure>



<p class="wp-block-paragraph">Gradle’s architecture revolves around build scripts, task execution, and plugin management. It’s designed for flexibility, performance, and extensibility.</p>



<h3 class="wp-block-heading">Key Components:</h3>



<ol class="wp-block-list">
<li><strong>Build Scripts (Groovy/Kotlin DSL)</strong><br>Developers write declarative yet programmable build scripts (<code>build.gradle</code> or <code>build.gradle.kts</code>) to define the build logic. Scripts declare plugins, dependencies, repositories, and custom tasks.</li>



<li><strong>Gradle Daemon</strong><br>To speed up builds, Gradle runs as a background daemon process that stays alive between builds, avoiding JVM startup overhead.</li>



<li><strong>Initialization Phase</strong><br>Determines which projects to include in the build (supports multi-project builds). It sets up project objects for the next phase.</li>



<li><strong>Configuration Phase</strong><br>Gradle reads and configures all projects and tasks. During this phase, the build scripts are executed, and the task graph is constructed based on dependencies.</li>



<li><strong>Execution Phase</strong><br>Gradle executes tasks in order, based on the dependency graph. It skips tasks whose inputs and outputs haven’t changed (incremental build) to save time.</li>



<li><strong>Task Graph</strong><br>Tasks represent atomic build actions (e.g., compile, test, jar). Gradle builds a directed acyclic graph (DAG) of these tasks reflecting execution order and dependencies.</li>



<li><strong>Plugins</strong><br>Plugins extend Gradle’s functionality, including the Java plugin, Android plugin, and third-party plugins. Plugins can add new tasks, configure existing ones, and introduce conventions.</li>



<li><strong>Dependency Resolution</strong><br>Gradle manages project dependencies via Maven, Ivy, or custom repositories, resolving version conflicts and downloading necessary libraries dynamically.</li>
</ol>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 class="wp-block-heading">Basic Workflow of Gradle</h2>



<p class="wp-block-paragraph">Gradle’s workflow reflects a sequence of well-defined phases enabling flexible and efficient builds.</p>



<h3 class="wp-block-heading">1. <strong>Writing Build Scripts</strong></h3>



<p class="wp-block-paragraph">Developers define their project structure, plugins, repositories, and dependencies in the build script. They also declare custom tasks if needed.</p>



<h3 class="wp-block-heading">2. <strong>Initialization</strong></h3>



<p class="wp-block-paragraph">Gradle determines which projects are part of the build (single or multi-project) and sets up necessary data structures.</p>



<h3 class="wp-block-heading">3. <strong>Configuration</strong></h3>



<p class="wp-block-paragraph">Gradle processes all build scripts and configures projects and tasks, setting up task dependencies and preparing the task graph.</p>



<h3 class="wp-block-heading">4. <strong>Dependency Resolution</strong></h3>



<p class="wp-block-paragraph">Gradle downloads and caches dependencies required for compilation and testing from configured repositories.</p>



<h3 class="wp-block-heading">5. <strong>Execution</strong></h3>



<p class="wp-block-paragraph">Gradle executes the tasks in the order dictated by the dependency graph, skipping any task that is up-to-date or cached, thereby improving build speed.</p>



<h3 class="wp-block-heading">6. <strong>Reporting</strong></h3>



<p class="wp-block-paragraph">Upon completion, Gradle provides build reports, test summaries, and logs to help developers analyze build results and failures.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 class="wp-block-heading">Step-by-Step Getting Started Guide for Gradle</h2>



<h3 class="wp-block-heading">Step 1: Install Gradle</h3>



<ul class="wp-block-list">
<li>Download the latest Gradle distribution from <a href="https://gradle.org/install/">https://gradle.org/install/</a>.</li>



<li>Extract the ZIP and set environment variables (<code>GRADLE_HOME</code>) and update the system <code>PATH</code>.</li>
</ul>



<p class="wp-block-paragraph">Verify installation via:</p>


<pre class="wp-block-code"><span><code class="hljs">gradle -v
</code></span></pre>


<h3 class="wp-block-heading">Step 2: Initialize a New Project</h3>



<p class="wp-block-paragraph">In your project directory, run:</p>


<pre class="wp-block-code"><span><code class="hljs">gradle init
</code></span></pre>


<p class="wp-block-paragraph">Choose your project type (Java, Groovy, Kotlin, etc.) and build script DSL (Groovy or Kotlin).</p>



<h3 class="wp-block-heading">Step 3: Explore the Build Script</h3>



<p class="wp-block-paragraph">Open <code>build.gradle</code> or <code>build.gradle.kts</code> generated by Gradle. It defines:</p>



<ul class="wp-block-list">
<li><strong>Plugins</strong>: e.g., <code>id 'java'</code></li>



<li><strong>Repositories</strong>: where dependencies are fetched, e.g., <code>mavenCentral()</code></li>



<li><strong>Dependencies</strong>: libraries your project needs.</li>
</ul>



<p class="wp-block-paragraph">Example snippet for Java:</p>


<pre class="wp-block-code"><span><code class="hljs language-javascript">plugins {
    id <span class="hljs-string">'java'</span>
}

repositories {
    mavenCentral()
}

dependencies {
    testImplementation <span class="hljs-string">'junit:junit:4.13.2'</span>
}
</code></span></pre>


<h3 class="wp-block-heading">Step 4: Build the Project</h3>



<p class="wp-block-paragraph">Run the build task:</p>


<pre class="wp-block-code"><span><code class="hljs">gradle build
</code></span></pre>


<p class="wp-block-paragraph">This compiles source code, runs tests, and packages your application.</p>



<h3 class="wp-block-heading">Step 5: Run Tests</h3>



<p class="wp-block-paragraph">Execute tests explicitly with:</p>


<pre class="wp-block-code"><span><code class="hljs">gradle test
</code></span></pre>


<p class="wp-block-paragraph">Gradle will run your unit tests and generate reports.</p>



<h3 class="wp-block-heading">Step 6: Add Custom Tasks (Optional)</h3>



<p class="wp-block-paragraph">You can define custom tasks in your build script. Example:</p>


<pre class="wp-block-code"><span><code class="hljs language-javascript">task hello {
    doLast {
        println <span class="hljs-string">'Hello, Gradle!'</span>
    }
}
</code></span></pre>


<p class="wp-block-paragraph">Run your task:</p>


<pre class="wp-block-code"><span><code class="hljs">gradle hello
</code></span></pre>]]></content:encoded>
					
					<wfw:commentRss>https://www.bestdevops.com/gradle-the-definitive-guide-to-architecture-use-cases-workflow-and-getting-started/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Build Automation Software Market: Key Players, Segments, and What DevOps Teams Should Know</title>
		<link>https://www.bestdevops.com/global-build-automation-software-market-2020-know-the-companies-list-could-potentially-benefit-or-loose-out-from-the-impact-of-covid-19-top-companies-jenkins-teamcity-circleci-bamboo-ansible/</link>
					<comments>https://www.bestdevops.com/global-build-automation-software-market-2020-know-the-companies-list-could-potentially-benefit-or-loose-out-from-the-impact-of-covid-19-top-companies-jenkins-teamcity-circleci-bamboo-ansible/#respond</comments>
		
		<dc:creator><![CDATA[DM Team]]></dc:creator>
		<pubDate>Tue, 25 Aug 2020 06:04:31 +0000</pubDate>
				<category><![CDATA[Teamcity]]></category>
		<category><![CDATA[BasedMarket]]></category>
		<category><![CDATA[CircleC]]></category>
		<category><![CDATA[Gradle]]></category>
		<category><![CDATA[scientect]]></category>
		<category><![CDATA[SoftwareManufacturers]]></category>
		<category><![CDATA[Softwarewith]]></category>
		<category><![CDATA[TeamCity]]></category>
		<guid isPermaLink="false">http://www.bestdevops.com/?p=13422</guid>

					<description><![CDATA[An overview of the global build automation software market, covering key tools like Jenkins, CircleCI, TeamCity, and Gradle — including market segments, deployment types, and factors shaping adoption.]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph"><em>This article is based on a market research summary originally published by Scientect covering the global build automation software landscape as of 2020. Specific forecast figures and proprietary data points have not been independently verified.</em></p>



<h2 class="wp-block-heading">What Is Build Automation Software?</h2>



<p class="wp-block-paragraph">Build automation software handles the process of compiling source code, running tests, packaging binaries, and deploying applications — automatically and repeatably. For DevOps and platform engineering teams, it is a foundational layer of any CI/CD pipeline. Rather than relying on manual steps that are error-prone and slow, build automation tools execute predefined workflows triggered by code commits, pull requests, or schedules.</p>



<p class="wp-block-paragraph">The global market for these tools has grown steadily as organizations across industries accelerate software delivery cycles. Market research from around 2020 highlighted the sector as one with strong growth prospects through the mid-2020s, driven by cloud migration, DevOps adoption, and — unexpectedly — the shift to remote-first engineering during the COVID-19 pandemic.</p>



<h2 class="wp-block-heading">Market Segments</h2>



<h3 class="wp-block-heading">By Deployment Type</h3>



<ul class="wp-block-list">
<li><strong>Cloud-based:</strong> Hosted and managed by a vendor. Teams access the service via browser or API without managing infrastructure. Examples include CircleCI, Travis CI, and Codeship. Lower operational overhead but may raise data residency concerns.</li>
<li><strong>Web-based / Self-hosted:</strong> Deployed on the organization&#8217;s own infrastructure or private cloud. Jenkins and TeamCity are typical choices here. Offers greater control over configuration, plugins, and security posture at the cost of operational burden.</li>
</ul>



<h3 class="wp-block-heading">By Organization Size</h3>



<ul class="wp-block-list">
<li><strong>Large Enterprises:</strong> Tend to require on-premises or hybrid deployments, advanced role-based access control, audit logging, and integration with enterprise toolchains (Active Directory, JIRA, Artifactory, etc.).</li>
<li><strong>SMEs (Small and Medium Enterprises):</strong> Often prefer SaaS-based tools with low setup friction and usage-based pricing. Speed to value matters more than deep customization.</li>
</ul>



<h2 class="wp-block-heading">Key Players in the Build Automation Market</h2>



<p class="wp-block-paragraph">The following tools are consistently cited as leading platforms in the build automation space. Each has a distinct positioning and set of trade-offs:</p>



<figure class="wp-block-table"><table><thead><tr><th>Tool</th><th>Type</th><th>Primary Strength</th></tr></thead><tbody><tr><td><strong>Jenkins</strong></td><td>Open source, self-hosted</td><td>Massive plugin ecosystem; highly customizable; industry standard for on-prem CI</td></tr><tr><td><strong>TeamCity</strong></td><td>Commercial (JetBrains), self-hosted or cloud</td><td>Strong IDE integration, build chain management, free tier available</td></tr><tr><td><strong>CircleCI</strong></td><td>SaaS / self-hosted</td><td>Fast configuration, Docker-native, strong GitHub/Bitbucket integration</td></tr><tr><td><strong>Bamboo</strong></td><td>Commercial (Atlassian), self-hosted</td><td>Deep Jira and Bitbucket integration; suits Atlassian-heavy shops</td></tr><tr><td><strong>Ansible</strong></td><td>Open source (Red Hat)</td><td>Configuration management and deployment automation; often paired with a CI tool rather than used as a standalone build server</td></tr><tr><td><strong>Microsoft Azure DevOps / TFS</strong></td><td>Commercial (Microsoft)</td><td>End-to-end Azure integration; suited for .NET and Windows workloads</td></tr><tr><td><strong>Apache Maven</strong></td><td>Open source</td><td>Build and dependency management for Java projects; declarative POM-based configuration</td></tr><tr><td><strong>Azure Automation</strong></td><td>Cloud (Microsoft)</td><td>Process automation within Azure environments; runbook-based</td></tr><tr><td><strong>Codeship</strong></td><td>SaaS (now part of CloudBees)</td><td>Simple setup, Docker support, parallel pipelines</td></tr><tr><td><strong>Travis CI</strong></td><td>SaaS / open source</td><td>Historically popular for open-source projects on GitHub</td></tr><tr><td><strong>Gradle</strong></td><td>Open source</td><td>Flexible, high-performance build tool for JVM and Android projects</td></tr><tr><td><strong>Chef</strong></td><td>Open source / commercial</td><td>Infrastructure automation and configuration management; used in deployment pipelines</td></tr></tbody></table></figure>



<p class="wp-block-paragraph"><strong>Note on Ansible and Chef:</strong> Both are primarily configuration management and infrastructure automation tools. They appear in build automation market reports because they are frequently integrated into CI/CD pipelines for deployment and environment provisioning steps, not because they replace a dedicated build server.</p>



<h2 class="wp-block-heading">Regional Market Dynamics</h2>



<p class="wp-block-paragraph">Market research covering 2020 identified four primary regions driving build automation software adoption:</p>



<ul class="wp-block-list">
<li><strong>North America:</strong> The largest market by revenue, driven by a high density of technology companies and mature DevOps practices.</li>
<li><strong>Europe:</strong> Strong adoption in financial services, automotive, and manufacturing sectors undergoing digital transformation.</li>
<li><strong>Asia-Pacific (APAC):</strong> The fastest-growing region, with significant investment in software development infrastructure across China, India, Japan, and South Korea.</li>
<li><strong>Rest of World (ROW):</strong> Emerging adoption, particularly in Latin America and the Middle East.</li>
</ul>



<h2 class="wp-block-heading">COVID-19&#8217;s Effect on Build Automation Adoption</h2>



<p class="wp-block-paragraph">The COVID-19 pandemic in 2020 had a measurable effect on DevOps tooling adoption. As organizations rapidly shifted to remote work, the need for reliable, automated pipelines became more acute — teams could no longer rely on informal, in-person coordination to manage build and release processes.</p>



<p class="wp-block-paragraph">Key impacts observed across the industry included:</p>



<ul class="wp-block-list">
<li><strong>Accelerated cloud migration:</strong> Remote teams favored SaaS-based CI/CD tools that required no on-premises infrastructure management.</li>
<li><strong>Increased pipeline reliability requirements:</strong> With distributed teams spanning time zones, fully automated builds and tests became essential rather than optional.</li>
<li><strong>Budget pressure on licensing:</strong> Some organizations shifted toward open-source tools (Jenkins, Gradle, Maven) to reduce costs during economic uncertainty.</li>
<li><strong>Growth for cloud-native vendors:</strong> CircleCI, GitHub Actions, and similar platforms saw increased sign-ups as teams modernized their toolchains rapidly.</li>
</ul>



<h2 class="wp-block-heading">Factors Driving Market Growth</h2>



<ul class="wp-block-list">
<li><strong>DevOps and Agile adoption:</strong> Organizations moving to shorter release cycles need automated build pipelines to keep pace.</li>
<li><strong>Microservices architecture:</strong> More services mean more independent build pipelines, increasing tool usage and licensing.</li>
<li><strong>Container and Kubernetes adoption:</strong> Containerized workloads require build tools that can produce and push container images as a first-class output.</li>
<li><strong>Regulatory requirements:</strong> Industries like finance and healthcare require reproducible, auditable builds — a natural fit for automation.</li>
</ul>



<h2 class="wp-block-heading">Market Restraints</h2>



<ul class="wp-block-list">
<li><strong>Complexity of migration:</strong> Switching from an established tool like Jenkins to a newer platform involves significant pipeline rewriting effort.</li>
<li><strong>Skills gap:</strong> Configuring and maintaining sophisticated build pipelines requires expertise that is not yet ubiquitous.</li>
<li><strong>Security concerns with SaaS tools:</strong> Enterprises with strict data governance policies may be reluctant to send build artifacts and source references through third-party cloud services.</li>
</ul>



<h2 class="wp-block-heading">Choosing the Right Build Automation Tool</h2>



<p class="wp-block-paragraph">There is no single best tool — the right choice depends on your stack, team size, and operational model. A practical decision framework:</p>



<ol class="wp-block-list">
<li><strong>Self-hosted vs. SaaS:</strong> If you need full control over build agents and network isolation, Jenkins or TeamCity on-premises is a safe starting point. If you want to minimize ops overhead, CircleCI or GitHub Actions is easier to start with.</li>
<li><strong>Language and ecosystem:</strong> Maven and Gradle are specifically optimized for JVM projects. For polyglot environments, a general-purpose CI tool is more appropriate.</li>
<li><strong>Existing toolchain:</strong> If you&#8217;re already on the Atlassian stack (Jira, Confluence, Bitbucket), Bamboo integrates tightly. Azure DevOps is the natural choice for Microsoft-centric shops.</li>
<li><strong>Team size and budget:</strong> Jenkins is free but requires maintenance investment. Commercial tools like TeamCity offer support and polish but carry licensing costs at scale.</li>
</ol>



<h2 class="wp-block-heading">Summary</h2>



<p class="wp-block-paragraph">The global build automation software market encompasses a wide range of tools — from open-source build systems like Maven and Gradle to full CI/CD platforms like Jenkins, CircleCI, and Azure DevOps. Market research from 2020 pointed to strong projected growth, accelerated by cloud adoption and the operational demands of remote-first engineering during the pandemic. For DevOps teams, the strategic choice of build automation tooling has long-term implications for pipeline reliability, developer productivity, and total cost of ownership.</p>



<p class="wp-block-paragraph"><em>Original market summary source: Scientect (2020). Specific growth rate forecasts and revenue figures cited in the original report have not been independently verified and are not reproduced here.</em></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.bestdevops.com/global-build-automation-software-market-2020-know-the-companies-list-could-potentially-benefit-or-loose-out-from-the-impact-of-covid-19-top-companies-jenkins-teamcity-circleci-bamboo-ansible/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>AWS CodeArtifact Is Now Generally Available: What DevOps Teams Need to Know</title>
		<link>https://www.bestdevops.com/amazon-announces-general-availability-of-aws-codeartifact/</link>
					<comments>https://www.bestdevops.com/amazon-announces-general-availability-of-aws-codeartifact/#respond</comments>
		
		<dc:creator><![CDATA[anil]]></dc:creator>
		<pubDate>Thu, 18 Jun 2020 05:13:15 +0000</pubDate>
				<category><![CDATA[AWS]]></category>
		<category><![CDATA[Azure]]></category>
		<category><![CDATA[CI/CD]]></category>
		<category><![CDATA[DevOps]]></category>
		<category><![CDATA[Gradle]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Software-Market]]></category>
		<guid isPermaLink="false">http://www.bestdevops.com/?p=12957</guid>

					<description><![CDATA[Amazon has announced the general availability of AWS CodeArtifact, a fully managed artifact repository service that supports Maven, Gradle, npm, yarn, pip, and twine — with deeper AWS ecosystem integrations than competing registries.]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph"><em>Source: <a href="https://www.infoq.com" rel="noopener">infoq.com</a></em></p>



<h2 class="wp-block-heading">What Is AWS CodeArtifact?</h2>



<p class="wp-block-paragraph">Amazon has announced the general availability (GA) of <strong>AWS CodeArtifact</strong>, a fully managed artifact repository service. The service gives developers and organizations a secure, scalable place to store, publish, and share the software packages used throughout their development, build, and deployment pipelines.</p>



<p class="wp-block-paragraph">Unlike self-hosted solutions such as Nexus or Artifactory, AWS CodeArtifact is a managed service, meaning AWS handles infrastructure provisioning, scaling, and availability. Teams can focus on managing packages rather than maintaining servers.</p>



<h2 class="wp-block-heading">How Repositories and Domains Are Organized</h2>



<p class="wp-block-paragraph">AWS CodeArtifact organizes repositories under a central <strong>domain</strong>. AWS recommends that an organization use a single domain and add multiple repositories within it — for example, one repository per team or per project. Individual repositories can be scoped to specific teams, keeping access boundaries clean while still sharing a common administrative umbrella.</p>



<p class="wp-block-paragraph">Importantly, different package ecosystems can coexist within the same repository. A single repo can hold Maven artifacts alongside npm packages and Python wheels, which reduces the operational overhead of running separate registries for each language stack.</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p>&#8220;CodeArtifact repositories are organized into a domain. We recommend that you use a single domain for your organization, and then add repositories to it. For example, you might choose to use different repositories for different teams. To publish packages into your repositories, or ingest packages from external repositories, you simply use the package manager tools your developers are used to.&#8221;</p><cite>Steve Roberts, Developer Advocate, AWS</cite></blockquote>



<h2 class="wp-block-heading">Supported Package Managers and Build Tools</h2>



<p class="wp-block-paragraph">At general availability, AWS CodeArtifact supports the following package managers and build tools:</p>



<ul class="wp-block-list">
  <li><strong>Java:</strong> Maven and Gradle</li>
  <li><strong>JavaScript / Node.js:</strong> npm and yarn</li>
  <li><strong>Python:</strong> pip and twine</li>
</ul>



<p class="wp-block-paragraph">Developers can use these familiar tools without modification. AWS has indicated that support for additional package formats will be added over time.</p>



<h2 class="wp-block-heading">AWS Service Integrations</h2>



<p class="wp-block-paragraph">One of the key advantages of AWS CodeArtifact over standalone registries is its native integration with other AWS services:</p>



<ul class="wp-block-list">
  <li><strong>AWS Identity and Access Management (IAM):</strong> Fine-grained access control over who can publish, consume, or administer packages and repositories.</li>
  <li><strong>AWS CloudTrail:</strong> Audit logging that provides visibility into which packages are being accessed, published, or deleted — useful for compliance and incident response.</li>
  <li><strong>AWS Key Management Service (KMS):</strong> Control over the encryption keys used to protect package contents at rest.</li>
</ul>



<p class="wp-block-paragraph">These integrations make CodeArtifact a natural fit for organizations already operating within the AWS ecosystem, where centralised identity and audit tooling are already in place.</p>



<h2 class="wp-block-heading">How AWS CodeArtifact Compares to GitHub Package Registry and Azure Artifacts</h2>



<p class="wp-block-paragraph">The managed artifact registry space is competitive. GitHub offers private package repositories through GitHub Package Registry (GPR), and Microsoft provides Azure Artifacts as part of its Azure DevOps platform. Both are mature offerings with large user bases.</p>



<p class="wp-block-paragraph">Charlie Robbins, Senior Director of Engineering, UX Platform at GoDaddy, highlighted a key strategic differentiation at launch:</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p>&#8220;AWS CodeArtifact was surgical in where they differentiated themselves from Github Package Registry by focusing on exactly GPR&#8217;s current shortcomings (e.g. no pypi support, poor support for large corporate npm registries with multiple private &amp; shadowed scopes).&#8221;</p><cite>Charlie Robbins, Senior Director of Engineering, UX Platform, GoDaddy (via Twitter)</cite></blockquote>



<p class="wp-block-paragraph">At the time of GA, GitHub Package Registry lacked PyPI (Python) support and had limited handling of complex npm registry configurations common in large enterprises. AWS CodeArtifact addressed both of these gaps from day one, positioning itself as a more capable drop-in for organizations managing multi-language, multi-team package workflows on AWS.</p>



<h2 class="wp-block-heading">Pricing and Regional Availability</h2>



<p class="wp-block-paragraph">At general availability, AWS CodeArtifact was made available across <strong>10 AWS Regions</strong> globally. The service offers both a free tier and a paid tier:</p>



<ul class="wp-block-list">
  <li><strong>Free tier:</strong> 2 GB of storage and the first 100,000 requests per month at no charge.</li>
  <li><strong>Paid tier:</strong> Storage at <strong>US$0.055 per GB per month</strong> and requests at <strong>US$0.065 per 10,000 requests</strong>.</li>
</ul>



<p class="wp-block-paragraph">For the most current pricing and a full list of supported regions, refer to the <a href="https://aws.amazon.com/codeartifact/pricing/" rel="noopener">official AWS CodeArtifact pricing page</a>.</p>



<h2 class="wp-block-heading">AWS CodeArtifact Overview Video</h2>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" width="675" height="379" src="https://www.youtube.com/embed/?enablejsapi=1&#038;list=PLTCuRW0ikUdMFARYSiWm733n1DcCem6bN&#038;autoplay=0&#038;rel=1&#038;fs=1&#038;controls=1" title="AWS CodeArtifact Overview" allow="fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
</div></figure>



<h2 class="wp-block-heading">Summary</h2>



<p class="wp-block-paragraph">AWS CodeArtifact fills a real gap for DevOps teams running multi-language projects on AWS. Its native IAM, CloudTrail, and KMS integrations reduce the configuration burden compared to standalone registries, while domain-based repository organization scales naturally to large engineering organizations. For teams already standardized on AWS tooling, CodeArtifact is worth evaluating as a replacement for self-hosted Nexus or Artifactory instances, or as a more capable alternative to GitHub Package Registry.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.bestdevops.com/amazon-announces-general-availability-of-aws-codeartifact/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Global Build Automation Software Market: Jenkins, TeamCity, CircleCI, Bamboo, Ansible and Beyond</title>
		<link>https://www.bestdevops.com/global-build-automation-software-market-2020-jenkins-teamcity-circleci-bamboo-ansible/</link>
					<comments>https://www.bestdevops.com/global-build-automation-software-market-2020-jenkins-teamcity-circleci-bamboo-ansible/#respond</comments>
		
		<dc:creator><![CDATA[anil]]></dc:creator>
		<pubDate>Fri, 17 Jan 2020 05:52:07 +0000</pubDate>
				<category><![CDATA[Ansible]]></category>
		<category><![CDATA[Jenkins]]></category>
		<category><![CDATA[Apache Maven]]></category>
		<category><![CDATA[Azure Automation]]></category>
		<category><![CDATA[Bamboo]]></category>
		<category><![CDATA[Chef]]></category>
		<category><![CDATA[CircleCI]]></category>
		<category><![CDATA[Codeship]]></category>
		<category><![CDATA[Gradle]]></category>
		<category><![CDATA[Microsoft Team Foundation Server]]></category>
		<category><![CDATA[TeamCity]]></category>
		<category><![CDATA[Travis CI]]></category>
		<guid isPermaLink="false">http://www.bestdevops.com/?p=10078</guid>

					<description><![CDATA[A technical overview of the global build automation software landscape, covering the major tools—Jenkins, TeamCity, CircleCI, Bamboo, Ansible, Travis CI, and more—along with market segments, deployment models, and what DevOps teams should consider when evaluating these platforms.]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">Build automation is a foundational practice in modern DevOps. Choosing the right tool affects everything from developer velocity to release reliability. This article surveys the major players in the build automation software market, breaks down the key deployment models and enterprise segments, and explains what each tool brings to the table.</p>



<h2 class="wp-block-heading">What Is Build Automation Software?</h2>



<p class="wp-block-paragraph">Build automation software manages the process of compiling source code, running tests, packaging artifacts, and deploying applications—automatically and repeatably. By removing manual steps from the software delivery pipeline, these tools reduce human error, accelerate feedback loops, and make continuous integration and continuous delivery (CI/CD) practical at scale.</p>



<p class="wp-block-paragraph">Organizations of all sizes—from small development teams to global enterprises—depend on build automation to ship software reliably. The market reflects this breadth, with tools ranging from self-hosted open-source platforms to fully managed cloud services.</p>



<h2 class="wp-block-heading">Major Tools and Market Players</h2>



<p class="wp-block-paragraph">The competitive landscape includes a mix of open-source projects, commercial products, and cloud-native SaaS offerings. The key platforms cited in market analyses of this space include:</p>



<ul class="wp-block-list">
<li><strong>Jenkins</strong> – The dominant open-source automation server. Jenkins has a massive plugin ecosystem (thousands of plugins) and a large community. It is self-hosted, highly flexible, but requires significant operational overhead to maintain at scale.</li>
<li><strong>TeamCity</strong> – JetBrains&#8217; commercial CI server. Known for its polished UI, deep IDE integration, and strong support for .NET and JVM ecosystems. Offers a free tier for small teams.</li>
<li><strong>CircleCI</strong> – A cloud-native CI/CD platform that emphasizes speed through parallelism and caching. Popular with teams that prefer a managed service over running their own build infrastructure.</li>
<li><strong>Bamboo</strong> – Atlassian&#8217;s CI/CD server. Integrates tightly with Jira and Bitbucket, making it a natural fit for teams already in the Atlassian ecosystem.</li>
<li><strong>Ansible</strong> – Primarily a configuration management and application deployment tool rather than a build system in the traditional sense. It automates provisioning, orchestration, and deployment tasks using agentless, YAML-based playbooks.</li>
<li><strong>Microsoft Azure DevOps / Team Foundation Server (TFS)</strong> – Microsoft&#8217;s integrated DevOps suite, including Azure Pipelines for CI/CD. Supports both cloud-hosted and self-hosted agents across Windows, Linux, and macOS.</li>
<li><strong>Apache Maven</strong> – A build lifecycle and dependency management tool for Java projects. Often used in combination with a CI server like Jenkins rather than as a standalone automation platform.</li>
<li><strong>Azure Automation</strong> – Microsoft&#8217;s cloud service for process automation, configuration management, and update management within Azure environments.</li>
<li><strong>Codeship</strong> – A cloud-based CI/CD service focused on simplicity and fast setup, available in both a Basic (no configuration files) and Pro (Docker-based) tier.</li>
<li><strong>Travis CI</strong> – One of the first cloud-based CI services to gain wide adoption, particularly in open-source projects hosted on GitHub.</li>
<li><strong>Gradle</strong> – A flexible, high-performance build tool used extensively in Android and JVM projects. Supports incremental builds and build caching to reduce build times.</li>
<li><strong>Chef</strong> – A configuration management platform that uses Ruby-based recipes and cookbooks to automate infrastructure provisioning and application deployment.</li>
</ul>



<h2 class="wp-block-heading">Deployment Models: Cloud-Based vs. Web-Based (Self-Hosted)</h2>



<p class="wp-block-paragraph">Build automation tools generally fall into two deployment categories:</p>



<h3 class="wp-block-heading">Cloud-Based (SaaS)</h3>



<p class="wp-block-paragraph">Platforms like CircleCI, Travis CI, and Codeship manage the underlying build infrastructure for you. Benefits include zero server maintenance, elastic scaling, and fast onboarding. The trade-off is reduced control over the build environment and potential data residency concerns for regulated industries.</p>



<h3 class="wp-block-heading">Self-Hosted / On-Premises</h3>



<p class="wp-block-paragraph">Tools like Jenkins, TeamCity, and Bamboo can be deployed on your own infrastructure. This gives teams full control over hardware, networking, and data. The cost is operational: your team is responsible for installation, upgrades, plugin management, and capacity planning.</p>



<p class="wp-block-paragraph">Many enterprises adopt a hybrid approach—using a cloud-based CI service for open-source or low-sensitivity projects while keeping a self-hosted platform for proprietary or compliance-sensitive workloads.</p>



<h2 class="wp-block-heading">Market Segments by Organization Size</h2>



<p class="wp-block-paragraph">Adoption patterns differ significantly between large enterprises and small-to-medium enterprises (SMEs):</p>



<ul class="wp-block-list">
<li><strong>Large Enterprises</strong> often standardize on a single platform (commonly Jenkins or Azure DevOps) managed by a dedicated platform engineering team. They value enterprise support contracts, audit logging, role-based access control, and integration with existing identity providers (LDAP, Active Directory).</li>
<li><strong>SMEs</strong> tend to favor managed SaaS offerings that minimize operational burden. CircleCI, Travis CI, and GitHub Actions (not listed in the original market report but now a major player) are common choices because teams can get a working pipeline in minutes without managing servers.</li>
</ul>



<h2 class="wp-block-heading">Key Drivers of Build Automation Adoption</h2>



<p class="wp-block-paragraph">Several trends accelerate demand for build automation tooling:</p>



<ul class="wp-block-list">
<li><strong>DevOps and Agile adoption</strong> – Short sprint cycles require fast, reliable feedback on every commit. Manual builds are a bottleneck that automation eliminates.</li>
<li><strong>Microservices architectures</strong> – Decomposing applications into services multiplies the number of independent build pipelines, increasing the value of robust automation tooling.</li>
<li><strong>Container and Kubernetes adoption</strong> – Building and pushing container images is now a standard pipeline step, and all major tools have added Docker and Kubernetes integration.</li>
<li><strong>Security and compliance requirements</strong> – Automated pipelines provide an auditable, reproducible build process, which is increasingly required by compliance frameworks such as SOC 2 and ISO 27001.</li>
<li><strong>Remote and distributed teams</strong> – Cloud-based CI removes the dependency on a shared office network or VPN for running builds.</li>
</ul>



<h2 class="wp-block-heading">Regional Landscape</h2>



<p class="wp-block-paragraph">Build automation software is a genuinely global market. Adoption is strong across all major regions:</p>



<ul class="wp-block-list">
<li><strong>Americas (US, Canada, Mexico, Brazil)</strong> – North America leads in enterprise adoption, driven by mature DevOps practices and a high concentration of software companies and cloud providers.</li>
<li><strong>Asia-Pacific (China, Japan, South Korea, India, Southeast Asia, Australia)</strong> – Rapid growth driven by expanding software industries in India and Southeast Asia, and strong enterprise IT investment in Japan and South Korea.</li>
<li><strong>Europe (Germany, France, UK, Italy, Russia, Spain)</strong> – Strong adoption, with additional emphasis on data sovereignty and on-premises deployments in regulated industries such as banking and healthcare.</li>
<li><strong>Middle East and Africa</strong> – An emerging market with growing cloud infrastructure investment, particularly in GCC countries.</li>
</ul>



<h2 class="wp-block-heading">Choosing a Build Automation Tool: What to Evaluate</h2>



<p class="wp-block-paragraph">No single tool is the right answer for every team. Consider these criteria when evaluating platforms:</p>



<ol class="wp-block-list">
<li><strong>Language and framework support</strong> – Does the tool have first-class support for your stack (JVM, .NET, Python, Go, Node.js, etc.)?</li>
<li><strong>Ecosystem integrations</strong> – Does it integrate with your source control (GitHub, GitLab, Bitbucket), artifact repositories (Nexus, Artifactory), and deployment targets (Kubernetes, AWS, Azure)?</li>
<li><strong>Operational overhead</strong> – Can your team afford to manage build infrastructure, or do you need a managed service?</li>
<li><strong>Scalability</strong> – Can the tool handle your peak build load without queuing delays? Does it support distributed agents or parallel job execution?</li>
<li><strong>Security and access control</strong> – Does it support SSO, RBAC, secret management, and audit logging?</li>
<li><strong>Cost model</strong> – Open-source tools have zero licensing cost but real operational costs. SaaS tools have predictable per-seat or per-minute pricing. Model both total cost of ownership scenarios for your team size.</li>
<li><strong>Community and support</strong> – A large, active community (as Jenkins has) means more plugins, answered Stack Overflow questions, and available expertise. Commercial tools offer paid support with SLAs.</li>
</ol>



<h2 class="wp-block-heading">Summary</h2>



<p class="wp-block-paragraph">The build automation software market is large, competitive, and continuing to grow as DevOps practices mature globally. Jenkins remains the most widely deployed self-hosted platform, while cloud-native tools like CircleCI and GitHub Actions are gaining share among teams that prioritize speed of setup and reduced operational burden. Purpose-built tools like Gradle and Maven fill critical niches in the JVM and Android ecosystems, while configuration management platforms like Ansible and Chef extend automation beyond the build step into provisioning and deployment.</p>



<p class="wp-block-paragraph">The right choice depends on your team&#8217;s size, technology stack, compliance requirements, and willingness to invest in platform operations. Evaluating tools against the criteria above—rather than following market share alone—will lead to a better long-term fit.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.bestdevops.com/global-build-automation-software-market-2020-jenkins-teamcity-circleci-bamboo-ansible/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Build Automation Software in 2025 and Beyond: Jenkins, TeamCity, CircleCI, Bamboo, Ansible and the Competitive Landscape</title>
		<link>https://www.bestdevops.com/build-automation-software-market-innovative-strategy-by-2025-jenkins-teamcity-circleci-bamboo-ansible/</link>
					<comments>https://www.bestdevops.com/build-automation-software-market-innovative-strategy-by-2025-jenkins-teamcity-circleci-bamboo-ansible/#respond</comments>
		
		<dc:creator><![CDATA[anil]]></dc:creator>
		<pubDate>Fri, 20 Sep 2019 06:43:07 +0000</pubDate>
				<category><![CDATA[Ansible]]></category>
		<category><![CDATA[Bamboo]]></category>
		<category><![CDATA[Jenkins]]></category>
		<category><![CDATA[Teamcity]]></category>
		<category><![CDATA[Chef]]></category>
		<category><![CDATA[CircleCI]]></category>
		<category><![CDATA[Gradle]]></category>
		<category><![CDATA[Maven]]></category>
		<category><![CDATA[TeamCity]]></category>
		<guid isPermaLink="false">http://www.bestdevops.com/?p=7915</guid>

					<description><![CDATA[A practical guide to the build automation software market — covering key tools, deployment models, enterprise use cases, and the competitive dynamics shaping CI/CD pipelines today.]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph"><em>This article provides an independent technical overview of the build automation software landscape. The original post summarised a third-party market research report from scoopjunction.com / Stats and Reports; that report is a paid commercial product and specific figures from it have not been independently verified.</em></p>



<h2 class="wp-block-heading">What Is Build Automation Software?</h2>



<p class="wp-block-paragraph">Build automation software handles the process of compiling source code, running tests, packaging artefacts and triggering deployments — automatically and repeatably. Rather than relying on a developer to execute a sequence of manual steps, a build automation tool encodes that sequence as a pipeline or script that runs on every code change. This is the foundation of modern Continuous Integration and Continuous Delivery (CI/CD) practice.</p>



<p class="wp-block-paragraph">Build automation tools vary widely in scope. Some focus purely on compiling and testing (Maven, Gradle), while others orchestrate entire delivery pipelines across multiple environments (Jenkins, TeamCity, CircleCI). Configuration management tools such as Ansible and Chef are often included in market surveys because they automate the environment provisioning that surrounds a build.</p>



<h2 class="wp-block-heading">Key Tools in the Market</h2>



<p class="wp-block-paragraph">The following tools are widely referenced in enterprise CI/CD discussions. Each occupies a slightly different position in the build and delivery pipeline.</p>



<h3 class="wp-block-heading">Jenkins</h3>



<p class="wp-block-paragraph">Jenkins is the most widely deployed open-source CI/CD server. Its plugin ecosystem (1,800+ plugins) allows it to integrate with almost any tool in the software delivery chain. Jenkins supports both declarative and scripted pipelines via Jenkinsfile, and it can be hosted on-premises or in a cloud VM. The trade-off is operational overhead: maintaining a Jenkins instance, its plugins and its agents requires dedicated effort.</p>



<h3 class="wp-block-heading">TeamCity</h3>



<p class="wp-block-paragraph">JetBrains TeamCity is a commercial CI server with a generous free tier. It offers strong .NET and JVM ecosystem support, first-class build chain visualisation and deep integration with JetBrains IDEs. TeamCity is popular in organisations already using IntelliJ IDEA or the JetBrains toolchain.</p>



<h3 class="wp-block-heading">CircleCI</h3>



<p class="wp-block-paragraph">CircleCI is a cloud-native CI/CD platform configured via a YAML file (<code>.circleci/config.yml</code>). It emphasises fast pipeline execution through parallelism, Docker layer caching and resource class selection. CircleCI also offers a self-hosted runner option for organisations with data-residency requirements.</p>



<h3 class="wp-block-heading">Bamboo</h3>



<p class="wp-block-paragraph">Atlassian Bamboo is a CI/CD server that integrates natively with Jira and Bitbucket. It suits teams already invested in the Atlassian ecosystem. Bamboo supports both on-premises deployment and, more recently, cloud-based options through Atlassian&#8217;s hosted offerings.</p>



<h3 class="wp-block-heading">Ansible</h3>



<p class="wp-block-paragraph">Ansible (Red Hat) is primarily an agentless configuration management and application deployment tool. It uses YAML playbooks to define infrastructure state and application deployment steps. While not a CI server itself, Ansible is commonly invoked as a deployment step within Jenkins, CircleCI or Azure Pipelines pipelines.</p>



<h3 class="wp-block-heading">Azure Pipelines (formerly Team Foundation Server)</h3>



<p class="wp-block-paragraph">Microsoft&#8217;s Azure DevOps suite includes Azure Pipelines, which supports YAML-based pipelines, multi-stage deployments and integration with GitHub. Microsoft Team Foundation Server (TFS) was the on-premises predecessor; many enterprises are migrating TFS pipelines to Azure DevOps or GitHub Actions.</p>



<h3 class="wp-block-heading">Apache Maven and Gradle</h3>



<p class="wp-block-paragraph">Maven and Gradle are build tools rather than CI servers. Maven uses an XML-based <code>pom.xml</code> to declare project structure and dependencies; Gradle uses a Groovy or Kotlin DSL for a more flexible, incremental build model. Both are typically invoked <em>by</em> a CI server (Jenkins, CircleCI, GitHub Actions) rather than replacing it.</p>



<h3 class="wp-block-heading">Travis CI and Codeship</h3>



<p class="wp-block-paragraph">Travis CI was one of the first cloud CI services to achieve wide adoption for open-source projects via GitHub integration. Codeship (now part of CloudBees) offers both a simple hosted CI product and a more configurable pro tier. Both remain in active use, though competitive pressure from GitHub Actions and CircleCI has reshaped their market position.</p>



<h3 class="wp-block-heading">Chef</h3>



<p class="wp-block-paragraph">Chef Infra is a Ruby-based configuration management platform that enforces desired infrastructure state using cookbooks and recipes. Like Ansible, it appears in build automation market surveys because it automates environment setup that underpins repeatable builds and deployments.</p>



<h2 class="wp-block-heading">Deployment Models: Cloud-Based vs. Self-Hosted</h2>



<p class="wp-block-paragraph">Build automation tools are available in two broad deployment models, and most vendors now support both:</p>



<ul class="wp-block-list">
<li><strong>Cloud-based (SaaS):</strong> The vendor manages the infrastructure. Build agents are provisioned on demand. Examples include CircleCI Cloud, Travis CI, Codeship and GitHub Actions. The main advantages are zero infrastructure management, elastic capacity and fast onboarding. The trade-offs are data egress costs, compliance constraints and less control over the build environment.</li>
<li><strong>Self-hosted / on-premises:</strong> The organisation runs the CI server on its own infrastructure or a private cloud tenant. Examples include Jenkins, TeamCity (on-premises licence), Bamboo Server and GitLab Runner on self-managed GitLab. This model suits regulated industries (financial services, healthcare, government) where source code and artefacts must not leave a private network.</li>
</ul>



<h2 class="wp-block-heading">Enterprise vs. SME Adoption Patterns</h2>



<p class="wp-block-paragraph">Build automation tooling is used across organisations of all sizes, but adoption patterns differ:</p>



<ul class="wp-block-list">
<li><strong>Large enterprises</strong> typically favour tools with strong access control, audit logging, LDAP/SSO integration and support contracts. Jenkins (with the CloudBees distribution), TeamCity and Azure Pipelines are common choices. Enterprises also tend to run hybrid models — a self-hosted CI server triggering deployments to both on-premises and cloud environments.</li>
<li><strong>SMEs and startups</strong> generally prefer low-operational-overhead SaaS products. GitHub Actions, CircleCI and Travis CI are popular because they require no server maintenance and offer generous free tiers for public repositories. Cost predictability is a key concern as pipeline minutes scale with team size.</li>
</ul>



<h2 class="wp-block-heading">Competitive and Strategic Dynamics</h2>



<p class="wp-block-paragraph">Several macro-level forces are reshaping the build automation market:</p>



<h3 class="wp-block-heading">Platform consolidation</h3>



<p class="wp-block-paragraph">GitHub Actions (launched 2018, GA 2019) dramatically changed competitive dynamics by embedding CI/CD directly into the world&#8217;s largest source code host. Teams that previously used a separate CI service can now define pipelines in the same repository without an additional account or integration. GitLab CI/CD performs the same consolidation within the GitLab platform.</p>



<h3 class="wp-block-heading">Containerisation and ephemeral build environments</h3>



<p class="wp-block-paragraph">Docker and Kubernetes have become de facto infrastructure for build agents. Running each build job in a fresh container eliminates environment drift and improves reproducibility. All major CI platforms now support Docker-based build environments, and Kubernetes-native CI tools (Tekton, Argo Workflows) are gaining traction in cloud-native organisations.</p>



<h3 class="wp-block-heading">Security and supply-chain concerns</h3>



<p class="wp-block-paragraph">High-profile software supply chain attacks have raised scrutiny of CI/CD pipelines as an attack surface. Features such as secret scanning, signed artefacts, SBOM generation and pipeline-as-code (so changes are code-reviewed) are increasingly table-stakes requirements rather than differentiators.</p>



<h3 class="wp-block-heading">Developer experience</h3>



<p class="wp-block-paragraph">Teams are evaluating CI tools partly on the quality of the local development experience — how easy it is to run a pipeline locally before pushing to the remote server. Tools with good local runners (Act for GitHub Actions, the CircleCI CLI) reduce the feedback loop and developer frustration.</p>



<h2 class="wp-block-heading">Choosing a Build Automation Tool: Key Evaluation Criteria</h2>



<p class="wp-block-paragraph">When evaluating build automation tools for your organisation, consider the following dimensions:</p>



<ol class="wp-block-list">
<li><strong>Pipeline-as-code support:</strong> Can pipeline definitions live in version control alongside application code?</li>
<li><strong>Integration ecosystem:</strong> Does the tool integrate natively with your source control host, artefact registry, deployment targets and ticketing system?</li>
<li><strong>Scalability model:</strong> How does the tool scale build agent capacity — static agents, cloud auto-scaling, or Kubernetes pods?</li>
<li><strong>Security controls:</strong> Does it support role-based access, secrets management, audit logging and signed artefacts?</li>
<li><strong>Operational overhead:</strong> Who is responsible for patching, upgrading and monitoring the CI infrastructure?</li>
<li><strong>Cost model:</strong> Is pricing based on concurrent pipelines, build minutes, seats or a flat licence fee? How does cost scale with your projected usage?</li>
<li><strong>Compliance requirements:</strong> Do data residency or regulatory constraints rule out SaaS options?</li>
</ol>



<h2 class="wp-block-heading">Summary</h2>



<p class="wp-block-paragraph">The build automation software market encompasses a broad set of tools — from build systems like Maven and Gradle, through CI servers like Jenkins, TeamCity and Bamboo, to cloud-native platforms like CircleCI and GitHub Actions, and infrastructure automation tools like Ansible and Chef. No single tool is universally correct. The right choice depends on your team&#8217;s size, existing toolchain, compliance posture and appetite for infrastructure management.</p>



<p class="wp-block-paragraph">The clearest trend across the market is the shift toward pipeline-as-code, ephemeral container-based build environments and tighter integration between source control and CI/CD — driven by both developer productivity goals and software supply chain security requirements.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.bestdevops.com/build-automation-software-market-innovative-strategy-by-2025-jenkins-teamcity-circleci-bamboo-ansible/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Build Automation Software Market: Key Players, Segments, and What DevOps Teams Should Know</title>
		<link>https://www.bestdevops.com/technology-build-automation-software-market-analysis/</link>
					<comments>https://www.bestdevops.com/technology-build-automation-software-market-analysis/#respond</comments>
		
		<dc:creator><![CDATA[anil]]></dc:creator>
		<pubDate>Mon, 01 Jul 2019 05:23:23 +0000</pubDate>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Azure Automation]]></category>
		<category><![CDATA[Chef & More.]]></category>
		<category><![CDATA[Codeship]]></category>
		<category><![CDATA[Gradle]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Travis CI]]></category>
		<guid isPermaLink="false">http://www.bestdevops.com/?p=5767</guid>

					<description><![CDATA[An overview of the build automation software market landscape, covering leading tools like Jenkins, CircleCI, and Gradle, market segments, deployment models, and the factors driving adoption across enterprise and SME environments.]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph"><em>Note: This article is an independent editorial overview of the build automation software market, informed by publicly available information about the tools and segments discussed. It is not a reproduction or endorsement of any specific market research report.</em></p>



<h2 class="wp-block-heading">What Is Build Automation Software?</h2>



<p class="wp-block-paragraph">Build automation software automates the process of compiling source code, running tests, packaging binaries, and deploying applications. For DevOps teams, it is a foundational layer of any CI/CD pipeline, eliminating manual steps that introduce errors and slow down delivery cycles.</p>



<p class="wp-block-paragraph">The market for these tools spans a wide range of products — from open-source build systems like Apache Maven and Gradle to hosted CI/CD platforms like CircleCI and Travis CI, and configuration management tools like Ansible and Chef that extend into build orchestration.</p>



<h2 class="wp-block-heading">Key Players in the Build Automation Software Market</h2>



<p class="wp-block-paragraph">The competitive landscape includes tools that serve different parts of the build and delivery workflow. The following are widely recognized names in this space:</p>



<ul class="wp-block-list">
<li><strong>Jenkins</strong> — The dominant open-source CI server with a large plugin ecosystem. Self-hosted and highly extensible.</li>
<li><strong>TeamCity</strong> — JetBrains&#8217; commercial CI/CD server, popular in Java and .NET shops for its out-of-the-box feature set.</li>
<li><strong>CircleCI</strong> — A cloud-native CI/CD platform known for fast pipeline execution and container-first workflows.</li>
<li><strong>Bamboo</strong> — Atlassian&#8217;s CI/CD server, tightly integrated with Jira and Bitbucket.</li>
<li><strong>Ansible</strong> — Primarily a configuration management and orchestration tool, but widely used to automate build and deployment tasks.</li>
<li><strong>Microsoft Azure DevOps (formerly Team Foundation Server)</strong> — Microsoft&#8217;s end-to-end DevOps platform with integrated pipelines, repos, and work tracking.</li>
<li><strong>Apache Maven</strong> — A build lifecycle and dependency management tool predominantly used in Java ecosystems.</li>
<li><strong>Azure Automation</strong> — Microsoft&#8217;s cloud-based process automation service, used for runbook and infrastructure automation.</li>
<li><strong>Codeship</strong> — A hosted CI/CD platform focused on simplicity, acquired by CloudBees.</li>
<li><strong>Travis CI</strong> — One of the earliest hosted CI platforms, widely used in open-source projects on GitHub.</li>
<li><strong>Gradle</strong> — A flexible, high-performance build tool popular for Android and JVM projects, and increasingly adopted as a polyglot build system.</li>
<li><strong>Chef</strong> — An infrastructure-as-code platform that automates configuration and deployment, often used alongside CI pipelines.</li>
</ul>



<p class="wp-block-paragraph">These tools are not always direct competitors — many DevOps teams use them in combination. For example, Gradle handles the build, Jenkins orchestrates the pipeline, and Ansible manages deployment targets.</p>



<h2 class="wp-block-heading">Market Segments: Deployment Models</h2>



<p class="wp-block-paragraph">Build automation software is available in two primary deployment models:</p>



<h3 class="wp-block-heading">Cloud-Based</h3>



<p class="wp-block-paragraph">Hosted SaaS platforms such as CircleCI, Travis CI, and Codeship remove the operational burden of maintaining build infrastructure. Teams get immediate scalability, managed updates, and consumption-based pricing. This model is particularly attractive for startups, small teams, and open-source projects.</p>



<h3 class="wp-block-heading">Web-Based / Self-Hosted</h3>



<p class="wp-block-paragraph">Self-hosted solutions like Jenkins and TeamCity give organizations full control over their build environments, data residency, and integration with on-premises infrastructure. They typically require more operational investment but offer greater customization and are preferred in regulated industries or air-gapped environments.</p>



<h2 class="wp-block-heading">Industry Segmentation: Enterprise vs. SME</h2>



<p class="wp-block-paragraph">Demand for build automation exists across organization sizes, but the requirements differ significantly:</p>



<ul class="wp-block-list">
<li><strong>Large Enterprises</strong> need scalability across hundreds of teams, role-based access control, audit logging, compliance integrations, and support SLAs. Platforms like Azure DevOps, TeamCity Enterprise, and CloudBees (Jenkins-based) target this segment.</li>
<li><strong>Small and Medium Enterprises (SMEs)</strong> prioritize low setup overhead, predictable pricing, and fast time-to-value. Hosted platforms with generous free tiers — such as GitHub Actions, CircleCI, and GitLab CI — are commonly adopted here.</li>
</ul>



<h2 class="wp-block-heading">Geographic Distribution of Demand</h2>



<p class="wp-block-paragraph">Adoption of build automation tools is global, with demand concentrated in regions with mature software development ecosystems:</p>



<ul class="wp-block-list">
<li><strong>North America</strong> (United States, Canada) — Historically the largest market, driven by technology industry density and early DevOps adoption.</li>
<li><strong>Europe</strong> (Germany, UK, France, Italy) — Strong enterprise demand, particularly in financial services, automotive software, and manufacturing.</li>
<li><strong>Asia-Pacific</strong> (China, Japan, India, South Korea) — Fast-growing adoption driven by expanding software outsourcing industries and digital transformation initiatives.</li>
<li><strong>Middle East, Africa, and GCC</strong> — Emerging markets with growing investment in cloud infrastructure and government digitization programs.</li>
</ul>



<h2 class="wp-block-heading">What&#8217;s Driving Growth in This Market?</h2>



<p class="wp-block-paragraph">Several structural trends are increasing demand for build automation software:</p>



<ul class="wp-block-list">
<li><strong>Adoption of DevOps and CI/CD practices</strong> — Organizations are investing in faster, more reliable software delivery pipelines, and build automation is a prerequisite.</li>
<li><strong>Shift to microservices and containers</strong> — More deployable artifacts mean more build jobs. Container-native build pipelines have become a standard requirement.</li>
<li><strong>Cloud migration</strong> — Moving workloads to cloud platforms naturally pushes teams toward cloud-hosted CI/CD services.</li>
<li><strong>Developer experience focus</strong> — Engineering productivity is increasingly treated as a business metric, and slow or unreliable builds are seen as a direct cost.</li>
<li><strong>Security and compliance requirements</strong> — Automated build pipelines enable consistent enforcement of security scanning, SBOM generation, and audit trails.</li>
</ul>



<h2 class="wp-block-heading">Choosing a Build Automation Tool: Practical Considerations</h2>



<p class="wp-block-paragraph">When evaluating build automation software, DevOps teams should weigh the following factors:</p>



<ul class="wp-block-list">
<li><strong>Language and ecosystem support</strong> — Maven and Gradle are JVM-centric; MSBuild is .NET-focused; most CI platforms are language-agnostic at the pipeline level.</li>
<li><strong>Pipeline-as-code</strong> — Look for tools that define pipelines in version-controlled files (Jenkinsfile, .circleci/config.yml, .gitlab-ci.yml) rather than UI-only configuration.</li>
<li><strong>Integration with SCM and artifact repositories</strong> — Native integrations with GitHub, GitLab, Bitbucket, Nexus, or Artifactory reduce configuration overhead.</li>
<li><strong>Scalability</strong> — Consider whether the tool supports distributed agents, ephemeral build workers, or container-based execution to handle peak load.</li>
<li><strong>Total cost of ownership</strong> — Factor in licensing, infrastructure, and the engineering time required to maintain the platform, not just the headline price.</li>
</ul>



<h2 class="wp-block-heading">Summary</h2>



<p class="wp-block-paragraph">The build automation software market encompasses a broad set of tools — from low-level build systems like Maven and Gradle to full CI/CD orchestration platforms like Jenkins, CircleCI, and Azure DevOps. Deployment options range from fully managed SaaS to self-hosted installations, with demand spanning small development teams through large regulated enterprises. Continued growth in DevOps adoption, cloud migration, and software delivery velocity requirements makes build automation a central investment area for engineering organizations of all sizes.</p>



<p class="wp-block-paragraph">For teams evaluating options, the right choice depends on language ecosystem, existing toolchain integrations, compliance requirements, and the balance between operational control and convenience.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.bestdevops.com/technology-build-automation-software-market-analysis/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Update a Library Version in Android build.gradle</title>
		<link>https://www.bestdevops.com/android-make-new-version-for-build-gradle/</link>
					<comments>https://www.bestdevops.com/android-make-new-version-for-build-gradle/#respond</comments>
		
		<dc:creator><![CDATA[anil]]></dc:creator>
		<pubDate>Thu, 13 Jul 2017 07:59:49 +0000</pubDate>
				<category><![CDATA[DevOps]]></category>
		<category><![CDATA[DevOps Tools]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[build.gradle]]></category>
		<category><![CDATA[Fork]]></category>
		<category><![CDATA[GitHub]]></category>
		<category><![CDATA[Gradle]]></category>
		<guid isPermaLink="false">http://www.bestdevops.com/?p=2093</guid>

					<description><![CDATA[Learn how to fork an Android library from GitHub, increment its version, and update the dependency reference in your app's build.gradle file.]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">When you fork an Android library from GitHub, make changes, and want to consume that updated library in another project, you need to understand how Gradle versioning works. This guide walks through the process of incrementing a library version and updating the corresponding dependency declaration in your app&#8217;s <code>build.gradle</code> file.</p>



<h2 class="wp-block-heading">The Problem</h2>



<p class="wp-block-paragraph">A common scenario: you&#8217;ve forked an Android library project on GitHub, cloned it locally (for example via SourceTree), made your own changes, and now want to reference your updated version from another app using Gradle. You need to bump the version so Gradle can distinguish your build from the original.</p>



<p class="wp-block-paragraph">For example, you might want to move from:</p>


<pre class="wp-block-code"><span><code class="hljs language-javascript">implementation <span class="hljs-string">'com.github.lib:library-name:0.3.1'</span></code></span></pre>


<p class="wp-block-paragraph">…to your newly versioned build:</p>


<pre class="wp-block-code"><span><code class="hljs language-javascript">implementation <span class="hljs-string">'com.github.lib:library-name:0.3.2'</span></code></span></pre>


<h2 class="wp-block-heading">Step 1: Update the Version in the Library&#8217;s build.gradle</h2>



<p class="wp-block-paragraph">Open the library module&#8217;s <code>build.gradle</code> file (not the app module — the library module itself). Look for the version declaration. Depending on how the library is set up, you will find something like one of the following patterns:</p>


<pre class="wp-block-code"><span><code class="hljs language-javascript"><span class="hljs-comment">// In the library's build.gradle</span>
group    = <span class="hljs-string">'com.github.lib'</span>
version  = <span class="hljs-string">'0.3.1'</span>

<span class="hljs-comment">// Or inside android {} block:</span>
defaultConfig {
    versionName <span class="hljs-string">"0.3.1"</span>
    versionCode <span class="hljs-number">1</span>
}</code></span></pre>


<p class="wp-block-paragraph">Increment the version to reflect your changes. Following <a href="https://semver.org/" rel="noopener">semantic versioning</a>, a patch-level fix increments the third number:</p>


<pre class="wp-block-code"><span><code class="hljs language-javascript">group    = <span class="hljs-string">'com.github.lib'</span>
version  = <span class="hljs-string">'0.3.2'</span></code></span></pre>


<h2 class="wp-block-heading">Step 2: Publish or Reference Your Updated Library</h2>



<p class="wp-block-paragraph">After incrementing the version, you have several options to make the library available to your other project:</p>



<ul class="wp-block-list">
<li><strong>Publish to a local Maven repository</strong> — Run <code>./gradlew publishToMavenLocal</code> in the library project. Your updated artifact will be available in your local <code>~/.m2</code> repository.</li>
<li><strong>Publish to JitPack</strong> — If your fork is pushed to GitHub, JitPack can serve it as a dependency directly from your repository. Tag a release and reference it using the JitPack coordinates.</li>
<li><strong>Use a local file dependency</strong> — Reference the generated <code>.aar</code> or <code>.jar</code> file directly as a local module dependency without publishing to any repository.</li>
</ul>



<h2 class="wp-block-heading">Step 3: Update the Dependency in Your App&#8217;s build.gradle</h2>



<p class="wp-block-paragraph">Open your consuming app&#8217;s <code>build.gradle</code> (Module: app) and find the <code>dependencies</code> block. Update the version string to match the new version you declared in the library:</p>


<pre class="wp-block-code"><span><code class="hljs language-javascript">dependencies {
    <span class="hljs-comment">// Old version</span>
    <span class="hljs-comment">// implementation 'com.github.lib:library-name:0.3.1'</span>

    <span class="hljs-comment">// Updated to your new version</span>
    implementation <span class="hljs-string">'com.github.lib:library-name:0.3.2'</span>
}</code></span></pre>


<p class="wp-block-paragraph">After editing the file, click <strong>Sync Now</strong> in Android Studio (or run <code>./gradlew build</code> from the command line) to pull in the updated dependency.</p>



<h2 class="wp-block-heading">Note on the compile Directive</h2>



<p class="wp-block-paragraph">The original question used <code>compile</code>, which was the standard dependency configuration in older versions of the Android Gradle plugin. Since Android Gradle Plugin 3.0, <code>compile</code> has been deprecated and replaced with <code>implementation</code> (or <code>api</code> for transitive exposure). Use <code>implementation</code> in modern projects:</p>


<pre class="wp-block-code"><span><code class="hljs language-javascript"><span class="hljs-comment">// Deprecated (AGP &lt; 3.0)</span>
compile <span class="hljs-string">'com.github.lib:library-name:0.3.2'</span>

<span class="hljs-comment">// Correct for AGP 3.0+</span>
implementation <span class="hljs-string">'com.github.lib:library-name:0.3.2'</span></code></span></pre>


<h2 class="wp-block-heading">Quick Reference: Version Bump Checklist</h2>



<ol class="wp-block-list">
<li>Make your code changes in the forked library project.</li>
<li>Increment the <code>version</code> (and optionally <code>versionCode</code> / <code>versionName</code>) in the library&#8217;s <code>build.gradle</code>.</li>
<li>Build and publish the library (local Maven, JitPack, or file dependency).</li>
<li>Update the version string in your app&#8217;s <code>build.gradle</code> dependencies block.</li>
<li>Sync Gradle and verify the build succeeds.</li>
</ol>



<p class="wp-block-paragraph"><em>Original question sourced from <strong>stackoverflow.com</strong>.</em></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.bestdevops.com/android-make-new-version-for-build-gradle/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Use Gradle&#8217;s &#8216;provided&#8217; Scope for External JAR Files in NativeScript Android Plugins</title>
		<link>https://www.bestdevops.com/gradle-compiles-provided-jar-files/</link>
					<comments>https://www.bestdevops.com/gradle-compiles-provided-jar-files/#respond</comments>
		
		<dc:creator><![CDATA[anil]]></dc:creator>
		<pubDate>Thu, 13 Jul 2017 07:55:41 +0000</pubDate>
				<category><![CDATA[DevOps]]></category>
		<category><![CDATA[DevOps Tools]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[BestDevOps]]></category>
		<category><![CDATA[Gradle]]></category>
		<category><![CDATA[gradle file]]></category>
		<category><![CDATA[jar files]]></category>
		<guid isPermaLink="false">http://www.bestdevops.com/?p=2090</guid>

					<description><![CDATA[Learn how to correctly configure Gradle dependencies when adding a 'provided' JAR file—such as the Zebra EMDK—to a NativeScript Android plugin, and understand why classes get skipped during the build metadata step.]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph"><strong>Source:</strong> <a href="https://discourse.nativescript.org" rel="noopener">discourse.nativescript.org</a></p>



<h2 class="wp-block-heading">Background</h2>



<p class="wp-block-paragraph">The Zebra EMDK (Enterprise Mobility Development Kit) ships its own Android SDK as a JAR rather than being available through Maven Central or the Google Maven repository. When writing a NativeScript Android plugin that wraps EMDK functionality, you must add this external JAR as a compile-time-only (<code>provided</code>) dependency so that the device&#8217;s on-device EMDK library is used at runtime, rather than bundling a duplicate copy into the APK.</p>



<h2 class="wp-block-heading">The Problem: &#8216;provided&#8217; JAR Classes Being Skipped</h2>



<p class="wp-block-paragraph">After placing <code>com.symbol.emdk.jar</code> inside the plugin&#8217;s <code>libs/</code> directory and adding the following configuration to <code>include.gradle</code>:</p>


<pre class="wp-block-code"><span><code class="hljs language-php">dependencies {
  provided files(<span class="hljs-string">'libs/com.symbol.emdk.jar'</span>)
  compile fileTree(exclude: &#91;<span class="hljs-string">'libs/com.symbol.emdk.jar'</span>], <span class="hljs-keyword">include</span>: &#91;<span class="hljs-string">'*.jar'</span>], dir: <span class="hljs-string">'libs'</span>)
}</code></span></pre>


<p class="wp-block-paragraph">Running <code>tns run android</code> triggers the <code>:buildMetadata</code> Gradle task, which processes all JAR files to generate TypeScript metadata for NativeScript. During this step, the EMDK classes are not skipped as expected—instead, they are included in metadata generation and produce a stream of <code>NullPointerException</code> errors:</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p>:buildMetadata<br>Skip com.symbol.emdk.simulscan.SimulScanConfig<br>Error: java.lang.NullPointerException<br>Skip com.symbol.emdk.simulscan.SimulScanManager<br>Error: java.lang.NullPointerException<br>Skip com.symbol.emdk.simulscan.SimulScanMultiTemplate<br>Error: java.lang.NullPointerException<br>Skip com.symbol.emdk.simulscan.SimulScanReader<br>Error: java.lang.NullPointerException<br>Skip com.symbol.emdk.simulscan.SimulScanReaderInfo<br>Error: java.lang.NullPointerException</p>
</blockquote>



<p class="wp-block-paragraph">Because the metadata for these classes is incomplete or corrupted, the app crashes at runtime whenever any EMDK API is called.</p>



<h2 class="wp-block-heading">Why This Happens</h2>



<p class="wp-block-paragraph">The NativeScript Android runtime uses a custom Gradle task (<code>buildMetadata</code>) to reflect over every JAR on the compile classpath and generate JavaScript-accessible metadata. The <code>provided</code> configuration in Gradle is intended to mark a dependency as available at compile time but absent from the final APK—similar to Maven&#8217;s <code>provided</code> scope or the <code>compileOnly</code> configuration introduced in later Gradle versions.</p>



<p class="wp-block-paragraph">However, the NativeScript build toolchain may still enumerate JARs in the <code>provided</code> configuration when building metadata. If the JAR contains classes that reference other classes not present on the classpath (common with vendor SDKs like EMDK), the reflection step throws <code>NullPointerException</code> errors and silently skips those classes. The result is incomplete metadata and a broken runtime API surface.</p>



<h2 class="wp-block-heading">Key Concepts: &#8216;provided&#8217; vs &#8216;compileOnly&#8217; vs &#8216;compile&#8217;</h2>



<figure class="wp-block-table"><table><thead><tr><th>Configuration</th><th>Available at compile time</th><th>Packaged in APK</th><th>Notes</th></tr></thead><tbody><tr><td><code>compile</code></td><td>Yes</td><td>Yes</td><td>Deprecated in Gradle 3.x+; replaced by <code>implementation</code></td></tr><tr><td><code>provided</code></td><td>Yes</td><td>No</td><td>Legacy; replaced by <code>compileOnly</code> in Gradle 2.12+</td></tr><tr><td><code>compileOnly</code></td><td>Yes</td><td>No</td><td>Preferred modern equivalent of <code>provided</code></td></tr><tr><td><code>implementation</code></td><td>Yes</td><td>Yes</td><td>Preferred modern equivalent of <code>compile</code></td></tr></tbody></table></figure>



<p class="wp-block-paragraph">For Android system-level SDKs like Zebra EMDK—where the real implementation lives on the device and your app should not bundle its own copy—<code>compileOnly</code> (or the legacy <code>provided</code>) is the correct scope.</p>



<h2 class="wp-block-heading">Recommended Approaches</h2>



<h3 class="wp-block-heading">1. Use compileOnly Instead of provided</h3>



<p class="wp-block-paragraph">If your NativeScript and Gradle versions support it, replace <code>provided</code> with <code>compileOnly</code>:</p>


<pre class="wp-block-code"><span><code class="hljs language-php">dependencies {
  compileOnly files(<span class="hljs-string">'libs/com.symbol.emdk.jar'</span>)
  implementation fileTree(exclude: &#91;<span class="hljs-string">'com.symbol.emdk.jar'</span>], <span class="hljs-keyword">include</span>: &#91;<span class="hljs-string">'*.jar'</span>], dir: <span class="hljs-string">'libs'</span>)
}</code></span></pre>


<h3 class="wp-block-heading">2. Exclude the JAR from the buildMetadata Task</h3>



<p class="wp-block-paragraph">If the NativeScript build toolchain still picks up the EMDK JAR during metadata generation and produces errors, you may need to explicitly exclude it from that task. Check the NativeScript plugin documentation or the project&#8217;s Gradle build scripts for a supported exclusion mechanism, such as an <code>exclusions</code> list in <code>include.gradle</code> or a project-level configuration option.</p>



<h3 class="wp-block-heading">3. Verify the JAR&#8217;s Classpath Dependencies</h3>



<p class="wp-block-paragraph">The <code>NullPointerException</code> errors during reflection often indicate that the EMDK JAR references classes from the Android platform SDK or from other Zebra libraries that are not on the metadata-generation classpath. Ensure that the full Android SDK is available during the build, and check whether Zebra provides additional companion JARs that should also be on the <code>compileOnly</code> classpath (without being packaged into the APK).</p>



<h2 class="wp-block-heading">Summary</h2>



<p class="wp-block-paragraph">When integrating a vendor-provided Android SDK JAR—such as the Zebra EMDK—into a NativeScript plugin, use the <code>compileOnly</code> (or legacy <code>provided</code>) Gradle configuration to keep the JAR off the final APK. If the NativeScript <code>:buildMetadata</code> task still processes the JAR and throws <code>NullPointerException</code> errors for EMDK classes, the root cause is typically missing transitive dependencies on the metadata-generation classpath. Resolve this by ensuring all referenced platform and companion classes are available at build time, or by using a supported exclusion mechanism in the NativeScript plugin build configuration.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.bestdevops.com/gradle-compiles-provided-jar-files/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Java Build Tools: Ant vs. Maven vs. Gradle</title>
		<link>https://www.bestdevops.com/java-build-tools-ant-vs-maven-vs-gradle/</link>
					<comments>https://www.bestdevops.com/java-build-tools-ant-vs-maven-vs-gradle/#respond</comments>
		
		<dc:creator><![CDATA[anil]]></dc:creator>
		<pubDate>Mon, 01 May 2017 08:48:51 +0000</pubDate>
				<category><![CDATA[Build and Release]]></category>
		<category><![CDATA[DevOps]]></category>
		<category><![CDATA[DevOps Tools]]></category>
		<category><![CDATA[Ant]]></category>
		<category><![CDATA[Ant or Maven or Gradle]]></category>
		<category><![CDATA[Build Tools]]></category>
		<category><![CDATA[Gradle]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Java Build Tools]]></category>
		<category><![CDATA[Maven]]></category>
		<guid isPermaLink="false">http://www.bestdevops.com/?p=1426</guid>

					<description><![CDATA[Source &#8211; 126kr.com For anything but the most trivial applications, compiling Java from the command line is an exercise in masochism. [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Source &#8211; 126kr.com</p>
<p>For anything but the most trivial applications, compiling Java from the command line is an exercise in masochism. The difficulty including dependencies and making executable .<span id="IL_AD2" class="IL_AD">jar files</span>is why build tools were created.</p>
<p>For this example, we will be compiling this trivial application:</p>
<div>
<div id="highlighter_823465" class="syntaxhighlighter html">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="gutter">
<div class="line number1 index0 alt2">1</div>
<div class="line number2 index1 alt1">2</div>
<div class="line number3 index2 alt2">3</div>
<div class="line number4 index3 alt1">4</div>
<div class="line number5 index4 alt2">5</div>
<div class="line number6 index5 alt1">6</div>
<div class="line number7 index6 alt2">7</div>
<div class="line number8 index7 alt1">8</div>
<div class="line number9 index8 alt2">9</div>
<div class="line number10 index9 alt1">10</div>
<div class="line number11 index10 alt2">11</div>
<div class="line number12 index11 alt1">12</div>
<div class="line number13 index12 alt2">13</div>
<div class="line number14 index13 alt1">14</div>
<div class="line number15 index14 alt2">15</div>
<div class="line number16 index15 alt1">16</div>
</td>
<td class="code">
<div class="container">
<div class="line number1 index0 alt2"><code class="html plain">package com.example.iscream;</code></div>
<div class="line number2 index1 alt1"></div>
<div class="line number3 index2 alt2"><code class="html plain">import com.example.iscream.service.DailySpecialService;</code></div>
<div class="line number4 index3 alt1"><code class="html plain">import java.util.List;</code></div>
<div class="line number5 index4 alt2"></div>
<div class="line number6 index5 alt1"><code class="html plain">public class Application {</code></div>
<div class="line number7 index6 alt2"><code class="html spaces">    </code><code class="html plain">public static void main(String[] args) {</code></div>
<div class="line number8 index7 alt1"><code class="html spaces">        </code><code class="html plain">System.out.println("Starting store!\n\n==============\n");</code></div>
<div class="line number9 index8 alt2"></div>
<div class="line number10 index9 alt1"><code class="html spaces">        </code><code class="html plain">DailySpecialService dailySpecialService = new DailySpecialService();</code></div>
<div class="line number11 index10 alt2"><code class="html spaces">        </code><code class="html plain">List&lt;</code><code class="html keyword">String</code><code class="html plain">&gt; dailySpecials = dailySpecialService.getSpecials();</code></div>
<div class="line number12 index11 alt1"></div>
<div class="line number13 index12 alt2"><code class="html spaces">        </code><code class="html plain">System.out.println("Today's specials are:");</code></div>
<div class="line number14 index13 alt1"><code class="html spaces">        </code><code class="html plain">dailySpecials.forEach(s -&gt; System.out.println(" - " + s));</code></div>
<div class="line number15 index14 alt2"><code class="html spaces">    </code><code class="html plain">}</code></div>
<div class="line number16 index15 alt1"><code class="html plain">}</code></div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div>
<div id="highlighter_973604" class="syntaxhighlighter html">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="gutter">
<div class="line number1 index0 alt2">1</div>
<div class="line number2 index1 alt1">2</div>
<div class="line number3 index2 alt2">3</div>
<div class="line number4 index3 alt1">4</div>
<div class="line number5 index4 alt2">5</div>
<div class="line number6 index5 alt1">6</div>
<div class="line number7 index6 alt2">7</div>
<div class="line number8 index7 alt1">8</div>
<div class="line number9 index8 alt2">9</div>
<div class="line number10 index9 alt1">10</div>
<div class="line number11 index10 alt2">11</div>
</td>
<td class="code">
<div class="container">
<div class="line number1 index0 alt2"><code class="html plain">package com.example.iscream.service;</code></div>
<div class="line number2 index1 alt1"></div>
<div class="line number3 index2 alt2"><code class="html plain">import com.google.common.collect.Lists;</code></div>
<div class="line number4 index3 alt1"><code class="html plain">import java.util.List;</code></div>
<div class="line number5 index4 alt2"></div>
<div class="line number6 index5 alt1"><code class="html plain">public class DailySpecialService {</code></div>
<div class="line number7 index6 alt2"></div>
<div class="line number8 index7 alt1"><code class="html spaces">    </code><code class="html plain">public List&lt;</code><code class="html keyword">String</code><code class="html plain">&gt; getSpecials() {</code></div>
<div class="line number9 index8 alt2"><code class="html spaces">        </code><code class="html plain">return Lists.newArrayList("Salty Caramel", "Coconut Chip", "Maui Mango");</code></div>
<div class="line number10 index9 alt1"><code class="html spaces">    </code><code class="html plain">}</code></div>
<div class="line number11 index10 alt2"><code class="html plain">}</code></div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<h3>Ant</h3>
<p>The program <code>make</code> has been used for over forty years to compile <span id="IL_AD1" class="IL_AD">source code</span> into applications. As such, it was the natural choice in Java’s early years. Unfortunately, a lot of the assumptions and conventions with C programs don’t translate well to the Java ecosystem. To make (har) building the Java Tomcat application easier, James Duncan Davidson wrote Ant. Soon, other open source projects started using Ant, and from there it quickly spread throughout the community.</p>
<h4>Build files</h4>
<p>Ant build files are written in XML and are called <code>build.xml</code> by convention. I know even the word “XML” makes some people shudder, but in small doses it isn’t too painful. I promise. Ant calls the different phases of the build process “targets”. Targets that are defined in the build file can then be invoked using the <code>ant TARGET</code> command where <code>TARGET</code> is the name of the target.</p>
<p>Here’s the complete build file with the defined targets:</p>
<div>
<div id="highlighter_725486" class="syntaxhighlighter html">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="gutter">
<div class="line number1 index0 alt2">1</div>
<div class="line number2 index1 alt1">2</div>
<div class="line number3 index2 alt2">3</div>
<div class="line number4 index3 alt1">4</div>
<div class="line number5 index4 alt2">5</div>
<div class="line number6 index5 alt1">6</div>
<div class="line number7 index6 alt2">7</div>
<div class="line number8 index7 alt1">8</div>
<div class="line number9 index8 alt2">9</div>
<div class="line number10 index9 alt1">10</div>
<div class="line number11 index10 alt2">11</div>
<div class="line number12 index11 alt1">12</div>
<div class="line number13 index12 alt2">13</div>
<div class="line number14 index13 alt1">14</div>
<div class="line number15 index14 alt2">15</div>
<div class="line number16 index15 alt1">16</div>
<div class="line number17 index16 alt2">17</div>
<div class="line number18 index17 alt1">18</div>
<div class="line number19 index18 alt2">19</div>
<div class="line number20 index19 alt1">20</div>
<div class="line number21 index20 alt2">21</div>
<div class="line number22 index21 alt1">22</div>
<div class="line number23 index22 alt2">23</div>
<div class="line number24 index23 alt1">24</div>
<div class="line number25 index24 alt2">25</div>
<div class="line number26 index25 alt1">26</div>
<div class="line number27 index26 alt2">27</div>
<div class="line number28 index27 alt1">28</div>
<div class="line number29 index28 alt2">29</div>
<div class="line number30 index29 alt1">30</div>
<div class="line number31 index30 alt2">31</div>
<div class="line number32 index31 alt1">32</div>
</td>
<td class="code">
<div class="container">
<div class="line number1 index0 alt2"><code class="html plain">&lt;</code><code class="html keyword">project</code><code class="html plain">&gt;</code></div>
<div class="line number2 index1 alt1"></div>
<div class="line number3 index2 alt2"><code class="html spaces">    </code><code class="html plain">&lt;</code><code class="html keyword">path</code> <code class="html color1">id</code><code class="html plain">=</code><code class="html string">"classpath"</code><code class="html plain">&gt;</code></div>
<div class="line number4 index3 alt1"><code class="html spaces">        </code><code class="html plain">&lt;</code><code class="html keyword">fileset</code> <code class="html color1">dir</code><code class="html plain">=</code><code class="html string">"lib"</code> <code class="html color1">includes</code><code class="html plain">=</code><code class="html string">"**/*.jar"</code><code class="html plain">/&gt;</code></div>
<div class="line number5 index4 alt2"><code class="html spaces">    </code><code class="html plain">&lt;/</code><code class="html keyword">path</code><code class="html plain">&gt;</code></div>
<div class="line number6 index5 alt1"></div>
<div class="line number7 index6 alt2"><code class="html spaces">    </code><code class="html plain">&lt;</code><code class="html keyword">target</code> <code class="html color1">name</code><code class="html plain">=</code><code class="html string">"clean"</code><code class="html plain">&gt;</code></div>
<div class="line number8 index7 alt1"><code class="html spaces">        </code><code class="html plain">&lt;</code><code class="html keyword">delete</code> <code class="html color1">dir</code><code class="html plain">=</code><code class="html string">"build"</code><code class="html plain">/&gt;</code></div>
<div class="line number9 index8 alt2"><code class="html spaces">    </code><code class="html plain">&lt;/</code><code class="html keyword">target</code><code class="html plain">&gt;</code></div>
<div class="line number10 index9 alt1"></div>
<div class="line number11 index10 alt2"><code class="html spaces">    </code><code class="html plain">&lt;</code><code class="html keyword">target</code> <code class="html color1">name</code><code class="html plain">=</code><code class="html string">"compile"</code><code class="html plain">&gt;</code></div>
<div class="line number12 index11 alt1"><code class="html spaces">        </code><code class="html plain">&lt;</code><code class="html keyword">mkdir</code> <code class="html color1">dir</code><code class="html plain">=</code><code class="html string">"build/classes"</code><code class="html plain">/&gt;</code></div>
<div class="line number13 index12 alt2"><code class="html spaces">        </code><code class="html plain">&lt;</code><code class="html keyword">javac</code> <code class="html color1">srcdir</code><code class="html plain">=</code><code class="html string">"src/main/java"</code></div>
<div class="line number14 index13 alt1"><code class="html spaces">               </code><code class="html color1">destdir</code><code class="html plain">=</code><code class="html string">"build/classes"</code></div>
<div class="line number15 index14 alt2"><code class="html spaces">               </code><code class="html color1">classpathref</code><code class="html plain">=</code><code class="html string">"classpath"</code><code class="html plain">/&gt;</code></div>
<div class="line number16 index15 alt1"><code class="html spaces">    </code><code class="html plain">&lt;/</code><code class="html keyword">target</code><code class="html plain">&gt;</code></div>
<div class="line number17 index16 alt2"></div>
<div class="line number18 index17 alt1"><code class="html spaces">    </code><code class="html plain">&lt;</code><code class="html keyword">target</code> <code class="html color1">name</code><code class="html plain">=</code><code class="html string">"jar"</code><code class="html plain">&gt;</code></div>
<div class="line number19 index18 alt2"><code class="html spaces">        </code><code class="html plain">&lt;</code><code class="html keyword">mkdir</code> <code class="html color1">dir</code><code class="html plain">=</code><code class="html string">"build/jar"</code><code class="html plain">/&gt;</code></div>
<div class="line number20 index19 alt1"><code class="html spaces">        </code><code class="html plain">&lt;</code><code class="html keyword">jar</code> <code class="html color1">destfile</code><code class="html plain">=</code><code class="html string">"build/jar/IScream.jar"</code> <code class="html color1">basedir</code><code class="html plain">=</code><code class="html string">"build/classes"</code><code class="html plain">/&gt;</code></div>
<div class="line number21 index20 alt2"><code class="html spaces">    </code><code class="html plain">&lt;/</code><code class="html keyword">target</code><code class="html plain">&gt;</code></div>
<div class="line number22 index21 alt1"></div>
<div class="line number23 index22 alt2"><code class="html spaces">    </code><code class="html plain">&lt;</code><code class="html keyword">target</code> <code class="html color1">name</code><code class="html plain">=</code><code class="html string">"run"</code> <code class="html color1">depends</code><code class="html plain">=</code><code class="html string">"jar"</code><code class="html plain">&gt;</code></div>
<div class="line number24 index23 alt1"><code class="html spaces">        </code><code class="html plain">&lt;</code><code class="html keyword">java</code> <code class="html color1">fork</code><code class="html plain">=</code><code class="html string">"true"</code> <code class="html color1">classname</code><code class="html plain">=</code><code class="html string">"com.example.iscream.Application"</code><code class="html plain">&gt;</code></div>
<div class="line number25 index24 alt2"><code class="html spaces">            </code><code class="html plain">&lt;</code><code class="html keyword">classpath</code><code class="html plain">&gt;</code></div>
<div class="line number26 index25 alt1"><code class="html spaces">                </code><code class="html plain">&lt;</code><code class="html keyword">path</code> <code class="html color1">refid</code><code class="html plain">=</code><code class="html string">"classpath"</code><code class="html plain">/&gt;</code></div>
<div class="line number27 index26 alt2"><code class="html spaces">                </code><code class="html plain">&lt;</code><code class="html keyword">path</code> <code class="html color1">location</code><code class="html plain">=</code><code class="html string">"build/jar/IScream.jar"</code><code class="html plain">/&gt;</code></div>
<div class="line number28 index27 alt1"><code class="html spaces">            </code><code class="html plain">&lt;/</code><code class="html keyword">classpath</code><code class="html plain">&gt;</code></div>
<div class="line number29 index28 alt2"><code class="html spaces">        </code><code class="html plain">&lt;/</code><code class="html keyword">java</code><code class="html plain">&gt;</code></div>
<div class="line number30 index29 alt1"><code class="html spaces">    </code><code class="html plain">&lt;/</code><code class="html keyword">target</code><code class="html plain">&gt;</code></div>
<div class="line number31 index30 alt2"></div>
<div class="line number32 index31 alt1"><code class="html plain">&lt;/</code><code class="html keyword">project</code><code class="html plain">&gt;</code></div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<p>With these targets defined, you may run <code>ant clean</code> , <code>ant compile</code> , <code>ant jar</code> , <code>ant run</code> to compile, build, and run the application we built.</p>
<p>Of course, the build file you’re likely to encounter in a real project is going to be much more complex than this example. Ant has dozens of built-in tasks , and it’s possible to define custom tasks too. A typical build might move around files, assemble documentation, run tests, publish build artifacts, etc. If you are lucky and are working on a well-maintained project, the build file should “just work”. If not, you may have to make tweaks for your specific computer. Keep an eye out for <code>.properties</code> files referenced by the build file that may contain configurable filepaths, environments, etc.</p>
<h4>Summary</h4>
<p>While setting up a build script takes some time up front, hopefully you can see the benefit of using one over passing commands manually to Java. Of course, Ant isn’t without its own problems. First, there are few enforced standards in an Ant script. This provides flexibility, but at the cost of every build file being entirely different. In the same way that knowing Java doesn’t mean you can jump into any codebase, knowing Ant doesn’t mean you can jump into any Ant file–you need to take time to understand it. Second, the imperative nature of Ant means build scripts can get very, very long. One example I found is over 2000 lines long ! Finally, we learned Ant has no built-in capability for dependency management, although it can be supplemented with Ivy. These limitations along with some other build script annoyances led to the creation of Maven in the early 2000s.</p>
<h3>Maven</h3>
<p>Maven is really two tools in one: a dependency manager and a build tool. Like Ant it is XML-based, but unlike Ant, it outlines fairly rigid standards. Furthermore, Maven is declarative allowing you to define <em>what</em> your build should do and less about <em>how</em> to do it. These advantages make Maven appealing; build files are much more standard across projects and developers spend less time tailoring the files. As such, Maven has become somewhat of a de facto standard in the Java world.</p>
<h4>Maven Phases</h4>
<p>The most common build phases are included in Maven and can be executed by running <code>mvn PHASE</code> (where <code>PHASE</code> is the phase name). The most common phase you will invoke is <code>install</code>because it will fully build and test the project, then create a build artifact.</p>
<p>Although it isn’t actually a phase, the command <code>mvn clean</code> deserves a mention. Running that command will “clean” your local build directory (i.e. <code>/target</code> ), and remove compiled classes, resources, packages, etc. In theory, you should just be able to run <code>mvn <span id="IL_AD3" class="IL_AD">install</span></code> and your build directory will be updated automatically. However, it seems that enough developers (including myself) have been burned by this not working that we habitually run <code>mvn clean install</code> to force the project to build from scratch.</p>
<h4>Project Object Model (POM) Files</h4>
<p>Maven’s build files are called Project Object Model files, usually just abbreviated to POM, and are saved as <code>pom.xml</code> in the root directory of a project. In order for Maven to work out of the box, it’s important to follow this directory structure:</p>
<div>
<div id="highlighter_925346" class="syntaxhighlighter html">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="gutter">
<div class="line number1 index0 alt2">1</div>
<div class="line number2 index1 alt1">2</div>
<div class="line number3 index2 alt2">3</div>
<div class="line number4 index3 alt1">4</div>
<div class="line number5 index4 alt2">5</div>
<div class="line number6 index5 alt1">6</div>
<div class="line number7 index6 alt2">7</div>
<div class="line number8 index7 alt1">8</div>
<div class="line number9 index8 alt2">9</div>
<div class="line number10 index9 alt1">10</div>
<div class="line number11 index10 alt2">11</div>
<div class="line number12 index11 alt1">12</div>
<div class="line number13 index12 alt2">13</div>
</td>
<td class="code">
<div class="container">
<div class="line number1 index0 alt2"><code class="html plain">.</code></div>
<div class="line number2 index1 alt1"><code class="html plain">├── pom.xml</code></div>
<div class="line number3 index2 alt2"><code class="html plain">└── src</code></div>
<div class="line number4 index3 alt1"><code class="html spaces">    </code><code class="html plain">├── main</code></div>
<div class="line number5 index4 alt2"><code class="html spaces">    </code><code class="html plain">│   ├── java</code></div>
<div class="line number6 index5 alt1"><code class="html spaces">    </code><code class="html plain">│   │    &lt;-- Your Java code goes here</code></div>
<div class="line number7 index6 alt2"><code class="html spaces">    </code><code class="html plain">│   ├── resources</code></div>
<div class="line number8 index7 alt1"><code class="html spaces">    </code><code class="html plain">│   │    &lt;-- Non-code files that your app/library needs</code></div>
<div class="line number9 index8 alt2"><code class="html spaces">    </code><code class="html plain">└── test</code></div>
<div class="line number10 index9 alt1"><code class="html spaces">        </code><code class="html plain">├── java</code></div>
<div class="line number11 index10 alt2"><code class="html spaces">        </code><code class="html plain">│    &lt;-- Java tests</code></div>
<div class="line number12 index11 alt1"><code class="html spaces">        </code><code class="html plain">├── resources</code></div>
<div class="line number13 index12 alt2"><code class="html spaces">        </code><code class="html plain">│    &lt;-- Non-code files that your tests need</code></div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<p>As mentioned previously, Maven has dependency management built in. The easiest way to find the correct values are from the project&#8217;s website or the MVNRepository site. For our build, we also need to use one of Apache&#8217;s official plugins&#8211;the Shade plugin. This plugin is used to build fat <code>.jar</code> files.</p>
<p>Here&#8217;s the complete POM file:</p>
<div>
<div id="highlighter_375242" class="syntaxhighlighter html">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="gutter">
<div class="line number1 index0 alt2">1</div>
<div class="line number2 index1 alt1">2</div>
<div class="line number3 index2 alt2">3</div>
<div class="line number4 index3 alt1">4</div>
<div class="line number5 index4 alt2">5</div>
<div class="line number6 index5 alt1">6</div>
<div class="line number7 index6 alt2">7</div>
<div class="line number8 index7 alt1">8</div>
<div class="line number9 index8 alt2">9</div>
<div class="line number10 index9 alt1">10</div>
<div class="line number11 index10 alt2">11</div>
<div class="line number12 index11 alt1">12</div>
<div class="line number13 index12 alt2">13</div>
<div class="line number14 index13 alt1">14</div>
<div class="line number15 index14 alt2">15</div>
<div class="line number16 index15 alt1">16</div>
<div class="line number17 index16 alt2">17</div>
<div class="line number18 index17 alt1">18</div>
<div class="line number19 index18 alt2">19</div>
<div class="line number20 index19 alt1">20</div>
<div class="line number21 index20 alt2">21</div>
<div class="line number22 index21 alt1">22</div>
<div class="line number23 index22 alt2">23</div>
<div class="line number24 index23 alt1">24</div>
<div class="line number25 index24 alt2">25</div>
<div class="line number26 index25 alt1">26</div>
<div class="line number27 index26 alt2">27</div>
<div class="line number28 index27 alt1">28</div>
<div class="line number29 index28 alt2">29</div>
<div class="line number30 index29 alt1">30</div>
<div class="line number31 index30 alt2">31</div>
<div class="line number32 index31 alt1">32</div>
<div class="line number33 index32 alt2">33</div>
<div class="line number34 index33 alt1">34</div>
<div class="line number35 index34 alt2">35</div>
<div class="line number36 index35 alt1">36</div>
<div class="line number37 index36 alt2">37</div>
<div class="line number38 index37 alt1">38</div>
<div class="line number39 index38 alt2">39</div>
<div class="line number40 index39 alt1">40</div>
<div class="line number41 index40 alt2">41</div>
<div class="line number42 index41 alt1">42</div>
<div class="line number43 index42 alt2">43</div>
<div class="line number44 index43 alt1">44</div>
</td>
<td class="code">
<div class="container">
<div class="line number1 index0 alt2"><code class="html plain">&lt;?</code><code class="html keyword">xml</code> <code class="html color1">version</code><code class="html plain">=</code><code class="html string">"1.0"</code> <code class="html color1">encoding</code><code class="html plain">=</code><code class="html string">"UTF-8"</code><code class="html plain">?&gt;</code></div>
<div class="line number2 index1 alt1"><code class="html plain">&lt;</code><code class="html keyword">project</code> <code class="html color1">xmlns</code><code class="html plain">=</code><code class="html string">"http://maven.apache.org/POM/4.0.0"</code> <code class="html color1">xmlns:xsi</code><code class="html plain">=</code><code class="html string">"http://www.w3.org/2001/XMLSchema-instance"</code> <code class="html color1">xsi:schemaLocation</code><code class="html plain">=</code><code class="html string">"http://maven.apache.org/POM/4.0.0                       https://maven.apache.org/xsd/maven-4.0.0.xsd"</code><code class="html plain">&gt;</code></div>
<div class="line number3 index2 alt2"><code class="html spaces">   </code><code class="html plain">&lt;</code><code class="html keyword">modelVersion</code><code class="html plain">&gt;4.0.0&lt;/</code><code class="html keyword">modelVersion</code><code class="html plain">&gt;</code></div>
<div class="line number4 index3 alt1"><code class="html spaces">   </code><code class="html plain">&lt;</code><code class="html keyword">groupId</code><code class="html plain">&gt;com.example&lt;/</code><code class="html keyword">groupId</code><code class="html plain">&gt;</code></div>
<div class="line number5 index4 alt2"><code class="html spaces">   </code><code class="html plain">&lt;</code><code class="html keyword">artifactId</code><code class="html plain">&gt;iscream&lt;/</code><code class="html keyword">artifactId</code><code class="html plain">&gt;</code></div>
<div class="line number6 index5 alt1"><code class="html spaces">   </code><code class="html plain">&lt;</code><code class="html keyword">version</code><code class="html plain">&gt;0.0.1-SNAPSHOT&lt;/</code><code class="html keyword">version</code><code class="html plain">&gt;</code></div>
<div class="line number7 index6 alt2"><code class="html spaces">   </code><code class="html plain">&lt;</code><code class="html keyword">packaging</code><code class="html plain">&gt;jar&lt;/</code><code class="html keyword">packaging</code><code class="html plain">&gt;</code></div>
<div class="line number8 index7 alt1"><code class="html spaces">   </code><code class="html plain">&lt;</code><code class="html keyword">properties</code><code class="html plain">&gt;</code></div>
<div class="line number9 index8 alt2"><code class="html spaces">      </code><code class="html plain">&lt;</code><code class="html keyword">maven.compiler.source</code><code class="html plain">&gt;1.8&lt;/</code><code class="html keyword">maven.compiler.source</code><code class="html plain">&gt;</code></div>
<div class="line number10 index9 alt1"><code class="html spaces">      </code><code class="html plain">&lt;</code><code class="html keyword">maven.compiler.target</code><code class="html plain">&gt;1.8&lt;/</code><code class="html keyword">maven.compiler.target</code><code class="html plain">&gt;</code></div>
<div class="line number11 index10 alt2"><code class="html spaces">      </code><code class="html plain">&lt;</code><code class="html keyword">project.build.sourceEncoding</code><code class="html plain">&gt;UTF-8&lt;/</code><code class="html keyword">project.build.sourceEncoding</code><code class="html plain">&gt;</code></div>
<div class="line number12 index11 alt1"><code class="html spaces">   </code><code class="html plain">&lt;/</code><code class="html keyword">properties</code><code class="html plain">&gt;</code></div>
<div class="line number13 index12 alt2"><code class="html spaces">   </code><code class="html plain">&lt;</code><code class="html keyword">dependencies</code><code class="html plain">&gt;</code></div>
<div class="line number14 index13 alt1"><code class="html spaces">      </code><code class="html plain">&lt;</code><code class="html keyword">dependency</code><code class="html plain">&gt;</code></div>
<div class="line number15 index14 alt2"><code class="html spaces">         </code><code class="html plain">&lt;</code><code class="html keyword">groupId</code><code class="html plain">&gt;com.google.guava&lt;/</code><code class="html keyword">groupId</code><code class="html plain">&gt;</code></div>
<div class="line number16 index15 alt1"><code class="html spaces">         </code><code class="html plain">&lt;</code><code class="html keyword">artifactId</code><code class="html plain">&gt;guava&lt;/</code><code class="html keyword">artifactId</code><code class="html plain">&gt;</code></div>
<div class="line number17 index16 alt2"><code class="html spaces">         </code><code class="html plain">&lt;</code><code class="html keyword">version</code><code class="html plain">&gt;21.0&lt;/</code><code class="html keyword">version</code><code class="html plain">&gt;</code></div>
<div class="line number18 index17 alt1"><code class="html spaces">      </code><code class="html plain">&lt;/</code><code class="html keyword">dependency</code><code class="html plain">&gt;</code></div>
<div class="line number19 index18 alt2"><code class="html spaces">   </code><code class="html plain">&lt;/</code><code class="html keyword">dependencies</code><code class="html plain">&gt;</code></div>
<div class="line number20 index19 alt1"><code class="html spaces">   </code><code class="html plain">&lt;</code><code class="html keyword">build</code><code class="html plain">&gt;</code></div>
<div class="line number21 index20 alt2"><code class="html spaces">      </code><code class="html plain">&lt;</code><code class="html keyword">plugins</code><code class="html plain">&gt;</code></div>
<div class="line number22 index21 alt1"><code class="html spaces">         </code><code class="html plain">&lt;</code><code class="html keyword">plugin</code><code class="html plain">&gt;</code></div>
<div class="line number23 index22 alt2"><code class="html spaces">            </code><code class="html plain">&lt;</code><code class="html keyword">groupId</code><code class="html plain">&gt;org.apache.maven.plugins&lt;/</code><code class="html keyword">groupId</code><code class="html plain">&gt;</code></div>
<div class="line number24 index23 alt1"><code class="html spaces">            </code><code class="html plain">&lt;</code><code class="html keyword">artifactId</code><code class="html plain">&gt;maven-shade-plugin&lt;/</code><code class="html keyword">artifactId</code><code class="html plain">&gt;</code></div>
<div class="line number25 index24 alt2"><code class="html spaces">            </code><code class="html plain">&lt;</code><code class="html keyword">version</code><code class="html plain">&gt;2.3&lt;/</code><code class="html keyword">version</code><code class="html plain">&gt;</code></div>
<div class="line number26 index25 alt1"><code class="html spaces">            </code><code class="html plain">&lt;</code><code class="html keyword">executions</code><code class="html plain">&gt;</code></div>
<div class="line number27 index26 alt2"><code class="html spaces">               </code><code class="html plain">&lt;</code><code class="html keyword">execution</code><code class="html plain">&gt;</code></div>
<div class="line number28 index27 alt1"><code class="html spaces">                  </code><code class="html plain">&lt;</code><code class="html keyword">phase</code><code class="html plain">&gt;package&lt;/</code><code class="html keyword">phase</code><code class="html plain">&gt;</code></div>
<div class="line number29 index28 alt2"><code class="html spaces">                  </code><code class="html plain">&lt;</code><code class="html keyword">goals</code><code class="html plain">&gt;</code></div>
<div class="line number30 index29 alt1"><code class="html spaces">                     </code><code class="html plain">&lt;</code><code class="html keyword">goal</code><code class="html plain">&gt;shade&lt;/</code><code class="html keyword">goal</code><code class="html plain">&gt;</code></div>
<div class="line number31 index30 alt2"><code class="html spaces">                  </code><code class="html plain">&lt;/</code><code class="html keyword">goals</code><code class="html plain">&gt;</code></div>
<div class="line number32 index31 alt1"><code class="html spaces">                  </code><code class="html plain">&lt;</code><code class="html keyword">configuration</code><code class="html plain">&gt;</code></div>
<div class="line number33 index32 alt2"><code class="html spaces">                     </code><code class="html plain">&lt;</code><code class="html keyword">transformers</code><code class="html plain">&gt;</code></div>
<div class="line number34 index33 alt1"><code class="html spaces">                        </code><code class="html plain">&lt;</code><code class="html keyword">transformer</code> <code class="html color1">implementation</code><code class="html plain">=</code><code class="html string">"org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"</code><code class="html plain">&gt;</code></div>
<div class="line number35 index34 alt2"><code class="html spaces">                           </code><code class="html plain">&lt;</code><code class="html keyword">mainClass</code><code class="html plain">&gt;com.example.iscream.Application&lt;/</code><code class="html keyword">mainClass</code><code class="html plain">&gt;</code></div>
<div class="line number36 index35 alt1"><code class="html spaces">                        </code><code class="html plain">&lt;/</code><code class="html keyword">transformer</code><code class="html plain">&gt;</code></div>
<div class="line number37 index36 alt2"><code class="html spaces">                     </code><code class="html plain">&lt;/</code><code class="html keyword">transformers</code><code class="html plain">&gt;</code></div>
<div class="line number38 index37 alt1"><code class="html spaces">                  </code><code class="html plain">&lt;/</code><code class="html keyword">configuration</code><code class="html plain">&gt;</code></div>
<div class="line number39 index38 alt2"><code class="html spaces">               </code><code class="html plain">&lt;/</code><code class="html keyword">execution</code><code class="html plain">&gt;</code></div>
<div class="line number40 index39 alt1"><code class="html spaces">            </code><code class="html plain">&lt;/</code><code class="html keyword">executions</code><code class="html plain">&gt;</code></div>
<div class="line number41 index40 alt2"><code class="html spaces">         </code><code class="html plain">&lt;/</code><code class="html keyword">plugin</code><code class="html plain">&gt;</code></div>
<div class="line number42 index41 alt1"><code class="html spaces">      </code><code class="html plain">&lt;/</code><code class="html keyword">plugins</code><code class="html plain">&gt;</code></div>
<div class="line number43 index42 alt2"><code class="html spaces">   </code><code class="html plain">&lt;/</code><code class="html keyword">build</code><code class="html plain">&gt;</code></div>
<div class="line number44 index43 alt1"><code class="html plain">&lt;/</code><code class="html keyword">project</code><code class="html plain">&gt;</code></div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<p>At this point you can run <code>mvn package</code> and you will see the <code>iscream-0.0.1-SNAPSHOT.jar</code> file inside of the <code>target</code> folder. If you run <code>java -jar iscream-0.0.1-SNAPSHOT.jar</code> you can run the application.</p>
<h4>Summary</h4>
<p>Although Maven has made considerable strides in making builds easier, all Maven users have found themselves banging their head against the wall with a tricky Maven problem at one time or another. I&#8217;ve already mentioned some usability problems with plugins, but there&#8217;s also the problem of &#8220;The Maven Way&#8221;. Anytime a build deviates from what Maven expects, it can be difficult to put in a work-around. Many projects are &#8220;normal&#8230;except for that one weird thing we have to do&#8221;. And the more &#8220;weird things&#8221; in the build, the harder it can be to bend Maven to your will. Wouldn&#8217;t it be great if we could combine the flexibility of Ant with the features of Maven? That&#8217;s exactly what Gradle is trying to do.</p>
<h3>Gradle</h3>
<p>The first thing you will notice about a Gradle build script is that it is not XML! In fact, Gradle uses a domain specific language (DSL) based on Groovy, which is another programming language that can run on the JVM.</p>
<p>The DSL defines both the core parts of the build file and specific build steps called &#8220;tasks&#8221;. It is also extensible making it very easy to define your own tasks. And of course, Gradle also has a rich third-party plugin library. Let&#8217;s dive in.</p>
<h4>Build files</h4>
<p>Gradle build files are appropriately named <code>build.gradle</code> and start out by configuring the build. For our project we need to take advantage of a fat jar plugin, so we will add the Shadow plugin to the build script configuration.</p>
<p>In order for Gradle to download the plugin, it has to look in a repository, which is an index for artifacts. Some repositories are known to Gradle and can be referred to simply as<code>mavenCentral()</code> or <code>jcenter()</code> . The Gradle team decided to not reinvent the wheel when it comes to repositories and instead relies on the existing Maven and Ivy dependency ecosystems.</p>
<h4>Tasks</h4>
<p>Finally after Ant&#8217;s obscure &#8220;target&#8221; and Maven&#8217;s confusing &#8220;phase&#8221;, Gradle gave a reasonable name to their build steps: &#8220;tasks&#8221;. We use Gradle&#8217;s <code>apply</code> to give access to certain tasks. (The<code>java</code> plugin is built in to Gradle which is why we did not need to declare it in the build&#8217;s dependencies.)</p>
<p>The <code>java</code> plugin will give you common tasks such as <code>clean</code> , <code>compileJava</code> , <code>test</code> , etc. The<code>shadow</code> plugin will give you the <code>shadowJar</code> task which builds a fat jar. To see a complete list of the available tasks, you can run <code>gradle -q tasks</code> .</p>
<h4>Dependency Management</h4>
<p>We&#8217;ve already discussed how a build script can rely on a plugin dependency, likewise the build script can define the dependencies for your project. Here&#8217;s the complete build file:</p>
<div>
<div id="highlighter_560705" class="syntaxhighlighter html">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="gutter">
<div class="line number1 index0 alt2">1</div>
<div class="line number2 index1 alt1">2</div>
<div class="line number3 index2 alt2">3</div>
<div class="line number4 index3 alt1">4</div>
<div class="line number5 index4 alt2">5</div>
<div class="line number6 index5 alt1">6</div>
<div class="line number7 index6 alt2">7</div>
<div class="line number8 index7 alt1">8</div>
<div class="line number9 index8 alt2">9</div>
<div class="line number10 index9 alt1">10</div>
<div class="line number11 index10 alt2">11</div>
<div class="line number12 index11 alt1">12</div>
<div class="line number13 index12 alt2">13</div>
<div class="line number14 index13 alt1">14</div>
<div class="line number15 index14 alt2">15</div>
<div class="line number16 index15 alt1">16</div>
<div class="line number17 index16 alt2">17</div>
<div class="line number18 index17 alt1">18</div>
<div class="line number19 index18 alt2">19</div>
<div class="line number20 index19 alt1">20</div>
<div class="line number21 index20 alt2">21</div>
<div class="line number22 index21 alt1">22</div>
<div class="line number23 index22 alt2">23</div>
<div class="line number24 index23 alt1">24</div>
<div class="line number25 index24 alt2">25</div>
<div class="line number26 index25 alt1">26</div>
<div class="line number27 index26 alt2">27</div>
<div class="line number28 index27 alt1">28</div>
<div class="line number29 index28 alt2">29</div>
<div class="line number30 index29 alt1">30</div>
<div class="line number31 index30 alt2">31</div>
</td>
<td class="code">
<div class="container">
<div class="line number1 index0 alt2"><code class="html plain">buildscript {</code></div>
<div class="line number2 index1 alt1"><code class="html spaces">    </code><code class="html plain">repositories {</code></div>
<div class="line number3 index2 alt2"><code class="html spaces">        </code><code class="html plain">jcenter()</code></div>
<div class="line number4 index3 alt1"><code class="html spaces">    </code><code class="html plain">}</code></div>
<div class="line number5 index4 alt2"><code class="html spaces">    </code><code class="html plain">dependencies {</code></div>
<div class="line number6 index5 alt1"><code class="html spaces">        </code><code class="html plain">classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.4'</code></div>
<div class="line number7 index6 alt2"><code class="html spaces">    </code><code class="html plain">}</code></div>
<div class="line number8 index7 alt1"><code class="html plain">}</code></div>
<div class="line number9 index8 alt2"></div>
<div class="line number10 index9 alt1"><code class="html plain">apply plugin: 'java'</code></div>
<div class="line number11 index10 alt2"><code class="html plain">apply plugin: 'com.github.johnrengelman.shadow'</code></div>
<div class="line number12 index11 alt1"></div>
<div class="line number13 index12 alt2"><code class="html plain">group = 'com.example'</code></div>
<div class="line number14 index13 alt1"><code class="html plain">version = '0.0.1-SNAPSHOT'</code></div>
<div class="line number15 index14 alt2"><code class="html plain">sourceCompatibility = 1.8</code></div>
<div class="line number16 index15 alt1"><code class="html plain">targetCompatibility = 1.8</code></div>
<div class="line number17 index16 alt2"></div>
<div class="line number18 index17 alt1"><code class="html plain">repositories {</code></div>
<div class="line number19 index18 alt2"><code class="html spaces">    </code><code class="html plain">mavenCentral()</code></div>
<div class="line number20 index19 alt1"><code class="html plain">}</code></div>
<div class="line number21 index20 alt2"></div>
<div class="line number22 index21 alt1"><code class="html plain">dependencies {</code></div>
<div class="line number23 index22 alt2"><code class="html spaces">    </code><code class="html plain">compile group: 'com.google.guava', name: 'guava', version: '21.0'</code></div>
<div class="line number24 index23 alt1"><code class="html plain">}</code></div>
<div class="line number25 index24 alt2"></div>
<div class="line number26 index25 alt1"><code class="html plain">shadowJar {</code></div>
<div class="line number27 index26 alt2"><code class="html spaces">    </code><code class="html plain">baseName = 'iscream'</code></div>
<div class="line number28 index27 alt1"><code class="html spaces">    </code><code class="html plain">manifest {</code></div>
<div class="line number29 index28 alt2"><code class="html spaces">        </code><code class="html plain">attributes 'Main-Class': 'com.example.iscream.Application'</code></div>
<div class="line number30 index29 alt1"><code class="html spaces">    </code><code class="html plain">}</code></div>
<div class="line number31 index30 alt2"><code class="html plain">}</code></div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<p>Now that the build knows how to find the project&#8217;s dependencies, we can run <code>gradle shawdowJar</code> to create a fat jar that includes the Guava dependency. After it completes, you should see <code>/build/lib/iscream-0.0.1-SNAPSHOT-all.jar</code> , which can be ran in the usual way (<code>java -jar ...</code> ).</p>
<h4>Summary</h4>
<p>Gradle brings a lot of flexibility and power to the Java build ecosystem. Of course, there is always some danger with highly customizable tools&#8211;suddenly you have to be aware of code quality in your build file. This is not necessarily bad, but worth considering when evaluating how your team will use the tool. Furthermore, much of Gradle&#8217;s power comes from third-party plugins. And since it is relatively new, it still sometimes feels like you are using a bunch of plugins developed by SomeRandomPerson. You may find yourself comparing three plugins that ostensibly do the same thing, each have a few dozen GitHub stars, and little documentation to boot. Despite these downsides, Gradle is gaining popularity and is particularly appealing to developers who like to have more control over their builds.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.bestdevops.com/java-build-tools-ant-vs-maven-vs-gradle/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How To Install Gradle on Ubuntu</title>
		<link>https://www.bestdevops.com/how-to-install-gradle-on-ubuntu/</link>
					<comments>https://www.bestdevops.com/how-to-install-gradle-on-ubuntu/#respond</comments>
		
		<dc:creator><![CDATA[anil]]></dc:creator>
		<pubDate>Thu, 13 Apr 2017 12:34:28 +0000</pubDate>
				<category><![CDATA[DevOps]]></category>
		<category><![CDATA[DevOps News]]></category>
		<category><![CDATA[Apache Ant]]></category>
		<category><![CDATA[Apache Maven]]></category>
		<category><![CDATA[automation toolset]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Gradle]]></category>
		<category><![CDATA[Java Development Kit]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<guid isPermaLink="false">http://www.bestdevops.com/?p=1279</guid>

					<description><![CDATA[A step-by-step guide to installing Gradle on Ubuntu using a manual binary installation, including Java prerequisites, PATH configuration, and verification.]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">Gradle is a free and open-source build automation tool that builds on concepts from Apache Ant and Apache Maven while replacing XML-based configuration with a Groovy-based Domain Specific Language (DSL). It supports the full development lifecycle and is widely used for Java, Android, and polyglot projects.</p>



<p class="wp-block-paragraph">This guide walks through installing Gradle on Ubuntu manually from the official binary distribution — the approach that gives you full control over which version is installed.</p>




<p class="wp-block-paragraph"><strong>Note:</strong> The commands below were originally demonstrated on Ubuntu 16.04 (Xenial) with Gradle 3.4.1. The <em>procedure</em> is the same on modern Ubuntu releases, but you should substitute the current Gradle release version from <a href="https://gradle.org/releases/">gradle.org/releases</a> when you run through these steps.</p>




<h2 class="wp-block-heading">Prerequisites</h2>



<ul class="wp-block-list">
<li>Ubuntu (any currently supported LTS release)</li>
<li>A user account with <code>sudo</code> privileges, or root access</li>
<li>Internet access to download the Gradle binary</li>
<li>Java Development Kit (JDK) 8 or later (Gradle requires JDK 7 as a minimum; JDK 8+ is recommended)</li>
</ul>



<h2 class="wp-block-heading">Step 1 — Update System Package Repositories</h2>



<p class="wp-block-paragraph">Before installing any new software, refresh your local package index to make sure you pull the latest metadata:</p>


<pre class="wp-block-code"><span><code class="hljs language-javascript">sudo apt-<span class="hljs-keyword">get</span> update</code></span></pre>


<h2 class="wp-block-heading">Step 2 — Install OpenJDK 8</h2>



<p class="wp-block-paragraph">Gradle requires a JDK to run. Install OpenJDK 8 (or a later version available in your Ubuntu repositories) with:</p>


<pre class="wp-block-code"><span><code class="hljs language-javascript">sudo apt-<span class="hljs-keyword">get</span> install openjdk-8-jdk -y</code></span></pre>


<p class="wp-block-paragraph">After the installation completes, confirm the JDK is available:</p>


<pre class="wp-block-code"><span><code class="hljs">java -version</code></span></pre>


<p class="wp-block-paragraph">Expected output (version numbers will differ depending on the build installed):</p>


<pre class="wp-block-code"><span><code class="hljs language-css"><span class="hljs-selector-tag">openjdk</span> <span class="hljs-selector-tag">version</span> "1<span class="hljs-selector-class">.8</span><span class="hljs-selector-class">.0_121</span>"
<span class="hljs-selector-tag">OpenJDK</span> <span class="hljs-selector-tag">Runtime</span> <span class="hljs-selector-tag">Environment</span> (<span class="hljs-selector-tag">build</span> 1<span class="hljs-selector-class">.8</span><span class="hljs-selector-class">.0_121-8u121-b13-0ubuntu1</span><span class="hljs-selector-class">.16</span><span class="hljs-selector-class">.04</span><span class="hljs-selector-class">.2-b13</span>)
<span class="hljs-selector-tag">OpenJDK</span> 64<span class="hljs-selector-tag">-Bit</span> <span class="hljs-selector-tag">Server</span> <span class="hljs-selector-tag">VM</span> (<span class="hljs-selector-tag">build</span> 25<span class="hljs-selector-class">.121-b13</span>, <span class="hljs-selector-tag">mixed</span> <span class="hljs-selector-tag">mode</span>)</code></span></pre>


<p class="wp-block-paragraph">If you want to install a newer JDK version (11, 17, 21, etc.), substitute the appropriate package name, for example <code>openjdk-21-jdk</code>.</p>



<h2 class="wp-block-heading">Step 3 — Download the Gradle Binary Distribution</h2>



<p class="wp-block-paragraph">Visit <a href="https://gradle.org/releases/">gradle.org/releases</a> to find the URL for the current stable release. Then use <code>wget</code> to download the <code>-bin.zip</code> archive (which contains the Gradle binaries and command-line tools, but not the source or documentation). Replace <code>3.4.1</code> in the example below with the version you want to install:</p>


<pre class="wp-block-code"><span><code class="hljs language-javascript">wget https:<span class="hljs-comment">//services.gradle.org/distributions/gradle-3.4.1-bin.zip</span></code></span></pre>


<p class="wp-block-paragraph">The download is around 60–100 MB depending on the Gradle release.</p>



<h2 class="wp-block-heading">Step 4 — Create the Installation Directory</h2>



<p class="wp-block-paragraph">It is conventional to install manually managed software under <code>/opt</code>. Create a dedicated directory for Gradle:</p>


<pre class="wp-block-code"><span><code class="hljs">sudo mkdir /opt/gradle</code></span></pre>


<h2 class="wp-block-heading">Step 5 — Extract the Archive</h2>



<p class="wp-block-paragraph">If <code>unzip</code> is not already installed, install it first:</p>


<pre class="wp-block-code"><span><code class="hljs language-javascript">sudo apt-<span class="hljs-keyword">get</span> install unzip -y</code></span></pre>


<p class="wp-block-paragraph">Then extract the downloaded archive directly into <code>/opt/gradle</code>:</p>


<pre class="wp-block-code"><span><code class="hljs">sudo unzip -d /opt/gradle gradle-3.4.1-bin.zip</code></span></pre>


<p class="wp-block-paragraph">This creates a versioned subdirectory, for example <code>/opt/gradle/gradle-3.4.1/</code>, which makes it easy to maintain multiple Gradle versions side by side.</p>



<h2 class="wp-block-heading">Step 6 — Configure the PATH Environment Variable</h2>



<p class="wp-block-paragraph">Add the Gradle <code>bin</code> directory to your <code>PATH</code> so that the <code>gradle</code> command is available system-wide. There are two ways to do this:</p>



<h3 class="wp-block-heading">Option A — Current session only (temporary)</h3>


<pre class="wp-block-code"><span><code class="hljs language-javascript"><span class="hljs-keyword">export</span> PATH=$PATH:<span class="hljs-regexp">/opt/g</span>radle/gradle<span class="hljs-number">-3.4</span><span class="hljs-number">.1</span>/bin</code></span></pre>


<p class="wp-block-paragraph">This sets the variable for the current shell session only. It will be lost when you close the terminal.</p>



<h3 class="wp-block-heading">Option B — Persistent across sessions (recommended)</h3>



<p class="wp-block-paragraph">Create a profile script so the PATH is set automatically for all users at login:</p>


<pre class="wp-block-code"><span><code class="hljs language-php"><span class="hljs-keyword">echo</span> <span class="hljs-string">'export PATH=$PATH:/opt/gradle/gradle-3.4.1/bin'</span> | sudo tee /etc/profile.d/gradle.sh
sudo chmod +x /etc/profile.d/gradle.sh
source /etc/profile.d/gradle.sh</code></span></pre>


<p class="wp-block-paragraph">Alternatively, add the <code>export</code> line to your personal <code>~/.bashrc</code> or <code>~/.profile</code> and run <code>source ~/.bashrc</code>.</p>



<h2 class="wp-block-heading">Step 7 — Verify the Installation</h2>



<p class="wp-block-paragraph">Confirm that Gradle is installed and accessible:</p>


<pre class="wp-block-code"><span><code class="hljs">gradle -v</code></span></pre>


<p class="wp-block-paragraph">You should see output similar to:</p>


<pre class="wp-block-code"><span><code class="hljs language-css"><span class="hljs-selector-tag">------------------------------------------------------------</span>
<span class="hljs-selector-tag">Gradle</span> 3<span class="hljs-selector-class">.4</span><span class="hljs-selector-class">.1</span>
<span class="hljs-selector-tag">------------------------------------------------------------</span>
<span class="hljs-selector-tag">Build</span> <span class="hljs-selector-tag">time</span>:   2017<span class="hljs-selector-tag">-03-03</span> 19<span class="hljs-selector-pseudo">:45</span><span class="hljs-selector-pseudo">:41</span> <span class="hljs-selector-tag">UTC</span>
<span class="hljs-selector-tag">Revision</span>:     9<span class="hljs-selector-tag">eb76efdd3d034dc506c719dac2955efb5ff9a93</span>
<span class="hljs-selector-tag">Groovy</span>:       2<span class="hljs-selector-class">.4</span><span class="hljs-selector-class">.7</span>
<span class="hljs-selector-tag">Ant</span>:          <span class="hljs-selector-tag">Apache</span> <span class="hljs-selector-tag">Ant</span>(<span class="hljs-selector-tag">TM</span>) <span class="hljs-selector-tag">version</span> 1<span class="hljs-selector-class">.9</span><span class="hljs-selector-class">.6</span> <span class="hljs-selector-tag">compiled</span> <span class="hljs-selector-tag">on</span> <span class="hljs-selector-tag">June</span> 29 2015
<span class="hljs-selector-tag">JVM</span>:          1<span class="hljs-selector-class">.8</span><span class="hljs-selector-class">.0_121</span> (<span class="hljs-selector-tag">Oracle</span> <span class="hljs-selector-tag">Corporation</span> 25<span class="hljs-selector-class">.121-b13</span>)
<span class="hljs-selector-tag">OS</span>:           <span class="hljs-selector-tag">Linux</span> 4<span class="hljs-selector-class">.4</span><span class="hljs-selector-class">.0-21-generic</span> <span class="hljs-selector-tag">amd64</span></code></span></pre>


<p class="wp-block-paragraph">The version, Groovy runtime, Ant version, and JVM details will reflect what is actually installed on your system.</p>



<h2 class="wp-block-heading">Upgrading Gradle in the Future</h2>



<p class="wp-block-paragraph">Because the binary was extracted into a versioned directory (<code>/opt/gradle/gradle-X.Y.Z/</code>), upgrading is straightforward:</p>



<ol class="wp-block-list">
<li>Download the new release zip from <a href="https://gradle.org/releases/">gradle.org/releases</a>.</li>
<li>Extract it into <code>/opt/gradle/</code> alongside the existing version.</li>
<li>Update the PATH in <code>/etc/profile.d/gradle.sh</code> (or wherever you defined it) to point to the new version&#8217;s <code>bin</code> directory.</li>
<li>Re-source the profile file or log out and back in.</li>
</ol>



<p class="wp-block-paragraph">Alternatively, consider using the <a href="https://docs.gradle.org/current/userguide/gradle_wrapper.html">Gradle Wrapper</a> (<code>gradlew</code>) in your projects, which pins each project to a specific Gradle version automatically and is the approach recommended by the Gradle team for reproducible builds.</p>



<h2 class="wp-block-heading">Summary</h2>



<figure class="wp-block-table"><table><thead><tr><th>Step</th><th>Command</th></tr></thead><tbody><tr><td>Update package index</td><td><code>sudo apt-get update</code></td></tr><tr><td>Install JDK</td><td><code>sudo apt-get install openjdk-8-jdk -y</code></td></tr><tr><td>Download Gradle</td><td><code>wget https://services.gradle.org/distributions/gradle-X.Y.Z-bin.zip</code></td></tr><tr><td>Create directory</td><td><code>sudo mkdir /opt/gradle</code></td></tr><tr><td>Extract archive</td><td><code>sudo unzip -d /opt/gradle gradle-X.Y.Z-bin.zip</code></td></tr><tr><td>Set PATH</td><td><code>export PATH=$PATH:/opt/gradle/gradle-X.Y.Z/bin</code></td></tr><tr><td>Verify</td><td><code>gradle -v</code></td></tr></tbody></table></figure>



<p class="wp-block-paragraph">Gradle&#8217;s manual binary installation gives you precise version control and is straightforward to automate with configuration management tools such as Ansible or Chef for fleet deployments.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.bestdevops.com/how-to-install-gradle-on-ubuntu/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Decrease Your Gradle Build Time by Up to 65%</title>
		<link>https://www.bestdevops.com/how-to-decrease-your-gradle-build-time-by-65/</link>
					<comments>https://www.bestdevops.com/how-to-decrease-your-gradle-build-time-by-65/#respond</comments>
		
		<dc:creator><![CDATA[anil]]></dc:creator>
		<pubDate>Mon, 13 Feb 2017 05:12:45 +0000</pubDate>
				<category><![CDATA[DevOps Best Practices]]></category>
		<category><![CDATA[DevOps Process]]></category>
		<category><![CDATA[DevOps Tools]]></category>
		<category><![CDATA[Build Time]]></category>
		<category><![CDATA[Decrease]]></category>
		<category><![CDATA[DevOps]]></category>
		<category><![CDATA[Gradle]]></category>
		<category><![CDATA[Gradle Build Cycle]]></category>
		<category><![CDATA[Guide]]></category>
		<category><![CDATA[Tutorials]]></category>
		<guid isPermaLink="false">http://www.bestdevops.com/?p=625</guid>

					<description><![CDATA[Slow Gradle builds waste developer hours every week. This guide walks through proven configuration techniques — daemon, configure-on-demand, parallel builds, heap tuning, and more — that can cut Android debug build times by 65% or more.]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph"><em>This article is based on original research and benchmarks published by Keval Patel at kevalpatel2106.wordpress.com. All benchmark figures and commands are drawn from that source.</em></p>



<h2 class="wp-block-heading">Why Build Time Matters</h2>



<p class="wp-block-paragraph">Gradle is a powerful and flexible build system. For Android projects it handles compiling Java source to <code>.dex</code> bytecode, merging resources and assets, packaging everything into an <code>.apk</code>, and signing the result. That flexibility comes at a cost: Gradle is noticeably slower than some alternative build systems.</p>



<p class="wp-block-paragraph">The time lost adds up quickly. If you spend six hours a day on a project and trigger a debug build fifteen times, even a two-and-a-half-minute build time means roughly 35 minutes of idle waiting per day — around 10% of your working hours. Cutting that in half returns meaningful productive time every week.</p>



<p class="wp-block-paragraph">The benchmarks below were measured against the open-source Google I/O Android application, which contains more than 28 dependencies and 41,538 method references — a realistic, non-trivial project. The test machine was a 13-inch MacBook Pro (2016). Your results will vary depending on hardware, project size, and current Gradle version.</p>



<figure class="wp-block-image"><img decoding="async" src="https://kevalpatel2106.files.wordpress.com/2017/02/1d3wzkk8xca6siekdwgzclq.png?w=660" alt="Gradle build summary showing unoptimised build time"/></figure>



<h2 class="wp-block-heading">Baseline: Build Without Any Optimisations</h2>



<p class="wp-block-paragraph">Before making any changes, measure where you stand. The <code>--profile</code> flag tells Gradle to record the time taken by every task and write an HTML report to <code>/projectDir/build/reports/profile/</code>.</p>


<pre class="wp-block-code"><span><code class="hljs">./gradlew android:assembleDebug --profile</code></span></pre>


<p class="wp-block-paragraph">On the test machine, this produced a baseline of <strong>2 minutes 43 seconds</strong> for a full debug build. That is the number to beat.</p>



<figure class="wp-block-image"><img decoding="async" src="https://kevalpatel2106.files.wordpress.com/2017/02/1owss_jmy2f5kkozirarolg.png?w=660" alt="Gradle profile report showing baseline build time of 2 min 43 sec"/></figure>



<h2 class="wp-block-heading">Understanding the Gradle Build Lifecycle</h2>



<p class="wp-block-paragraph">Every Gradle build passes through three distinct phases:</p>



<ol class="wp-block-list">
<li><strong>Initialisation</strong> — Gradle determines which projects are part of the build.</li>
<li><strong>Configuration</strong> — Gradle evaluates every <code>build.gradle</code> script, applies plugins, and constructs the task dependency graph.</li>
<li><strong>Execution</strong> — Gradle runs the tasks identified during configuration to actually build the project.</li>
</ol>



<p class="wp-block-paragraph">Only the execution phase does real work. The first two phases are overhead that runs on every invocation. To isolate and measure that overhead, use the <code>--dry-run</code> flag, which forces Gradle to initialise and configure without executing any tasks:</p>


<pre class="wp-block-code"><span><code class="hljs">./gradlew android:assembleDebug --dry-run --profile</code></span></pre>


<p class="wp-block-paragraph">On the Google I/O project, initialisation and configuration alone consumed approximately <strong>7.8 seconds</strong> — time that could be recovered with the right settings.</p>



<h2 class="wp-block-heading">Optimisation 1: Configure on Demand</h2>



<p class="wp-block-paragraph">The Google I/O project contains two modules: <strong>android</strong> (the app) and <strong>server</strong> (backend code). When you build the Android module, Gradle still configures the server module by default — wasting roughly a second for something you do not need.</p>



<p class="wp-block-paragraph">The <code>--configure-on-demand</code> flag tells Gradle to configure only the projects actually required for the requested tasks. Test it like this:</p>


<pre class="wp-block-code"><span><code class="hljs">./gradlew android:assembleDebug --dry-run --profile --configure-on-demand</code></span></pre>


<p class="wp-block-paragraph">To make this permanent, add the following to your <code>gradle.properties</code> file:</p>


<pre class="wp-block-code"><span><code class="hljs language-javascript">org.gradle.configureondemand=<span class="hljs-literal">true</span></code></span></pre>


<p class="wp-block-paragraph">You can also enable it in Android Studio under <strong>Preferences &gt; Build, Execution, Deployment &gt; Compiler</strong> and checking <em>Configure on demand</em>.</p>



<figure class="wp-block-image"><img decoding="async" src="https://kevalpatel2106.files.wordpress.com/2017/02/1mbn53rnxiqdfeiwmp9joow.png?w=660" alt="Android Studio compiler preferences showing Configure on Demand checkbox"/></figure>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p>Benchmark result: ~1 second saved during configuration (~6% improvement on init/config overhead).</p></blockquote>



<h2 class="wp-block-heading">Optimisation 2: Enable the Gradle Daemon</h2>



<p class="wp-block-paragraph">The Gradle Daemon keeps a Gradle JVM process alive in the background between builds. Instead of starting a fresh JVM for every build invocation, subsequent builds reuse the warm process — eliminating JVM startup time and benefiting from JIT-compiled hot paths.</p>



<p class="wp-block-paragraph">The first build after enabling the daemon will not show a speedup because the daemon itself needs to start. Every subsequent build on the same machine will be significantly faster.</p>


<pre class="wp-block-code"><span><code class="hljs">./gradlew android:assembleDebug --dry-run --profile --configure-on-demand --daemon</code></span></pre>


<figure class="wp-block-image"><img decoding="async" src="https://kevalpatel2106.files.wordpress.com/2017/02/1hdjpmnafvlwiwhf4eaqj1q.png?w=660" alt="Gradle profile report showing reduced init and configuration time with daemon enabled"/></figure>



<p class="wp-block-paragraph">To enable the daemon permanently, add to <code>gradle.properties</code>:</p>


<pre class="wp-block-code"><span><code class="hljs language-javascript">org.gradle.daemon=<span class="hljs-literal">true</span></code></span></pre>


<p class="wp-block-paragraph"><strong>Note:</strong> The Gradle daemon is enabled by default from Gradle 3.0 onwards. If you are already on a modern version you may not need this setting explicitly.</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p>Benchmark result: ~4.5 seconds saved on init/config (~71% improvement on that phase).</p></blockquote>



<h2 class="wp-block-heading">Optimisation 3: Keep Gradle Up to Date</h2>



<p class="wp-block-paragraph">Each Gradle release brings performance improvements. From Gradle 2.4 onwards, Gradle caches build artifacts so that unchanged tasks are skipped on subsequent builds. Newer releases also improve incremental compilation and up-to-date checks.</p>



<p class="wp-block-paragraph">Check your current wrapper version in <code>gradle/wrapper/gradle-wrapper.properties</code> and update the <code>distributionUrl</code> to the latest stable release. You can find the current release on the official Gradle website.</p>



<figure class="wp-block-image"><img decoding="async" src="https://kevalpatel2106.files.wordpress.com/2017/02/177iuk0yxgucrmctpnhpexg.png?w=660" alt="gradle-wrapper.properties file showing distributionUrl set to Gradle 3.3"/></figure>



<p class="wp-block-paragraph">After updating the wrapper and re-running with daemon and configure-on-demand, the combined init/config overhead dropped further.</p>



<figure class="wp-block-image"><img decoding="async" src="https://kevalpatel2106.files.wordpress.com/2017/02/1s4ymdqiraagpzy_h6yja8a.png?w=660" alt="Gradle profile showing further reduced configuration time after upgrading Gradle version"/></figure>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p>Benchmark result: ~0.7 seconds additional saving on init/config, for a combined ~82% reduction in that phase.</p></blockquote>



<h2 class="wp-block-heading">Optimisation 4: Increase the JVM Heap Size (Dex In Process)</h2>



<p class="wp-block-paragraph">From Android Studio 2.0 onwards (requiring build tools 23.0.2 or higher), the Android Gradle plugin supports <em>dex in process</em>. Previously, each <code>dx</code> (dexing) step spawned a separate JVM process. With dex in process, all <code>dx</code> work runs inside the same JVM as the Gradle daemon, eliminating the overhead of spawning and communicating with child processes.</p>



<figure class="wp-block-image"><img decoding="async" src="https://kevalpatel2106.files.wordpress.com/2017/02/1l-xjgmxywgvmqyerq7klzw.png?w=660" alt="Diagram showing multiple separate dx processes before dex-in-process"/></figure>



<figure class="wp-block-image"><img decoding="async" src="https://kevalpatel2106.files.wordpress.com/2017/02/16jrzzijrnkhphlbyuilafq.png?w=660" alt="Diagram showing unified dex-in-process architecture sharing a single JVM with Gradle daemon"/></figure>



<p class="wp-block-paragraph">Because dex and Gradle now share a single JVM, that JVM needs more heap space. The default daemon heap is approximately 1 GB, which is often too small. Add the following to <code>gradle.properties</code> to increase it:</p>


<pre class="wp-block-code"><span><code class="hljs">org.gradle.jvmargs=-Xmx3072m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8</code></span></pre>


<p class="wp-block-paragraph">The right value depends on your machine&#8217;s available RAM and project size. The original author found 3 GB effective for the Google I/O project; increasing beyond that showed diminishing returns on their hardware. Tune this value for your own environment.</p>



<p class="wp-block-paragraph">Running a full clean debug build with these settings combined:</p>


<pre class="wp-block-code"><span><code class="hljs">./gradlew android:assembleDebug --profile --configure-on-demand --daemon</code></span></pre>


<figure class="wp-block-image"><img decoding="async" src="https://kevalpatel2106.files.wordpress.com/2017/02/12bi_rwf7yseveu-icl7nwg.png?w=660" alt="Gradle profile showing full build time reduced to approximately 1 minute"/></figure>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p>Benchmark result: Full build dropped from 2 min 43 sec to approximately 1 min — a 63% reduction.</p></blockquote>



<h2 class="wp-block-heading">Optimisation 5: Modularise and Parallelise Your Build</h2>



<p class="wp-block-paragraph">If your project has multiple independent modules, Gradle can build them in parallel rather than sequentially. Enable this with:</p>


<pre class="wp-block-code"><span><code class="hljs language-javascript">org.gradle.parallel=<span class="hljs-literal">true</span></code></span></pre>


<p class="wp-block-paragraph">The more independent modules your project has, the greater the benefit. For single-module projects or tightly coupled modules, the gain will be minimal. The Google I/O benchmark showed a marginal additional improvement at this stage (cumulative total ~64.5% reduction), because the project does not have many independent subprojects.</p>



<p class="wp-block-paragraph">To maximise the benefit from parallel builds, deliberately structure your codebase into independent feature or library modules that have no circular dependencies on one another.</p>



<figure class="wp-block-image"><img decoding="async" src="https://kevalpatel2106.files.wordpress.com/2017/02/1ynjye8u214hg_4ahinxn1w.png?w=660" alt="Gradle profile showing build time with parallel builds enabled"/></figure>



<h2 class="wp-block-heading">Other Small but Useful Practices</h2>



<h3 class="wp-block-heading">Avoid Heavy Computations in Build Scripts</h3>



<p class="wp-block-paragraph">Configuration-phase code in <code>build.gradle</code> runs on every build. Expensive operations — such as executing a shell command to count Git commits for a version code, or downloading a file from a remote URL — add latency to every single build invocation. Move such operations out of the configuration phase or cache their results.</p>



<h3 class="wp-block-heading">Avoid Dynamic Dependency Versions</h3>



<p class="wp-block-paragraph">Using a trailing <code>+</code> in a dependency version string forces Gradle to contact the remote repository on every build to check for a newer version:</p>


<pre class="wp-block-code"><span><code class="hljs language-php"><span class="hljs-comment"># Avoid this — triggers a network round-trip on every build</span>
compile <span class="hljs-string">'com.android.support:appcompat-v7:23.0.+'</span></code></span></pre>


<p class="wp-block-paragraph">Pin to an exact version instead, and update dependencies deliberately:</p>


<pre class="wp-block-code"><span><code class="hljs language-php"><span class="hljs-comment"># Prefer this — resolved from cache</span>
compile <span class="hljs-string">'com.android.support:appcompat-v7:23.0.2'</span></code></span></pre>


<h2 class="wp-block-heading">TL;DR — The Complete gradle.properties Configuration</h2>



<p class="wp-block-paragraph">Add the following lines to your project&#8217;s <code>gradle.properties</code> file to apply all of the above optimisations at once:</p>


<pre class="wp-block-code"><span><code class="hljs language-php"><span class="hljs-comment"># Keep the Gradle JVM alive between builds</span>
org.gradle.daemon=<span class="hljs-keyword">true</span>

<span class="hljs-comment"># Only configure projects needed for the requested tasks</span>
org.gradle.configureondemand=<span class="hljs-keyword">true</span>

<span class="hljs-comment"># Build independent modules in parallel</span>
org.gradle.parallel=<span class="hljs-keyword">true</span>

<span class="hljs-comment"># Increase heap to support dex-in-process</span>
<span class="hljs-comment"># Adjust -Xmx to suit your machine's available RAM</span>
org.gradle.jvmargs=-Xmx3072m -XX:MaxPermSize=<span class="hljs-number">512</span>m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF<span class="hljs-number">-8</span></code></span></pre>


<p class="wp-block-paragraph">These settings, combined with keeping your Gradle wrapper version current and pinning dependency versions, produced a roughly <strong>65% reduction</strong> in debug build time on the Google I/O project in the original benchmarks.</p>



<h2 class="wp-block-heading">Summary of Benchmark Results</h2>



<figure class="wp-block-table"><table><thead><tr><th>Optimisation applied</th><th>Measured saving</th></tr></thead><tbody><tr><td>Configure on demand</td><td>~1 s (6% of init/config time)</td></tr><tr><td>+ Gradle Daemon</td><td>~4.5 s (71% of init/config time)</td></tr><tr><td>+ Updated Gradle version</td><td>~0.7 s additional (82% cumulative)</td></tr><tr><td>+ Increased heap / dex in process (full build)</td><td>1 min 43 s saved (63% of total build)</td></tr><tr><td>+ Parallel builds</td><td>~64.5% cumulative total build reduction</td></tr></tbody></table></figure>



<p class="wp-block-paragraph"><em>All figures are from benchmarks run on a 13-inch MacBook Pro (2016) against the Google I/O open-source Android project. Results on your hardware and project will differ.</em></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.bestdevops.com/how-to-decrease-your-gradle-build-time-by-65/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
