f4lco / jqassistant-gradle-plugin

Gradle Plugin for jQAssistant

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

jQAssistant Gradle plugin

This is the first snapshot of a Gradle plugin for jQAssistant. Currently supported are:

  • all jQAssistant tasks: scan, analyze, server, report, available-scopes, available-rules, effective-rules

  • giving any options defined for the CLI

  • configuring the jQAssistant version (default is 1.7.0)

  • configuring additional plugins (Java plugin is added by default)

  • configuring additional artifacts to be scanned (Java compile output is added by default)

  • single module and multi module projects

Usage

Add in your Gradle project in question the plugin via

plugins {
    id "de.kontext_e.jqassistant.gradle" version "1.0.0-SNAPSHOT"
}

or

buildscript {
    repositories {
        mavenLocal()
    }
    dependencies {
        classpath 'de.kontext_e.jqassistant.gradle:jqassistant-gradle-plugin:1.0.0-SNAPSHOT'
    }
}

and apply the plugin

apply plugin: 'de.kontext_e.jqassistant.gradle'

Now you can simply call

./gradlew scan

or

./gradlew analyze

Configuration

You can go with the defaults or configure the plugin, e.g. this way:

project.ext["jqaversion"] = "1.7.0"
project.ext["kejqapluginversion"] = "1.7.0"
jqassistant {
    toolVersion = "${project.jqaversion}"
    plugins "com.buschmais.jqassistant.plugin:junit:${project.jqaversion}"
    plugins "de.kontext-e.jqassistant.plugin:jqassistant.plugin.git:${project.kejqapluginversion}"
    options "-reset"
    scanDirs ".git"
}

Note that if you have multiple options or scanDirs, just add multiple lines as seen with plugins, e.g.

scanDirs ".git"
scanDirs "doc/arc42"

Tested Gradle Versions

  • 5.6.3: works

  • 5.5.1: works

  • 5.4.1: works

  • 5.3.1: works

  • 5.2.1: works

  • 5.1.1: works

  • 5.0: works

  • 4.10: works

  • 4.9 and below: does not work

Tested jQAssistant Versions

  • 1.7.0: works

  • 1.6.0: works

  • 1.5.0: works

  • 1.4.0: works

  • 1.3.0: Gradle plugin works, but used Neo4j Version throws an exception

  • 1.2.0: works

About

Gradle Plugin for jQAssistant


Languages

Language:Java 100.0%