aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorHarsh Shandilya <me@msfjarvis.dev>2020-12-22 16:22:19 +0530
committerHarsh Shandilya <me@msfjarvis.dev>2021-06-16 11:09:29 +0530
commit276ce1364fb0273df22707dc3afc5824a97a9d43 (patch)
tree378fd722960c9563270983782470a0f0aea11360
parentbuild: drop obsolete dependency substitution (diff)
downloadwireguard-android-276ce1364fb0273df22707dc3afc5824a97a9d43.tar.xz
wireguard-android-276ce1364fb0273df22707dc3afc5824a97a9d43.zip
gradle: update property set with AGP 7 experimental flags
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
-rw-r--r--gradle.properties59
-rw-r--r--tunnel/build.gradle3
-rw-r--r--ui/build.gradle7
-rw-r--r--ui/src/main/res/values/dimens.xml2
4 files changed, 44 insertions, 27 deletions
diff --git a/gradle.properties b/gradle.properties
index efed7483..4673ec07 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -1,33 +1,48 @@
-# Project-wide Gradle settings.
+org.gradle.parallel=true
+org.gradle.configureondemand=true
+org.gradle.caching=true
-# IDE (e.g. Android Studio) users:
-# Gradle settings configured through the IDE *will override*
-# any settings specified in this file.
+# Enable Kotlin incremental compilation
+kotlin.incremental=true
-# For more details on how to configure your build environment visit
-# http://www.gradle.org/docs/current/userguide/build_environment.html
+# Enable parallel tasks execution for Kotlin Gradle plugin
+kotlin.parallel.tasks.in.project=true
-# Specifies the JVM arguments used for the daemon process.
-# The setting is particularly useful for tweaking memory settings.
-android.enableJetifier=true
-android.useAndroidX=true
-org.gradle.jvmargs=-Xmx1536m
+# Kotlin code style
+kotlin.code.style=official
-# When configured, Gradle will run in incubating parallel mode.
-# This option should only be used with decoupled projects. More details, visit
-# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
-# org.gradle.parallel=true
+# Turn off AP discovery in compile path to enable compile avoidance
+kapt.include.compile.classpath=false
-# https://jakewharton.com/increased-accuracy-of-aapt2-keep-rules/
-android.useMinimalKeepRules=true
+# Enable AndroidX and Jetifier
+android.useAndroidX=true
+android.enableJetifier=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
-
-# Suppress warnings for some features that aren't yet stabilized
-android.suppressUnsupportedOptionWarnings=android.enableR8.fullMode,android.useMinimalKeepRules,android.namespacedRClass,android.suppressUnsupportedOptionWarnings
+android.nonTransitiveRClass=true
+
+# Experimental flags from AGP 7.1.0
+# Generate compile-time only R class for app modules.
+android.enableAppCompileTimeRClass=true
+android.keepWorkerActionServicesBetweenBuilds=true
+android.nonFinalResIds=true
+android.enableRTxtResourceShrinking=true
+android.enablePartialRIncrementalBuilds=true
+android.experimental.enableNewResourceShrinker=true
+android.experimental.enableNewResourceShrinker.preciseShrinking=true
+android.generateManifestClass=true
+android.experimental.enableSourceSetPathsMap=true
+android.experimental.cacheCompileLibResources=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
+android.library.defaults.buildfeatures.androidresources=false
# OSSRH sometimes struggles with slow deployments, so this makes Gradle
# more tolerant to those delays.
diff --git a/tunnel/build.gradle b/tunnel/build.gradle
index 28d02804..026d9541 100644
--- a/tunnel/build.gradle
+++ b/tunnel/build.gradle
@@ -20,9 +20,6 @@ android {
path 'tools/CMakeLists.txt'
}
}
- libraryVariants.all {
- it.generateBuildConfigProvider.configure { enabled = false }
- }
testOptions.unitTests.all {
testLogging {
events 'passed', 'skipped', 'failed', 'standardOut', 'standardError'
diff --git a/ui/build.gradle b/ui/build.gradle
index 6bf39bfa..5e9018a3 100644
--- a/ui/build.gradle
+++ b/ui/build.gradle
@@ -11,8 +11,11 @@ final def keystorePropertiesFile = rootProject.file("keystore.properties")
android {
compileSdkVersion 30
- buildFeatures.dataBinding = true
- buildFeatures.viewBinding = true
+ buildFeatures {
+ buildConfig = true
+ dataBinding = true
+ viewBinding = true
+ }
defaultConfig {
applicationId 'com.wireguard.android'
minSdkVersion 21
diff --git a/ui/src/main/res/values/dimens.xml b/ui/src/main/res/values/dimens.xml
index c6abf8eb..8f951408 100644
--- a/ui/src/main/res/values/dimens.xml
+++ b/ui/src/main/res/values/dimens.xml
@@ -6,4 +6,6 @@
<dimen name="normal_margin">8dp</dimen>
<dimen name="bottom_sheet_top_padding">8dp</dimen>
<dimen name="bottom_sheet_icon_padding">16dp</dimen>
+ <!-- Imported from MDC to respect R class isolation -->
+ <dimen name="design_fab_size_normal">56dp</dimen>
</resources>