forked from wenhao/jpa-spec
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
178 lines (154 loc) · 4.75 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
plugins {
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'
id 'com.github.kt3k.coveralls' version '2.7.1'
}
buildScan {
licenseAgreementUrl = 'https://gradle.com/terms-of-service'
licenseAgree = 'yes'
}
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'maven'
apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.bintray'
apply plugin: 'signing'
repositories {
jcenter()
}
group = 'com.github.wenhao'
version = '3.1.1'
idea {
project {
vcs = 'Git'
}
module {
jdkName = '1.8'
}
}
def compatibility = {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
compileJava(compatibility)
compileTestJava(compatibility)
dependencies {
compile("org.springframework.data:spring-data-jpa:$springDataJpaVersion")
compile("org.hibernate.javax.persistence:hibernate-jpa-2.1-api:$jpaVersion")
testCompile("org.springframework.boot:spring-boot-starter-data-jpa:$springBootVersion")
testCompile("org.springframework.boot:spring-boot-starter-test:$springBootVersion")
testCompile("org.apache.commons:commons-lang3:$commonsLang3Version")
testCompile("com.h2database:h2:$h2Version")
testCompile("junit:junit:$junitVersion")
task sourcesJar(type: Jar) {
from sourceSets.main.allSource
classifier = 'sources'
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives jar
archives sourcesJar
archives javadocJar
}
ext.isReleaseVersion = !version.endsWith("SNAPSHOT")
signing {
required { isReleaseVersion && gradle.taskGraph.hasTask("uploadArchives") }
sign configurations.archives
}
}
configurations.all {
resolutionStrategy.force "org.springframework:spring-orm:$springOrmVersion"
}
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 '[email protected]:wenhao/jpa-spec.git'
}
developers {
developer {
id 'wenhao'
name 'Hao Wen'
email '[email protected]'
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
pkg {
repo = 'maven'
name = 'jpa-spec'
desc = 'A JAP Query By Specification framework'
licenses = ['Apache-2.0']
websiteUrl = 'https://github.com/wenhao/jpa-spec'
issueTrackerUrl = 'https://github.com/wenhao/jpa-spec/issues'
vcsUrl = 'https://github.com/wenhao/jpa-spec'
labels = ['jpa', 'spring-data']
publicDownloadNumbers = true
githubRepo = 'wenhao/jpa-spec'
githubReleaseNotesFile = 'README.md'
version {
name = '3.1.1'
desc = 'A JAP Query By Specification framework 3.1.1'
released = new Date()
vcsTag = '3.1.1'
gpg {
sign = true
passphrase = 'passphrase'
}
mavenCentralSync {
sync = true
user = project.hasProperty('sonatypeUsername')
password = project.hasProperty('sonatypePassword')
close = '1'
}
}
}
}
wrapper {
gradleVersion = '4.1'
}