mirror of
https://github.com/HighCapable/Gropify.git
synced 2025-12-11 15:53:54 +08:00
refactor: add unsafe ext name in ExtensionAware
This commit is contained in:
@@ -126,7 +126,14 @@ internal fun Any.asExtension() = this as? ExtensionAware? ?: Gropify.error("This
|
|||||||
* @receiver [String]
|
* @receiver [String]
|
||||||
* @return [Boolean]
|
* @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,
|
* Since Gradle has an [ExtensionAware] extension,
|
||||||
|
|||||||
Reference in New Issue
Block a user