Skip to content

neva-dev/gitignore-file-filter

Repository files navigation

Neva Development logo

Download Gradle Status Apache License, Version 2.0, January 2004

GitIgnore File Filter

Description

It is a reusable Java wrapper for GitIgnore file exclusion mechanism extracted from NetBeans Git Module.

Useful for Java applications or libraries which wants to use GitIgnore like file filtering.

Supports nested .gitignore files.

Setup

  1. Enter BinTray and setup repository and compile dependency in project build.
  2. Consider sample Kotlin code:
val rootDir = File("/some/root")
val sampleFile = File("class/SomeClass.class", rootDir)
val gitIgnore = GitIgnore(rootDir)

if (gitIgnore.isExcluded(sampleFile)) {
    // ...
}

License

GitIgnore File Filter is licensed under the Apache License, Version 2.0 (the "License")