forked from hibernate/hibernate-jpa-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
162 lines (141 loc) · 5.59 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
buildscript {
repositories {
mavenCentral()
mavenLocal()
mavenRepo name: 'jboss-nexus', url: "https://repository.jboss.org/nexus/content/groups/public/"
}
dependencies {
classpath 'org.hibernate.build.gradle:gradle-maven-publish-auth:2.0.1'
}
}
apply plugin: 'java'
apply plugin: 'maven-publish'
apply plugin: 'maven-publish-auth'
apply plugin: 'osgi'
apply plugin: 'eclipse'
apply plugin: 'idea'
repositories {
mavenCentral()
}
group = 'org.hibernate.javax.persistence'
version = '1.0.1-SNAPSHOT'
targetCompatibility=1.6
sourceCompatibility=1.6
// gradle uses 'build/' by default, we like 'target/'
buildDir = "target"
// osgi info
jar {
manifest = osgiManifest {
// GRADLE-1411: Even if we override Imports and Exports
// auto-generation with instructions, classesDir and classpath
// need to be here (temporarily).
classesDir = sourceSets.main.output.classesDir
classpath = configurations.runtime
// Let OsgiManifest automatically generate all imports.
// Explicitly list exports to control the version.
instruction "Export-Package",
"javax.persistence;version='${gradle.jpaVersion}.0'",
"javax.persistence.criteria;version='${gradle.jpaVersion}.0'",
"javax.persistence.metamodel;version='${gradle.jpaVersion}.0'",
"javax.persistence.spi;version='${gradle.jpaVersion}.0'",
"*"
instruction 'Bundle-Vendor', 'Hibernate.org'
instruction 'Built-By', 'Hibernate.org'
instruction 'Specification-Title', "Java Persistence API, Version ${gradle.jpaVersion}"
instruction 'Specification-Version', "${gradle.jpaVersion}"
instruction 'Specification-Vendor', 'Oracle, Inc.'
instruction 'Implementation-Version', version
instruction 'Implementation-Vendor', 'hibernate.org'
instruction 'Implementation-Title', 'Java Persistence API'
}
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifact sourcesJar {
classifier "sources"
}
artifact javadocJar {
classifier "javadoc"
}
pom.withXml {
// append additional metadata
asNode().children().last() + {
resolveStrategy = Closure.DELEGATE_FIRST
name "Java Persistence API, Version ${gradle.jpaVersion}"
description 'Clean-room definition of JPA APIs intended for use in developing Hibernate JPA implementation. See README.md for details'
url 'http://hibernate.org'
issueManagement {
system 'jira'
url 'http://opensource.atlassian.com/projects/hibernate/browse/JPA'
}
scm {
url "http://github.com/hibernate/hibernate-jpa-api"
connection "scm:git:http://github.com/hibernate/hibernate-jpa-api.git"
developerConnection "scm:git:[email protected]:hibernate/hibernate-jpa-api.git"
}
licenses {
license {
name 'Eclipse Public License (EPL), Version 1.0'
url 'http://www.eclipse.org/legal/epl-v10.html'
distribution 'repo'
}
license {
name 'Eclipse Distribution License (EDL), Version 1.0'
url 'http://www.eclipse.org/org/documents/edl-v10.php'
}
}
developers {
developer {
id 'epbernard'
name 'Emmanuel Bernard'
email '[email protected]'
organization 'Red Hat, Inc.'
url 'http://in.relation.to/Bloggers/Emmanuel'
}
developer {
id 'hardy.ferentschik'
name 'Hardy Ferentschik'
email '[email protected]'
organization 'Red Hat, Inc.'
url 'http://in.relation.to/Bloggers/Hardy'
}
developer {
id 'sebersole'
name 'Steve Ebersole'
email '[email protected]'
organization 'Red Hat, Inc.'
url 'http://in.relation.to/Bloggers/Steve'
}
}
}
}
}
}
repositories {
maven {
if ( project.version.endsWith( 'SNAPSHOT' ) ) {
name 'jboss-snapshots-repository'
url 'https://repository.jboss.org/nexus/content/repositories/snapshots'
}
else {
name 'jboss-releases-repository'
url 'https://repository.jboss.org/nexus/service/local/staging/deploy/maven2/'
}
}
}
}
// create the javadoc jar
task javadocJar(type: Jar, dependsOn: javadoc) {
from javadoc.destinationDir
classifier = 'javadoc'
}
// create the sources jar
task sourcesJar(type: Jar, dependsOn: compileJava) {
from sourceSets.main.allSource
classifier = 'sources'
}
task wrapper(type: Wrapper) {
gradleVersion = '1.6'
}