Files
strman-java/build.gradle
T

95 lines
2.3 KiB
Groovy

plugins {
id 'net.researchgate.release' version '2.3.3'
}
group 'com.shekhargulati'
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'maven-publish'
apply plugin: 'signing'
apply plugin: "jacoco"
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.11'
testCompile 'org.hamcrest:hamcrest-all:1.3'
}
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: System.getenv('OSS_USER'), password: System.getenv('OSS_PASSWORD'))
}
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
authentication(userName: System.getenv('OSS_USER'), password: System.getenv('OSS_PASSWORD'))
}
pom.project {
name 'strman'
packaging 'jar'
artifactId 'strman'
description 'A Java 8 library for working with String'
url 'https://github.com/shekhargulati/strman-java'
scm {
connection 'https://github.com/shekhargulati/strman-java.git'
developerConnection 'https://github.com/shekhargulati/strman-java.git'
url 'https://github.com/shekhargulati/strman-java.git'
}
licenses {
license {
name 'MIT'
}
}
developers {
developer {
id 'shekhargulati'
name 'Shekhar Gulati'
email 'shekhargulati84@gmail.com'
}
}
}
}
}
}
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
}
jacocoTestReport {
reports {
xml.enabled = true
html.enabled = true
}
}
check.dependsOn jacocoTestReport