apply plugin: 'java' sourceCompatibility = 1.7 targetCompatibility = 1.7 tasks.withType(JavaCompile) { options.encoding = 'UTF-8' } javadoc { options.encoding = 'UTF-8' } test { testLogging.showStandardStreams = true testLogging.exceptionFormat = 'full' } task sourcesJar(type: Jar, dependsOn: classes) { classifier = 'sources' from sourceSets.main.allSource } task javadocJar(type: Jar, dependsOn: javadoc) { classifier = 'javadoc' from javadoc.destinationDir } artifacts { archives sourcesJar archives javadocJar } tasks.each { task -> if (!project.hasProperty("ossrhPassword") && "signArchives" == task.name) { task.enabled = false } }