dagger.hilt.android.plugin.util.Files.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hilt-android-gradle-plugin Show documentation
Show all versions of hilt-android-gradle-plugin Show documentation
A fast dependency injector for Android and Java.
package dagger.hilt.android.plugin.util
import com.android.SdkConstants
import java.io.File
import java.util.zip.ZipEntry
/* Checks if a file is a .class file. */
fun File.isClassFile() = this.isFile && this.extension == SdkConstants.EXT_CLASS
/* Checks if a Zip entry is a .class file. */
fun ZipEntry.isClassFile() = !this.isDirectory && this.name.endsWith(SdkConstants.DOT_CLASS)
/* CHecks if a file is a .jar file. */
fun File.isJarFile() = this.isFile && this.extension == SdkConstants.EXT_JAR