Is building from the terminal faster than Android Studio?

Nelson Osacky
Sep 28 · 5 min read

Injected Properties

for (def prop : project.properties) {
if (prop.key.startsWith('android.injected')) {
println(prop)
}
}
android.injected.invoked.from.ide=true
android.injected.build.abi=x86
android.injected.build.density=420dpi
android.injected.build.api=28
buildScan {
if (project.hasProperty("android.injected.invoked.from.ide")) {
tag 'AndroidStudio'
} else {
tag 'Cmd'
}
}
// Upgrade from legacy multi-dex to native multi-dex if possible when using with a device
if (dexingType == DexingType.LEGACY_MULTIDEX) {
if (variantScope.getVariantConfiguration().isMultiDexEnabled()
&& variantScope
.getVariantConfiguration()
.getMinSdkVersionWithTargetDeviceApi()
.getFeatureLevel()
>= 21) {
dexingType = DexingType.NATIVE_MULTIDEX;
}
}

Instant Run

android.optional.compilation=INSTANT_DEV
def instantRun = project.getProperties().get("android.optional.compilation")?.contains("INSTANT_DEV")if (instantRun) {  throw new IllegalStateException("Disable Instant Run: Android Studio -> Preferences -> Build, Execution, Deployment -> Instant Run")}

Built-in JDK

JDK Location

Which is faster?

Nelson Osacky

Written by

Android @ SoundCloud in Berlin. Former Square. Lover of chocolate and running. osacky.com

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade