fix: address logically incorrect config values in app/build.gradle.kts#17
Conversation
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Sorry @HereLiesAz, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
There was a problem hiding this comment.
Code Review
This pull request refactors app/build.gradle.kts to use dynamic versioning variables and modifies the loading of local properties. The review feedback suggests removing a redundant import and reverting the scope of the local properties file variable to maintain a cleaner script namespace.
| @@ -1,3 +1,5 @@ | |||
| import java.util.Properties | |||
| val localPropertiesFile = project.rootProject.file("local.properties") | ||
| val localProperties = Properties().apply { | ||
| val localPropertiesFile = project.rootProject.file("local.properties") | ||
| if (localPropertiesFile.exists()) { | ||
| localPropertiesFile.inputStream().use { load(it) } | ||
| } |
There was a problem hiding this comment.
Moving localPropertiesFile to the script scope is unnecessary if it is only used to load the localProperties object. It is better to keep its scope restricted to the apply block to avoid polluting the script's namespace. Additionally, project.rootProject can be simplified to rootProject as the project prefix is redundant in this context.
val localProperties = Properties().apply {
val localPropertiesFile = rootProject.file("local.properties")
if (localPropertiesFile.exists()) {
localPropertiesFile.inputStream().use { load(it) }
}
}
No description provided.