mirror of
https://github.com/shekhargulati/strman-java.git
synced 2026-10-21 06:54:09 +00:00
added release plugins and travis.yml
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
language: java
|
||||
install: ./gradlew assemble -x :signArchives
|
||||
script: ./gradlew clean build -x :signArchives
|
||||
jdk:
|
||||
- oraclejdk8
|
||||
after_success:
|
||||
- bash <(curl -s https://codecov.io/bash)
|
||||
@@ -1,7 +1,14 @@
|
||||
plugins {
|
||||
id 'net.researchgate.release' version '2.3.3'
|
||||
}
|
||||
|
||||
group 'com.shekhargulati'
|
||||
version '0.1.0-SNAPSHOT'
|
||||
|
||||
apply plugin: 'java'
|
||||
apply plugin: 'maven-publish'
|
||||
apply plugin: 'signing'
|
||||
apply plugin: "jacoco"
|
||||
|
||||
sourceCompatibility = 1.8
|
||||
|
||||
@@ -14,3 +21,75 @@ 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
|
||||
Reference in New Issue
Block a user