aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarsh Shandilya <me@msfjarvis.dev>2020-09-20 22:43:31 +0530
committerHarsh Shandilya <me@msfjarvis.dev>2020-09-20 22:43:31 +0530
commit7a3274b06d276dc98436b6b5cf6d1f8c484662eb (patch)
tree1c8f169d7975aa4b9e65fab286f5287d2f7d926c
parente212404dbecfacbb3b72dfcfdf710ee1e5c85d76 (diff)
gradle: update properties list for build improvements
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
-rw-r--r--app/build.gradle.kts1
-rw-r--r--gradle.properties52
2 files changed, 40 insertions, 13 deletions
diff --git a/app/build.gradle.kts b/app/build.gradle.kts
index 3f1a5a5d..326233dc 100644
--- a/app/build.gradle.kts
+++ b/app/build.gradle.kts
@@ -27,6 +27,7 @@ android {
adbOptions.installOptions("--user 0")
buildFeatures.viewBinding = true
+ buildFeatures.buildConfig = true
defaultConfig {
applicationId = "dev.msfjarvis.aps"
diff --git a/gradle.properties b/gradle.properties
index ca214f0f..99dc45a1 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -2,24 +2,50 @@
# Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved.
# SPDX-License-Identifier: GPL-3.0-only
#
+org.gradle.parallel=true
+org.gradle.configureondemand=true
+org.gradle.caching=true
-# AndroidX
-android.enableJetifier=false
-android.useAndroidX=true
+# Enabling filesystem watching
+org.gradle.vfs.watch=true
+org.gradle.unsafe.watch-fs=true
-# R8 Full mode
-android.enableR8.fullMode=true
+# Enable Kotlin incremental compilation
+kotlin.incremental=true
-# Disable warnings for experimental options
-android.suppressUnsupportedOptionWarnings=android.suppressUnsupportedOptionWarnings,android.enableR8.fullMode,android.useMinimalKeepRules,android.namespacedRClass
+# Enable parallel tasks execution for Kotlin Gradle plugin
+kotlin.parallel.tasks.in.project=true
-# https://jakewharton.com/increased-accuracy-of-aapt2-keep-rules/
-android.useMinimalKeepRules=true
+# Kotlin code style
+kotlin.code.style=official
+
+# Enable incremental annotation processor for KAPT
+kapt.incremental.apt=true
+
+# Turn off AP discovery in compile path to enable compile avoidance
+kapt.include.compile.classpath=false
+
+# Use R8 instead of ProGuard for code shrinking.
+android.enableR8.fullMode=true
+
+# Enable AndroidX
+android.useAndroidX=true
-# Enable rudimentary R class namespacing where each library only contains
+# Enable non-transitive R class namespacing where each library only contains
# references to the resources it declares instead of declarations plus all
# transitive dependency references.
-android.namespacedRClass=true
+android.nonTransitiveRClass=true
-# Gradle FS watching
-org.gradle.unsafe.watch-fs=true
+# Only keep the single relevant constructor for types mentioned in XML files
+# instead of using a parameter wildcard which keeps them all.
+android.useMinimalKeepRules=true
+
+# Enable resource optimizations for release build
+android.enableResourceOptimizations=true
+
+# Default Android build features
+android.defaults.buildfeatures.buildconfig=false
+android.defaults.buildfeatures.aidl=false
+android.defaults.buildfeatures.renderscript=false
+android.defaults.buildfeatures.resvalues=false
+android.defaults.buildfeatures.shaders=false