Newer
Older
jooby-sse / build.gradle
Mark George on 5 May 2021 1 KB Add logger
plugins {
	id 'application'
}

repositories {
	jcenter()
	mavenCentral()
}

dependencies {
	def joobyVer='2.9.5'
	implementation group: 'io.jooby', name: 'jooby-netty', version: joobyVer
	implementation group: 'ch.qos.logback', name: 'logback-classic', version: '1.2.3'
}

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 = 'route.Server'