Skip to content

Chainsaw DSL up to 0.2.1

Tomasz Jędrzejewski edited this page Mar 14, 2018 · 2 revisions

This is a summary of Chainsaw plugin DSL prior to 0.2.1 release:

plugins {
  id 'com.zyxist.chainsaw' version 'x.y.z'
}

javaModule.name = 'com.example.mymodule'
javaModule.allowModuleNamingViolations = false
javaModule.extraTestModules = ['org.mockito']
javaModule.patchModules 'com.google.code.findbugs:jsr305': 'jsr250.api'

dependencies {
    patch 'com.google.code.findbugs:jsr305:1.3.9'
    
    compile 'javax.annotation:jsr250-api:1.0'
    compile 'com.google.guava:guava:23.2-jre'

    testCompile 'org.mockito:mockito-core:x.y.z'
}

Flag reference:

  • name - Jigsaw module name (must be identical, as in module-info.java)
  • allowModuleNamingViolations - enables violating the convention for naming Jigsaw modules
  • extraTestModules - unit tests don't have their own module. In order to make additional test modules (e.g. Mockito) accessible for the unit tests, they must be listed here. Note that JUnit 4 and 5 are recognized automatically.
  • patchModules - map of dependency patches (patching dependency => patched module)

The patching dependencies must be specified in a special patch configuration.

Clone this wiki locally