Permalink
Cannot retrieve contributors at this time
plugins { | |
id 'java' | |
id 'maven' | |
id 'signing' | |
id 'groovy' | |
id 'jacoco' | |
} | |
project.version = '1.3.2' | |
project.group = 'se.llbit' | |
project.archivesBaseName = 'jo-json' | |
// Source level is JDK 7 because we use AutoCloseable. | |
sourceCompatibility = targetCompatibility = '1.7' | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
testCompile 'junit:junit:4.11' | |
testCompile 'org.spockframework:spock-core:1.1-groovy-2.4' | |
} | |
test.inputs.dir file('testfiles') | |
jacocoTestReport { | |
reports { | |
xml.enabled = true | |
html.enabled = true | |
} | |
} | |
check.dependsOn jacocoTestReport | |
task javadocJar(type: Jar) { | |
classifier = 'javadoc' | |
from javadoc | |
} | |
task sourcesJar(type: Jar) { | |
classifier = 'sources' | |
from sourceSets.main.allSource | |
} | |
artifacts { | |
archives javadocJar, sourcesJar | |
} | |
signing { | |
required { project.hasProperty('signing.keyId') } | |
sign configurations.archives | |
} | |
if (project.hasProperty('ossrhUsername')) { | |
uploadArchives { | |
repositories.mavenDeployer { | |
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) } | |
repository(url: 'https://oss.sonatype.org/service/local/staging/deploy/maven2') { | |
authentication(userName: ossrhUsername, password: ossrhPassword) | |
} | |
snapshotRepository(url: 'https://oss.sonatype.org/content/repositories/snapshots') { | |
authentication(userName: ossrhUsername, password: ossrhPassword) | |
} | |
pom.project { | |
name 'jo-json' | |
packaging 'jar' | |
description 'A small JSON library.' | |
url 'https://github.com/llbit/jo-json' | |
licenses { | |
license { | |
name 'Modified BSD License' | |
url 'http://opensource.org/licenses/BSD-3-Clause' | |
distribution 'repo' | |
} | |
} | |
developers { | |
developer { | |
name 'Jesper Öqvist' | |
email 'jesper@llbit.se' | |
} | |
} | |
scm { | |
connection 'scm:git:https://github.com/llbit/jo-json.git' | |
url 'https://github.com/llbit/jo-json' | |
} | |
} | |
} | |
} | |
} |