Is your Gradle build taking too long time? These 10 ideas can help you to optimize your Gradle build on android and non-android projects.
You can read Part I of this article here:
Every time you apply a plugin to a project, you are increasing the Gradle configuration time
. You are also wasting time downloading the plugin dependencies and all their transitives.
Given that lots of plugins are only needed by certain environments, applying them wisely is a good idea to speed up your build times.
This 5 steps guide, shows you how to easily enable/disable plugins for each environment…
Every time you apply a plugin to a project, you are increasing the Gradle configuration time
.
Configuration Phase
During this phase the project objects are configured. The build scripts of all projects which are part of the build are executed.
You are also wasting time downloading the plugin dependencies and all their transitives. Gradle cache can skip that but not always: you still have to download the dependencies the first time and when you upgrade the plugin.
Given that lots of plugins are only needed by certain environments, applying them wisely is a good idea to speed up your build…
Is your Gradle build taking too long time? These 10 ideas can help you to optimize your Gradle build on android and non-android projects.
You can read Part II of this article here:
If you stay up to date with your dependencies, you will get all the enhancements and optimizations they have to offer. Using the latest Gradle
, Android Gradle plugin
& Kotlin Gradle plugin
versions can help a lot. But other dependencies upgrades, mainly Gradle plugins, are also important.
Keeping your Gradle project dependencies up to date can be a huge manual task if you have a big project…
You can set breakpoints and debug:
buildSrc
directorybuild.gradle.kts
file on your project (only if you use Kotlin DSL
)The first step is to create a new Remote Configuration
in IntelliJ
/ Android Studio
on the project you want to debug.
Go to the configurations icon, and click on Edit configurations…
You can set in-app default parameter values in the Remote Config
object, so that your app behaves as intended before it connects to the Remote Config
backend, and so that default values are available if none are set in the backend. Please, don’t forget to do this.
Firebase.remoteConfig.apply {
setDefaultsAsync(mapOf(
"key" to "default_value"
))
}
ThefetchAndActivate()
or fetch()
functions on FirebaseRemoteConfig
can fail if the user is not having an internet connection when invoking them. If the fetch failed, then you are going to get the following exception:
com.google.firebase.remoteconfig.FirebaseRemoteConfigClientException: The client had an error while calling the backend!
It’s a…
As you may know, all the projects have some kind of tech debt. It’s normal, not a signal of bad developers. It’s also important to understand that even if you don’t touch your code for a while, your tech debt can increase. This can sound strange but constantly there are:
Tech debt managment should be a top priority on any development team. If you don’t have an effective process to handle this, your tech debt is going…
Summary of “How to Stop Worrying and Start Living” book by Dale Carnegie
The book’s goal is to lead the reader to a more enjoyable and fulfilling life, helping them to become more aware of, not only themselves, but others around them. Dale Carnegie tries to address the everyday nuances of living, in order to get the reader to focus on the more important aspects of life.
Dale Carnegie shows how worry has been conquered by thousands, some famous, but most just ordinary people, and offers practical suggestions for leading a more positive and enjoyable life.
This article contains Affiliate…
Sometimes you need to quickly change the resource class you use on your job’s executor. For example, you could need to do that to measure the performance impact or because you need more memory/CPU.
You can simplify those changes by defining one executor per resource class. Each executor could have for example custom GRADLE_OPTS
defined.
references: android_config: &android_config
working_directory: "/path"
docker:
- image: circleci/android:api-30executors: android_executor_small:
<<: *android_config
resource_class: small
GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx2g -XX:MaxPermSize=2g" android_executor_medium:
<<: *android_config
resource_class: medium
GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx4g -XX:MaxPermSize=4g" android_executor_medium_plus:
<<: *android_config
resource_class: medium+
GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx6g -XX:MaxPermSize=6g"
Not all the docker images use the same default user home…
Jetpack is a set of libraries, tools, and guidance to help you write high-quality apps more easily. Jetpack makes coding easier through best practices, limiting boilerplate code, and simplifying complex tasks. All with the goal of enabling you to focus on the code that you really care about.
AndroidX is the package name for all the libraries within Jetpack. Think of AndroidX as the open-source project used to develop, test, version, and release Jetpack libraries.
Back at I/O 2018, Google announced that Support Library would be refactored into the AndroidX namespace, which was completed with Support Library 28 and the…
Flutter is Google’s UI toolkit for building beautiful, natively compiled applications for mobile, web, and desktop from a single codebase.
This is a summary of all the official development resources distributed across different channels.