Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
import org.gradle.api.artifacts.maven.MavenDeployment

apply plugin: 'fatjar'
apply plugin: 'maven'
apply plugin: 'signing'

group = 'com.sendgrid'
version = "0.1.2"
ext.packaging = 'jar'

buildscript {
dependencies {
Expand Down Expand Up @@ -39,6 +45,64 @@ build << {
}
}

task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from 'build/docs/javadoc'
}

task sourcesJar(type: Jar) {
from sourceSets.main.allSource
classifier = 'sources'
}

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)
}

pom.project {
name 'sendgrid-java'
packaging 'jar'
description 'SendGrid Java helper library'
url 'https://github.com/sendgrid/sendgrid-java'

scm {
url 'scm:[email protected]:sendgrid/sendgrid-java.git'
connection 'scm:[email protected]:sendgrid/sendgrid-java.git'
developerConnection 'scm:[email protected]:sendgrid/sendgrid-java.git'
}

licenses {
license {
name 'MIT License'
url 'http://opensource.org/licenses/MIT'
distribution 'repo'
}
}

developers {
developer {
id 'scottmotte'
name 'Scott Motte'
}
}
}
}
}
}

artifacts {
archives fatJar

archives jar
archives javadocJar
archives sourcesJar
}