refactor: add unsafe ext name in ExtensionAware

This commit is contained in:
2025-11-15 23:05:54 +08:00
parent 10f34148a7
commit 8d16f24098

View File

@@ -126,7 +126,14 @@ internal fun Any.asExtension() = this as? ExtensionAware? ?: Gropify.error("This
* @receiver [String]
* @return [Boolean]
*/
internal fun String.isUnSafeExtName() = camelcase().let { it == "ext" || it == "extra" || it == "extraProperties" || it == "extensions" }
internal fun String.isUnSafeExtName() = camelcase().let {
it == "ext" ||
it == "extra" ||
it == "extraProperties" ||
it == "extensions" ||
it == "libs" ||
it == "versionCatalogs"
}
/**
* Since Gradle has an [ExtensionAware] extension,