Skip to content

Commit

Permalink
Merge pull request #21436 from wordpress-mobile/enable_configuration_…
Browse files Browse the repository at this point in the history
…cache

Enable configuration cache
  • Loading branch information
wzieba authored Nov 11, 2024
2 parents b3945a1 + 88932b7 commit e394132
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .configure
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"project_name": "WordPress-Android",
"branch": "trunk",
"pinned_hash": "4b536af182cc61c263b07262e41c141f06fd5de6",
"pinned_hash": "04a650613d9f0bb3fde8f0961e2494343f0df26d",
"files_to_copy": [
{
"file": "android/WPAndroid/gradle.properties",
Expand Down
Binary file modified .configure-files/gradle.properties.enc
Binary file not shown.
21 changes: 14 additions & 7 deletions WordPress/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
}
Expand Down
1 change: 1 addition & 0 deletions gradle.properties-example
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down

0 comments on commit e394132

Please sign in to comment.