From 50dd3e501bfb0ca1e3aecb2cbebf7a9d00dff1b2 Mon Sep 17 00:00:00 2001 From: Wojtek Zieba Date: Thu, 7 Nov 2024 14:10:13 +0100 Subject: [PATCH 1/3] Enable configuration cache in gradle.properties-example --- gradle.properties-example | 1 + 1 file changed, 1 insertion(+) diff --git a/gradle.properties-example b/gradle.properties-example index 4fef2c46ec7b..78cd91a8ebb9 100644 --- a/gradle.properties-example +++ b/gradle.properties-example @@ -6,6 +6,7 @@ org.gradle.jvmargs=-Xmx6g -XX:+HeapDumpOnOutOfMemoryError org.gradle.parallel=true org.gradle.configureondemand=true org.gradle.caching=true +org.gradle.configuration-cache=true # WordPress-Android properties. From 8323e2fbe83069bc279e43ec86b060247d4f4920 Mon Sep 17 00:00:00 2001 From: Wojtek Zieba Date: Thu, 7 Nov 2024 14:54:55 +0100 Subject: [PATCH 2/3] Update secret gradle.properties that enables configuration cache --- .configure | 2 +- .configure-files/gradle.properties.enc | Bin 3744 -> 3792 bytes 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/.configure b/.configure index 9abd2a6ba5c6..4e456c47d9eb 100644 --- a/.configure +++ b/.configure @@ -1,7 +1,7 @@ { "project_name": "WordPress-Android", "branch": "trunk", - "pinned_hash": "4b536af182cc61c263b07262e41c141f06fd5de6", + "pinned_hash": "04a650613d9f0bb3fde8f0961e2494343f0df26d", "files_to_copy": [ { "file": "android/WPAndroid/gradle.properties", diff --git a/.configure-files/gradle.properties.enc b/.configure-files/gradle.properties.enc index cfe19b47de6be594229fb660683145deae33d893..681bded28e524d1ee0d102700debdf016fd742ea 100644 GIT binary patch delta 3523 zcmV;!4LtIo9nc-HFadwhLNF#xqS$w~NaQWW2wY^jrFrWzKh!t2D+X1@tm^NRC{{{U ztC7l*0aQ8V$K0k;ZY{II^>>~8m+Zg1Q;LRjm%WwQWKwH`FAfd6iLAhbHacaj_n!lD z1W8oBah_)vetfw*NaCfR(xS_nF#I-7q}EbOs>|K2~zb$`D- zjf){v+5=7Kg=-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}l?bo)HDt&+J7=jbL6jy9mT7v4;1yF$E0r}&(bV>tDwB~9?i1MFj0Q7E# z&Q?fc7_129fFSBQiCe;{s4@cr7FF8n#*~Yixib-Ed{?jt7revW&e2UeQ=DpHA*NvP%H<1O;bzgA)H;jXh{}>W B#ialM From 5d936212df2d7c0eb23588cc5739ea7e8c74cb45 Mon Sep 17 00:00:00 2001 From: Wojtek Zieba Date: Thu, 7 Nov 2024 15:43:15 +0100 Subject: [PATCH 3/3] Rewrite print tasks to support configuration cache Access the ApplicationExtension during configuration, not execution time --- WordPress/build.gradle | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/WordPress/build.gradle b/WordPress/build.gradle index 1735e9f7ddf0..db57f4340a54 100644 --- a/WordPress/build.gradle +++ b/WordPress/build.gradle @@ -590,25 +590,32 @@ if ((file('google-services.json').text) == (file('google-services.json-example') } tasks.register("printVersionName") { + def versionName = android.defaultConfig.versionName doLast { - println android.defaultConfig.versionName + println versionName } } tasks.register("printAllVersions") { + def versions = android.applicationVariants.collect { + [it.name, it.versionName, it.versionCode] + } + doLast { - android.applicationVariants.all { variant -> - println "${variant.name}: ${variant.versionName} (${variant.versionCode})" + versions.each { name, versionName, versionCode -> + println "$name: $versionName ($versionCode)" } } } tasks.register("printResourceConfigurations") { + def flavorInfo = android.productFlavors + .findAll { it.dimension == "app" } + .collect { [it.name, it.resourceConfigurations] } + doLast { - android.productFlavors.each { flavor -> - if (flavor.dimension == "app") { - println "${flavor.name}: ${flavor.resourceConfigurations}" - } + flavorInfo.each { name, resourceConfigurations -> + println "$name: $resourceConfigurations" } } }