Skip to content

Commit

Permalink
[Wen Hao] - update docs and dependencies.
Browse files Browse the repository at this point in the history
  • Loading branch information
wenhao committed Aug 16, 2017
1 parent 9a3185e commit 4fdafc0
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 110 deletions.
162 changes: 63 additions & 99 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'com.gradle.build-scan' version '1.2'
id 'com.gradle.build-scan' version '1.9'
id "com.jfrog.bintray" version "1.7.3"
id "org.owasp.dependencycheck" version "1.4.3"
id 'net.saliman.cobertura' version '2.3.1'
Expand All @@ -14,6 +14,7 @@ buildScan {
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'maven'
apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.bintray'
apply plugin: 'signing'

Expand Down Expand Up @@ -81,11 +82,62 @@ configurations.all {

cobertura.coverageFormats = ['html', 'xml']

def pomConfig = {
licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution 'repo'
}
}

scm {
url 'https://github.com/wenhao/jpa-spec'
connection 'https://github.com/wenhao/jpa-spec.git'
developerConnection 'git@github.com:wenhao/jpa-spec.git'
}

developers {
developer {
id 'wenhao'
name 'Hao Wen'
email 'wenhao@126.com'
organization 'Hao Wen'
roles {
role 'Developer'
}
}
}

}

publishing {
publications {
maven(MavenPublication) {
from components.java
artifact sourcesJar
artifact javadocJar
groupId 'com.github.wenhao'
artifactId 'jpa-spec'
version '3.1.1'
pom.withXml {
def root = asNode()
root.appendNode('description', 'A JAP Query By Specification framework.')
root.appendNode('name', 'jpa-spec')
root.appendNode('url', 'https://github.com/wenhao/jpa-spec')
root.appendNode('inceptionYear', '2016')
root.children().last() + pomConfig
}
}
}
}

// publish to jcenter
bintray {
user = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : System.getenv('BINTRAY_USER')
key = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') : System.getenv('BINTRAY_API_KEY')
configurations = ['archives']
publications = ['maven']
dryRun = false
publish = true
override = false
Expand All @@ -106,109 +158,21 @@ bintray {
desc = 'A JAP Query By Specification framework 3.1.1'
released = new Date()
vcsTag = '3.1.1'
}
}
}

install {
repositories.mavenInstaller {
pom.project {
name 'jpa-spec'
description 'A JAP Query By Specification framework.'
url 'https://github.com/wenhao/jpa-spec'
inceptionYear '2016'

packaging 'jar'
groupId 'com.github.wenhao'
artifactId 'jpa-spec'
version '3.1.1'

licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution 'repo'
}
gpg {
sign = true
passphrase = 'passphrase'
}

scm {
url 'https://github.com/wenhao/jpa-spec'
connection 'https://github.com/wenhao/jpa-spec.git'
developerConnection 'git@github.com:wenhao/jpa-spec.git'
}

developers {
developer {
id 'wenhao'
name 'Hao Wen'
email 'wenhao@126.com'
organization 'Hao Wen'
roles {
role 'Developer'
}
}
mavenCentralSync {
sync = true
user = project.hasProperty('sonatypeUsername')
password = project.hasProperty('sonatypePassword')
close = '1'
}
}
}
}

// publish to maven central
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 'jpa-spec'
description 'A JAP Query By Specification framework.'
url 'https://github.com/wenhao/jpa-spec'
inceptionYear '2016'

packaging 'jar'
groupId 'com.github.wenhao'
artifactId 'jpa-spec'
version '3.1.1'

scm {
url 'scm:git@github.com:wenhao/jpa-spec.git'
connection 'scm:git@github.com:wenhao/jpa-spec.git'
developerConnection 'git@github.com:wenhao/jpa-spec.git'
}

licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution 'repo'
}
}

scm {
url 'https://github.com/wenhao/jpa-spec'
connection 'https://github.com/wenhao/jpa-spec.git'
developerConnection 'git@github.com:wenhao/jpa-spec.git'
}

developers {
developer {
id 'wenhao'
name 'Hao Wen'
email 'wenhao@126.com'
organization 'Hao Wen'
roles {
role 'Developer'
}
}
}
}
}
}
wrapper {
gradleVersion = '4.1'
}
9 changes: 0 additions & 9 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,9 @@ commonsLang3Version=3.4
junitVersion=4.12
h2Version=1.4.192

##GPG signing
#http://central.sonatype.org/pages/working-with-pgp-signatures.html
#http://central.sonatype.org/pages/gradle.html

## jcenter
bintrayUser=wenhao
bintrayApiKey=

## maven central
#signing.keyId=41A79ED1
#signing.password=
#signing.secretKeyRingFile=/Users/hwen/.gnupg/secring.gpg

sonatypeUsername=wenhao
sonatypePassword=
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Mon Oct 17 10:30:26 CST 2016
#Wed Aug 16 13:01:17 CST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-bin.zip

0 comments on commit 4fdafc0

Please sign in to comment.