project.ext["jqaversion"] = "1.8.0" project.ext["kejqapluginversion"] = "1.8.0" repositories { mavenCentral() } configurations { jqa } dependencies { jqa("com.buschmais.jqassistant.cli:jqassistant-commandline-neo4jv3:${project.jqaversion}") { exclude module: 'asm' } // in case you want to use the APOC plugin, neo4j-java-driver has to be downgraded jqa("org.neo4j.driver:neo4j-java-driver:1.7.5") { // to resolve incompatible driver versions between CLI and APOC force = true } jqa("org.jqassistant.contrib.plugin:jqassistant-apoc-plugin:${project.jqaversion}") // list here all the plugins you want to use jqa("com.buschmais.jqassistant.plugin:java:${project.jqaversion}") jqa("com.buschmais.jqassistant.plugin:junit:${project.jqaversion}") // and plugins from other contributors jqa("de.kontext-e.jqassistant.plugin:jqassistant.plugin.git:${project.kejqapluginversion}") } task jqaclean(type: Delete) { delete 'jqassistant/report' delete 'jqassistant/store' } task(jqascan, dependsOn: 'jqaclean', type: JavaExec) { main = 'com.buschmais.jqassistant.commandline.Main' classpath = configurations.jqa // this is needed to work around a windows limitation // of a too long command path // see https://stackoverflow.com/questions/50707110/gradle-windows-java-io-ioexception-createprocess-error-206-filename-is-too-lon def cp = org.gradle.util.CollectionUtils.join(File.pathSeparator, classpath.getFiles()) environment 'CLASSPATH', cp classpath = classpath.filter { false } args 'scan' args '-f' args 'java:classpath::build/classes/java/main' args 'java:classpath::build/classes/java/test' rootProject.subprojects { args 'java:classpath::'+it.name+'/build/classes/main' args 'java:classpath::'+it.name+'/build/classes/test' } args '.git' } task(jqaanalyze, type: JavaExec) { main = 'com.buschmais.jqassistant.commandline.Main' classpath = configurations.jqa // this is needed to work around a windows limitation // of a too long command path // see https://stackoverflow.com/questions/50707110/gradle-windows-java-io-ioexception-createprocess-error-206-filename-is-too-lon def cp = org.gradle.util.CollectionUtils.join(File.pathSeparator, classpath.getFiles()) environment 'CLASSPATH', cp classpath = classpath.filter { false } args 'analyze' } task(jqaavailablescopes, type: JavaExec) { main = 'com.buschmais.jqassistant.commandline.Main' classpath = configurations.jqa // this is needed to work around a windows limitation // of a too long command path // see https://stackoverflow.com/questions/50707110/gradle-windows-java-io-ioexception-createprocess-error-206-filename-is-too-lon def cp = org.gradle.util.CollectionUtils.join(File.pathSeparator, classpath.getFiles()) environment 'CLASSPATH', cp classpath = classpath.filter { false } args 'available-scopes' } task(jqareset, type: JavaExec) { main = 'com.buschmais.jqassistant.commandline.Main' classpath = configurations.jqa // this is needed to work around a windows limitation // of a too long command path // see https://stackoverflow.com/questions/50707110/gradle-windows-java-io-ioexception-createprocess-error-206-filename-is-too-lon def cp = org.gradle.util.CollectionUtils.join(File.pathSeparator, classpath.getFiles()) environment 'CLASSPATH', cp classpath = classpath.filter { false } args 'reset' } task(jqaeffectiverules, type: JavaExec) { main = 'com.buschmais.jqassistant.commandline.Main' classpath = configurations.jqa // this is needed to work around a windows limitation // of a too long command path // see https://stackoverflow.com/questions/50707110/gradle-windows-java-io-ioexception-createprocess-error-206-filename-is-too-lon def cp = org.gradle.util.CollectionUtils.join(File.pathSeparator, classpath.getFiles()) environment 'CLASSPATH', cp classpath = classpath.filter { false } args 'effective-rules' } task(jqaavailablerules, type: JavaExec) { main = 'com.buschmais.jqassistant.commandline.Main' classpath = configurations.jqa // this is needed to work around a windows limitation // of a too long command path // see https://stackoverflow.com/questions/50707110/gradle-windows-java-io-ioexception-createprocess-error-206-filename-is-too-lon def cp = org.gradle.util.CollectionUtils.join(File.pathSeparator, classpath.getFiles()) environment 'CLASSPATH', cp classpath = classpath.filter { false } args 'available-rules' } task(jqareport, type: JavaExec) { main = 'com.buschmais.jqassistant.commandline.Main' classpath = configurations.jqa // this is needed to work around a windows limitation // of a too long command path // see https://stackoverflow.com/questions/50707110/gradle-windows-java-io-ioexception-createprocess-error-206-filename-is-too-lon def cp = org.gradle.util.CollectionUtils.join(File.pathSeparator, classpath.getFiles()) environment 'CLASSPATH', cp classpath = classpath.filter { false } args 'report' } task(jqa, dependsOn: ['jqascan','jqaanalyze']) { jqaanalyze.mustRunAfter jqascan } task(jqs, type: JavaExec) { main = 'com.buschmais.jqassistant.commandline.Main' classpath = configurations.jqa // this is needed to work around a windows limitation // of a too long command path // see https://stackoverflow.com/questions/50707110/gradle-windows-java-io-ioexception-createprocess-error-206-filename-is-too-lon def cp = org.gradle.util.CollectionUtils.join(File.pathSeparator, classpath.getFiles()) environment 'CLASSPATH', cp classpath = classpath.filter { false } args 'server' standardInput = System.in } clean.dependsOn jqaclean