com.likethesalad.placeholder.data.helpers.wrappers.AndroidSourceSetWrapper.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.helpers.wrappers
class AndroidSourceSetWrapper(private val androidSourceSet: Any) {
private val clazz = androidSourceSet.javaClass
private val getResMethod by lazy { clazz.getMethod("getRes") }
private val getNameMethod by lazy { clazz.getMethod("getName") }
fun getRes(): AndroidSourceDirectorySetWrapper {
return AndroidSourceDirectorySetWrapper(getResMethod.invoke(androidSourceSet))
}
fun getName(): String {
return getNameMethod.invoke(androidSourceSet) as String
}
}