com.likethesalad.placeholder.data.Constants.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of string-reference Show documentation
Show all versions of string-reference Show documentation
This is a Gradle plugin for Android applications which resolves XML string references in other XML strings.
package com.likethesalad.placeholder.data
class Constants {
companion object {
const val TEMPLATE_STRING_PREFIX = "template_"
val TEMPLATE_STRING_PREFIX_REGEX = Regex("^$TEMPLATE_STRING_PREFIX")
val TEMPLATE_STRING_REGEX = Regex("^$TEMPLATE_STRING_PREFIX[a-zA-Z][a-zA-Z0-9_]*")
val PLACEHOLDER_REGEX = Regex("\\$\\{([a-zA-Z0-9_]+)}")
val TEMPLATE_AS_PLACEHOLDER_REGEX = Regex("\\\$\\{($TEMPLATE_STRING_PREFIX[a-zA-Z0-9_]+)}")
const val XML_STRING_TAG = "string"
const val XML_RESOURCES_TAG = "resources"
}
}