plugins { id 'java' } group = 'com.its' version = '0.0.1' sourceCompatibility = '1.8' targetCompatibility = '1.8' compileJava.options.encoding = 'UTF-8' repositories { mavenCentral() } dependencies { implementation 'io.netty:netty-all:4.1.52.Final' } processResources { enabled = false } jar { enabled = true } test { useJUnitPlatform() } tasks.register('runInstallJarLibrary', Exec) { doFirst { println "its-network library install mvn repository..." workingDir = file('.') commandLine = ['cmd', '/C', 'start', 'install.bat'] // cmd /C start ./install.bat } } jar.finalizedBy runInstallJarLibrary compileJava.options.encoding = 'UTF-8' tasks.withType(JavaCompile).configureEach { options.compilerArgs << '-Xlint:unchecked' options.deprecation = true options.encoding = 'UTF-8' }