Skip to content

arsysop/liho-gradle-plugin

Repository files navigation

liho-gradle-plugin

Build Hits-of-Code

Standalone Plug-in for Gradle, who's work is to employ LiHo checker to verify if a project source base is sufficiently equipped with license headers.

Currently is under construction.

to publish

./gradlew publish

It builds and stores publish-ready artifacts into buildDir/local-repo.

to apply

  1. apply the plugin in plugins block of your build.gradle
    plugins {
        id("ru.arsysop.liho.liho-gradle-plugin") version "0.1"
    }
    As the plugin is published without plugin marker, configure resolution strategy in your settings.gradle script:
     pluginManagement {
         repositories {
             jcenter()
         }
         resolutionStrategy {
             eachPlugin {
                 if (requested.id.namespace == "ru.arsysop.liho" &&
                     requested.id.name == "liho-gradle-plugin"
                 ) {
                     useModule("ru.arsysop.liho:liho-gradle-plugin:${requested.version}")
                 }
             }
         }
     }
  2. configure plugin extension in your build.gradle:
    liho {
        root.set(project.file("src"))
        strict.set(true)
        report.set(project.file("$buildDir/liho/report.txt"))
    }
  3. run liho task:
    ./gradlew liho
    
    It analyses all the supported types of sources and stores report into the configured liho/report file