plugins { id 'java' id 'maven-publish' } repositories { mavenCentral() } dependencies { implementation 'org.yaml:snakeyaml:1.26' implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.11.0' implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.11.0' implementation 'com.fasterxml.jackson.core:jackson-databind:2.11.0' implementation 'args4j:args4j:2.33' } group = 'com.whitemagicsoftware' version = '1.0' publishing { publications { maven(MavenPublication) { from(components.java) } } } jar { duplicatesStrategy = DuplicatesStrategy.EXCLUDE manifest { attributes 'Main-Class': "com.whitemagicsoftware.yamlp.Main" } from { (configurations.runtimeClasspath.findAll { !it.path.endsWith(".pom") }).collect { it.isDirectory() ? it : zipTree(it) } } archiveFileName = 'yamlp.jar' exclude 'META-INF/*.RSA', 'META-INF/*.SF', 'META-INF/*.DSA' } tasks.withType(JavaCompile) { options.encoding = 'UTF-8' }