gradle, add task to print variables.

This commit is contained in:
me committed 2026-09-29 15:49:49 -07:00
1 parent 05f1b68d3f
commit 085031bc26
1 file changed
+24 -2
+24 -2
View File
@@ -15,8 +15,6 @@ android {
compileSdk = flutter.compileSdkVersion
ndkVersion = flutter.ndkVersion
compileOptions {
isCoreLibraryDesugaringEnabled = true
targetCompatibility = JavaVersion.VERSION_17
@@ -77,3 +75,27 @@ dependencies {
flutter {
source = "../.."
}
/// To use this, first be in $PROJ/android/, then run: ./gradlew printFlutterVariables
tasks.register("printFlutterVariables") {
description = "Print Local Flutter Variables"
doLast {
// android //
// compileSdk = flutter.compileSdkVersion
println("compileSdk: ${android.compileSdk}")
println("compileSdkVersion: ${android.compileSdkVersion}")
// ndkVersion = flutter.ndkVersion
println("ndkVersion: ${android.ndkVersion}")
// android.defaultConfig //
// minSdk = flutter.minSdkVersion
println("minSdk: ${android.defaultConfig.minSdk}")
// targetSdk = flutter.targetSdkVersion
println("targetSdk: ${android.defaultConfig.targetSdk}")
println("targetSdkVersion: ${android.defaultConfig.targetSdkVersion}")
// versionCode = flutter.versionCode
println("versionCode: ${android.defaultConfig.versionCode}")
// versionName = flutter.versionName
println("versionName: ${android.defaultConfig.versionName}")
}
}