plugins { id 'application' } dependencies { def joobyVer = '2.10.0' implementation group: 'io.jooby', name: 'jooby-netty', version: joobyVer implementation group: 'io.jooby', name: 'jooby-gson', version: joobyVer implementation group: 'ch.qos.logback', name: 'logback-classic', version: '1.2.5' } task createMissingSourceDirs { group = "Source Directories" description = "Create all of the missing source directories for this project." doFirst { sourceSets.each { def sourceRoot -> sourceRoot.allSource.srcDirTrees.each { def sourceDir -> if(!sourceDir.dir.exists()) { println "Creating ${sourceDir}" mkdir sourceDir.dir } } } } } task deleteEmptySourceDirs { group = "Source Directories" description = "Delete all empty source directories." doFirst { sourceSets.each { def sourceRoot -> sourceRoot.allSource.srcDirTrees.each { def sourceDir -> if(sourceDir.dir.exists() && sourceDir.dir.isDirectory() && sourceDir.dir.list().length == 0) { println "Removing empty ${sourceDir}" sourceDir.dir.delete() } } } } } mainClassName = "web.Service"