diff --git a/build.gradle b/build.gradle index 4ad2b60479..2707aedf5a 100644 --- a/build.gradle +++ b/build.gradle @@ -1,11 +1,12 @@ ext { - projectVersion = '0.1.0-SNAPSHOT' + projectVersion = '0.1.0' projectGroup = 'io.codearte.accurest' } subprojects { apply plugin: 'groovy' apply plugin: 'maven-publish' + apply from: "$rootDir/release.gradle" group = projectGroup version = projectVersion @@ -36,8 +37,6 @@ subprojects { } project(':core') { - dependencies { - } } project(':gradle-plugin') { diff --git a/release.gradle b/release.gradle new file mode 100644 index 0000000000..e772848864 --- /dev/null +++ b/release.gradle @@ -0,0 +1,64 @@ +apply plugin: 'maven' +apply plugin: 'signing' + +task javadocJar(type: Jar) { + classifier = 'javadoc' + from javadoc +} + +task sourcesJar(type: Jar) { + classifier = 'sources' + from sourceSets.main.allSource +} + +artifacts { + archives javadocJar, sourcesJar +} + +signing { + sign configurations.archives +} + +uploadArchives { + repositories { + mavenDeployer { + beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) } + + repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") { + authentication(userName: sonatypeUsername, password: sonatypePassword) + } + + snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") { + authentication(userName: sonatypeUsername, password: sonatypePassword) + } + + pom.project { + name "$project.name" + packaging 'jar' + description 'RESTful Contract Verifier' + url 'http://codearte.github.io/accurest' + + scm { + connection 'scm:git:git@github.com:Codearte/accurest.git' + developerConnection 'scm:git:git@github.com:Codearte/accurest.git' + url 'https://github.com/Codearte/accurest' + } + + licenses { + license { + name 'The Apache License, Version 2.0' + url 'http://www.apache.org/licenses/LICENSE-2.0.txt' + } + } + + developers { + developer { + id 'jkubrynski' + name 'Jakub Kubrynski' + email 'jk ATT codearte DOTT io' + } + } + } + } + } +} \ No newline at end of file