apply plugin: 'java' sourceCompatibility = '1.8' [compileJava, compileTestJava]*.options*.encoding = 'UTF-8' // NetBeans will automatically add "run" and "debug" tasks relying on the // "mainClass" property. You may however define the property prior executing // tasks by passing a "-PmainClass=" argument. // // Note however, that you may define your own "run" and "debug" task if you // prefer. In this case NetBeans will not add these tasks but you may rely on // your own implementation. if (!hasProperty('mainClass')) { ext.mainClass = '' } repositories { mavenCentral() maven { url "https://maven.openzen.org/" } } dependencies { compile 'org.openzen.zencode:zencode-javascripting:0.3.0' } task fatJar(type: Jar) { manifest { attributes 'Implementation-Title': 'ZenCode Java Scripting Engine Example', 'Class-Path': '.', 'Main-Class': 'org.openzen.javascriptingexample.Main' } baseName = project.name + '-all' from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } } { exclude "META-INF/INDEX.LIST" exclude "META-INF/*.SF" exclude "META-INF/*.DSA" exclude "META-INF/*.RSA" } with jar }