Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 313 lines (268 sloc) 11.584 kB
34c2839 @sebersole HHH-5616 - Switch to Gradle for builds
sebersole authored
1 apply plugin: 'eclipse'
2 apply plugin: 'idea'
3
4 allprojects {
5 repositories {
6 mavenCentral()
a02a8a8 @sebersole HHH-5898 - Improve authentication for Gradle uploads
sebersole authored
7 mavenLocal()
34c2839 @sebersole HHH-5616 - Switch to Gradle for builds
sebersole authored
8 mavenRepo name: 'jboss-nexus', urls: "https://repository.jboss.org/nexus/content/groups/public/"
9 mavenRepo name: "jboss-snapshots", urls: "http://snapshots.jboss.org/maven2/"
10 }
11 }
12
29e21e9 @sebersole HHH-6038 - Migrate to use newly separated gradle-upload-auth-plugin
sebersole authored
13 buildscript {
14 repositories {
15 mavenLocal()
16 mavenRepo name: 'jboss-nexus', urls: "https://repository.jboss.org/nexus/content/groups/public/"
17 mavenRepo name: "jboss-snapshots", urls: "http://snapshots.jboss.org/maven2/"
18 }
19 dependencies {
87a0156 @sebersole prepare for post 4.0.0.Alpha3 dev
sebersole authored
20 classpath 'org.hibernate.build.gradle:gradle-upload-auth-plugin:1.0.2'
29e21e9 @sebersole HHH-6038 - Migrate to use newly separated gradle-upload-auth-plugin
sebersole authored
21 }
22 }
23
34c2839 @sebersole HHH-5616 - Switch to Gradle for builds
sebersole authored
24 ideaProject {
25 javaVersion = "1.6"
fad1801 @sebersole HHH-5707 - Gradle 0.9-rc-2
sebersole authored
26 withXml { provider ->
27 def node = provider.asNode()
28 def vcsConfig = node.component.find { it.'@name' == 'VcsDirectoryMappings' }
29 vcsConfig.mapping[0].'@vcs' = 'Git'
7ce80c9 @sebersole HHH-5616 - Switch to Gradle for builds .. IntelliJ
sebersole authored
30 }
44cca7a @sebersole HHH-6106 - Fix up IntelliJ project generation
sebersole authored
31 beforeConfigured { module ->
32 module.modulePaths.removeAll { it.filePath.endsWith('hibernate-core.iml') }
33 }
34c2839 @sebersole HHH-5616 - Switch to Gradle for builds
sebersole authored
34 }
35
f8acf15 @sebersole HHH-5616 - Switch to Gradle for builds ... applied javadoc and source…
sebersole authored
36 ideaModule {
44cca7a @sebersole HHH-6106 - Fix up IntelliJ project generation
sebersole authored
37 moduleName = 'hibernate-core-root'
f8acf15 @sebersole HHH-5616 - Switch to Gradle for builds ... applied javadoc and source…
sebersole authored
38 }
39
34c2839 @sebersole HHH-5616 - Switch to Gradle for builds
sebersole authored
40 // build a map of the dependency artifacts to use. Allows centralized definition of the version of artifacts to
41 // use. In that respect it serves a role similar to <dependencyManagement> in Maven
5b4e976 @hferentschik HHH-6307 Upgrading slf4j to 1.6.1
hferentschik authored
42 slf4jVersion = '1.6.1'
34c2839 @sebersole HHH-5616 - Switch to Gradle for builds
sebersole authored
43 libraries = [
44 // Ant
45 ant: 'ant:ant:1.6.5',
46
47 // Antlr
48 antlr: 'antlr:antlr:2.7.7',
49
50 // Annotations
51 commons_annotations:
52 'org.hibernate:hibernate-commons-annotations:3.2.0.Final',
fcf439d @stliu HHH-6133 Enhance annotation based Jandex index with configuration ext…
stliu authored
53 jandex: 'org.jboss:jandex:1.0.0.Beta7',
dd019a1 @hferentschik HHH-6148 Adding classmate as a replacement for the commons annotation…
hferentschik authored
54 classmate: 'com.fasterxml:classmate:0.5.2',
34c2839 @sebersole HHH-5616 - Switch to Gradle for builds
sebersole authored
55
56 // Jakarta commons-collections todo : get rid of commons-collections dependency
57 commons_collections:
58 'commons-collections:commons-collections:3.1',
59
60 // Dom4J
61 dom4j: 'dom4j:dom4j:1.6.1@jar',
42502e6 @hferentschik HHH-6109 Starting work for annotation binding against the new metamo…
hferentschik authored
62 jaxb: 'com.sun.xml.bind:jaxb-xjc:2.1.6',
34c2839 @sebersole HHH-5616 - Switch to Gradle for builds
sebersole authored
63
64 // h2
b37cd1a @stliu HHH-5768 upgrade H2 version to 1.2.145 (was 1.2.140)
stliu authored
65 h2: 'com.h2database:h2:1.2.145',
34c2839 @sebersole HHH-5616 - Switch to Gradle for builds
sebersole authored
66
67 // Javassist
68 javassist: 'javassist:javassist:3.12.0.GA',
69
70 // javax
6e15b5c @stliu HHH-6322 upgrade to hibernate-jpa-2.0-api-1.0.1.Final
stliu authored
71 jpa: 'org.hibernate.javax.persistence:hibernate-jpa-2.0-api:1.0.1.Final',
34c2839 @sebersole HHH-5616 - Switch to Gradle for builds
sebersole authored
72 jta: 'javax.transaction:jta:1.1',
73 validation: 'javax.validation:validation-api:1.0.0.GA',
2eab57d @hferentschik HHH-6308 upgrading to latest validator release - 4.2.0.Final
hferentschik authored
74 validator: 'org.hibernate:hibernate-validator:4.2.0.Final',
34c2839 @sebersole HHH-5616 - Switch to Gradle for builds
sebersole authored
75 jacc: 'org.jboss.javaee:jboss-jacc-api:1.1.0.GA',
76
77 // logging
ece7736 Updated to work with latest releases of jboss-logging and jboss-loggi…
JPAV authored
78 logging: 'org.jboss.logging:jboss-logging:3.0.0.Beta5',
79 logging_tools: 'org.jboss.logging:jboss-logging-tools:1.0.0.Beta4',
34c2839 @sebersole HHH-5616 - Switch to Gradle for builds
sebersole authored
80 slf4j_api: 'org.slf4j:slf4j-api:' + slf4jVersion,
03c4009 @sebersole HHH-6088 - Move to slf4j-log4j12 for test logging
sebersole authored
81 slf4j_log4j12: 'org.slf4j:slf4j-log4j12:' + slf4jVersion,
34c2839 @sebersole HHH-5616 - Switch to Gradle for builds
sebersole authored
82 jcl_slf4j: 'org.slf4j:jcl-over-slf4j:' + slf4jVersion,
83 jcl_api: 'commons-logging:commons-logging-api:99.0-does-not-exist',
84 jcl: 'commons-logging:commons-logging:99.0-does-not-exist',
85
86 // testing
1c203f3 @sebersole HHH-5942 - Migrate to JUnit 4
sebersole authored
87 junit: 'junit:junit:4.8.2',
56d242a @sebersole HHH-5949 - Migrate, complete and integrate TransactionFactory as a se…
sebersole authored
88 jpa_modelgen: 'org.hibernate:hibernate-jpamodelgen:1.1.1.Final',
34c2839 @sebersole HHH-5616 - Switch to Gradle for builds
sebersole authored
89 shrinkwrap_api: 'org.jboss.shrinkwrap:shrinkwrap-api:1.0.0-alpha-6',
90 shrinkwrap: 'org.jboss.shrinkwrap:shrinkwrap-impl-base:1.0.0-alpha-6'
91 ]
92
93
94 subprojects { subProject ->
7ce80c9 @sebersole HHH-5616 - Switch to Gradle for builds .. IntelliJ
sebersole authored
95 apply plugin: 'idea'
4550cdf @stliu HHH-5649 improve eclipse support with migration to gradle
stliu authored
96 apply plugin: 'eclipse'
d2c88d5 @sebersole HHH-5647 - Develop release process using Gradle
sebersole authored
97
98 defaultTasks 'build'
7ce80c9 @sebersole HHH-5616 - Switch to Gradle for builds .. IntelliJ
sebersole authored
99
34c2839 @sebersole HHH-5616 - Switch to Gradle for builds
sebersole authored
100 group = 'org.hibernate'
ad180ff @sebersole prep for next development cycle
sebersole authored
101 version = '4.0.0-SNAPSHOT'
34c2839 @sebersole HHH-5616 - Switch to Gradle for builds
sebersole authored
102
103 // minimize changes, at least for now (gradle uses 'build' by default)..
7ce80c9 @sebersole HHH-5616 - Switch to Gradle for builds .. IntelliJ
sebersole authored
104 buildDir = "target"
8c56875 @stliu HHH-6036 integration documentation generation
stliu authored
105 if ( ! subProject.name.startsWith( 'release' ) && ! subProject.name.startsWith( 'documentation' ) ) {
e21fed8 @sebersole HHH-5616 - Switch to Gradle for builds .. envers
sebersole authored
106 apply plugin: 'java'
34c2839 @sebersole HHH-5616 - Switch to Gradle for builds
sebersole authored
107 apply plugin: 'maven' // for install task as well as deploy dependencies
29e21e9 @sebersole HHH-6038 - Migrate to use newly separated gradle-upload-auth-plugin
sebersole authored
108 apply plugin: 'uploadAuth'
34c2839 @sebersole HHH-5616 - Switch to Gradle for builds
sebersole authored
109
110 configurations {
111 provided {
112 // todo : need to make sure these are non-exported
113 description = 'Non-exported compile-time dependencies.'
114 }
43b812c @sebersole HHH-6000 - split annotation processor execution out into separate tasks
sebersole authored
115 jbossLoggingTool {
116 description = "Dependencies for running the JBoss logging AnnotationProcessor tool"
117 }
118 hibernateJpaModelGenTool {
119 description = "Dependencies for running the Hibernate JPA Metamodel Generator AnnotationProcessor tool"
120 }
901513e @sebersole HHH-5616 - Switch to Gradle for builds .. uploads
sebersole authored
121 deployerJars {
122 description = 'Jars needed for doing deployment to JBoss Nexus repo'
123 }
42502e6 @hferentschik HHH-6109 Starting work for annotation binding against the new metamo…
hferentschik authored
124 jaxb {
125 description = 'Dependencies for running ant xjc (jaxb class generation)'
126 }
34c2839 @sebersole HHH-5616 - Switch to Gradle for builds
sebersole authored
127 }
128
129 // appropriately inject the common dependencies into each sub-project
130 dependencies {
0d29c34 @hferentschik HHH-6111 enabling jaxb model generation for hbm configuration files
hferentschik authored
131 compile( libraries.logging )
34c2839 @sebersole HHH-5616 - Switch to Gradle for builds
sebersole authored
132 testCompile( libraries.junit )
f5a3e38 HHH-6050 Changed single compile-time dependency to slf4j in parent bu…
JPAV authored
133 testRuntime( libraries.slf4j_api )
03c4009 @sebersole HHH-6088 - Move to slf4j-log4j12 for test logging
sebersole authored
134 testRuntime( libraries.slf4j_log4j12 )
34c2839 @sebersole HHH-5616 - Switch to Gradle for builds
sebersole authored
135 testRuntime( libraries.jcl_slf4j )
136 testRuntime( libraries.jcl_api )
137 testRuntime( libraries.jcl )
429d0fd @sebersole HHH-5616 - Switch to Gradle for builds .. ehcache
sebersole authored
138 testRuntime( libraries.javassist )
34c2839 @sebersole HHH-5616 - Switch to Gradle for builds
sebersole authored
139 testRuntime( libraries.h2 )
42502e6 @hferentschik HHH-6109 Starting work for annotation binding against the new metamo…
hferentschik authored
140 jbossLoggingTool( libraries.logging_tools )
43b812c @sebersole HHH-6000 - split annotation processor execution out into separate tasks
sebersole authored
141 hibernateJpaModelGenTool( libraries.jpa_modelgen )
42502e6 @hferentschik HHH-6109 Starting work for annotation binding against the new metamo…
hferentschik authored
142 jaxb( libraries.jaxb )
901513e @sebersole HHH-5616 - Switch to Gradle for builds .. uploads
sebersole authored
143 deployerJars "org.apache.maven.wagon:wagon-http:1.0-beta-6"
34c2839 @sebersole HHH-5616 - Switch to Gradle for builds
sebersole authored
144 }
c7f09e5 Attempt to compile twice, once only for annotations, then for everyth…
JPAV authored
145
44cca7a @sebersole HHH-6106 - Fix up IntelliJ project generation
sebersole authored
146 aptDumpDir = file( buildDirName + "/tmp/apt" )
b1a9f36 @sebersole HHH-6000 - split annotation processor execution out into separate tasks
sebersole authored
147
148 sourceSets.main {
149 compileClasspath += configurations.provided
34c2839 @sebersole HHH-5616 - Switch to Gradle for builds
sebersole authored
150 }
151
b1a9f36 @sebersole HHH-6000 - split annotation processor execution out into separate tasks
sebersole authored
152 sourceSets.all {
153 originalJavaSrcDirs = java.srcDirs
154 generatedLoggingSrcDir = file( "${buildDir}/generated-src/logging/${name}" )
155 java.srcDir generatedLoggingSrcDir
156 }
43b812c @sebersole HHH-6000 - split annotation processor execution out into separate tasks
sebersole authored
157
b1a9f36 @sebersole HHH-6000 - split annotation processor execution out into separate tasks
sebersole authored
158 task generateMainLoggingClasses(type: Compile) {
43b812c @sebersole HHH-6000 - split annotation processor execution out into separate tasks
sebersole authored
159 classpath = compileJava.classpath + configurations.jbossLoggingTool
b1a9f36 @sebersole HHH-6000 - split annotation processor execution out into separate tasks
sebersole authored
160 source = sourceSets.main.originalJavaSrcDirs
161 destinationDir = aptDumpDir
43b812c @sebersole HHH-6000 - split annotation processor execution out into separate tasks
sebersole authored
162 options.define(
163 compilerArgs: [
164 "-nowarn",
165 "-proc:only",
006c96b @sslavic HHH-6228 Compile tasks using now UTF-8 encoding. Initially they used …
sslavic authored
166 "-encoding", "UTF-8",
43b812c @sebersole HHH-6000 - split annotation processor execution out into separate tasks
sebersole authored
167 "-processor", "org.jboss.logging.LoggingToolsProcessor",
b1a9f36 @sebersole HHH-6000 - split annotation processor execution out into separate tasks
sebersole authored
168 "-s", "$sourceSets.main.generatedLoggingSrcDir.absolutePath"
43b812c @sebersole HHH-6000 - split annotation processor execution out into separate tasks
sebersole authored
169 ]
b1a9f36 @sebersole HHH-6000 - split annotation processor execution out into separate tasks
sebersole authored
170 );
171 outputs.dir sourceSets.main.generatedLoggingSrcDir;
172 doFirst {
173 sourceSets.main.generatedLoggingSrcDir.mkdirs()
174 }
43b812c @sebersole HHH-6000 - split annotation processor execution out into separate tasks
sebersole authored
175 }
176
b1a9f36 @sebersole HHH-6000 - split annotation processor execution out into separate tasks
sebersole authored
177 // for the time being eat the annoying output from running the annotation processors
178 generateMainLoggingClasses.logging.captureStandardError(LogLevel.INFO)
179
43b812c @sebersole HHH-6000 - split annotation processor execution out into separate tasks
sebersole authored
180 compileJava.dependsOn generateMainLoggingClasses
006c96b @sslavic HHH-6228 Compile tasks using now UTF-8 encoding. Initially they used …
sslavic authored
181 compileJava.options.define(compilerArgs: ["-proc:none", "-encoding", "UTF-8"])
43b812c @sebersole HHH-6000 - split annotation processor execution out into separate tasks
sebersole authored
182
34c2839 @sebersole HHH-5616 - Switch to Gradle for builds
sebersole authored
183 manifest.mainAttributes(
184 provider: 'gradle',
185 'Implementation-Url': 'http://hibernate.org',
186 'Implementation-Version': version,
187 'Implementation-Vendor': 'Hibernate.org',
188 'Implementation-Vendor-Id': 'org.hibernate'
189 )
190
191 test {
901513e @sebersole HHH-5616 - Switch to Gradle for builds .. uploads
sebersole authored
192 systemProperties['hibernate.test.validatefailureexpected'] = true
34c2839 @sebersole HHH-5616 - Switch to Gradle for builds
sebersole authored
193 maxHeapSize = "1024m"
194 }
195
901513e @sebersole HHH-5616 - Switch to Gradle for builds .. uploads
sebersole authored
196 processTestResources.doLast( {
197 copy {
198 from( sourceSets.test.java.srcDirs ) {
199 include '**/*.properties'
200 include '**/*.xml'
34c2839 @sebersole HHH-5616 - Switch to Gradle for builds
sebersole authored
201 }
901513e @sebersole HHH-5616 - Switch to Gradle for builds .. uploads
sebersole authored
202 into sourceSets.test.classesDir
203 }
204 } )
34c2839 @sebersole HHH-5616 - Switch to Gradle for builds
sebersole authored
205
206 assemble.doLast( { install } )
207 uploadArchives.dependsOn install
208
209 targetCompatibility = "1.6"
210 sourceCompatibility = "1.6"
211
212 ideaModule {
3853152 @sebersole HHH-6106 - Fix up IntelliJ project generation
sebersole authored
213 beforeConfigured { module ->
214 module.excludeFolders.clear()
215 }
7ce80c9 @sebersole HHH-5616 - Switch to Gradle for builds .. IntelliJ
sebersole authored
216 scopes.COMPILE.plus.add( configurations.provided )
34c2839 @sebersole HHH-5616 - Switch to Gradle for builds
sebersole authored
217 whenConfigured { module ->
218 module.dependencies*.exported = true
219 }
44cca7a @sebersole HHH-6106 - Fix up IntelliJ project generation
sebersole authored
220 excludeDirs = [
221 file(".gradle"),
222 file("$buildDir/classes"),
223 file("$buildDir/dependency-cache"),
224 file("$buildDir/libs"),
225 file("$buildDir/reports"),
226 file("$buildDir/test-results"),
227 file("$buildDir/tmp")
228 ] as Set
34c2839 @sebersole HHH-5616 - Switch to Gradle for builds
sebersole authored
229 }
44cca7a @sebersole HHH-6106 - Fix up IntelliJ project generation
sebersole authored
230
4550cdf @stliu HHH-5649 improve eclipse support with migration to gradle
stliu authored
231 eclipseClasspath {
232 plusConfigurations.add( configurations.provided )
233 }
901513e @sebersole HHH-5616 - Switch to Gradle for builds .. uploads
sebersole authored
234
235 // elements used to customize the generated POM used during upload
236 def pomConfig = {
c7818f3 @sebersole prep 4.0.0.Beta1 release
sebersole authored
237 name 'A Hibernate Core Module'
15bc4ed @sebersole prep 4.0.0.Beta1 release
sebersole authored
238 description 'A module of the Hibernate Core project'
901513e @sebersole HHH-5616 - Switch to Gradle for builds .. uploads
sebersole authored
239 url 'http://hibernate.org'
7ce80c9 @sebersole HHH-5616 - Switch to Gradle for builds .. IntelliJ
sebersole authored
240 organization {
241 name 'Hibernate.org'
242 url 'http://hibernate.org'
243 }
901513e @sebersole HHH-5616 - Switch to Gradle for builds .. uploads
sebersole authored
244 issueManagement {
245 system 'jira'
246 url 'http://opensource.atlassian.com/projects/hibernate/browse/HHH'
247 }
248 scm {
249 url "http://github.com/hibernate/hibernate-core"
250 connection "scm:git:http://github.com/hibernate/hibernate-core.git"
251 developerConnection "scm:git:git@github.com:hibernate/hibernate-core.git"
252 }
253 licenses {
254 license {
255 name 'GNU Lesser General Public License'
256 url 'http://www.gnu.org/licenses/lgpl-2.1.html'
d3b5c68 @gbadner HHH-5890 : License comment refers to non-exiting page
gbadner authored
257 comments 'See discussion at http://hibernate.org/license for more details.'
901513e @sebersole HHH-5616 - Switch to Gradle for builds .. uploads
sebersole authored
258 distribution 'repo'
259 }
260 }
261 developers {
c7818f3 @sebersole prep 4.0.0.Beta1 release
sebersole authored
262 developer {
263 id 'hibernate-team'
264 name 'The Hibernate Development Team'
265 organization 'Hibernate.org'
266 organizationUrl 'http://hibernate.org'
267 }
901513e @sebersole HHH-5616 - Switch to Gradle for builds .. uploads
sebersole authored
268 }
269 }
270
4fd609e @sebersole HHH-5904 - Deploy just testing artifacts from hibernate-core, not all…
sebersole authored
271 subProject.basePomConfig = pomConfig
272
901513e @sebersole HHH-5616 - Switch to Gradle for builds .. uploads
sebersole authored
273 configure(install.repositories.mavenInstaller) {
274 pom.project pomConfig
275 }
276
277 uploadArchives {
278 repositories.mavenDeployer {
279 name = 'jbossDeployer'
280 configuration = configurations.deployerJars
281 pom.project pomConfig
4fd609e @sebersole HHH-5904 - Deploy just testing artifacts from hibernate-core, not all…
sebersole authored
282 repository(id: "jboss-releases-repository", url: "https://repository.jboss.org/nexus/service/local/staging/deploy/maven2/")
283 snapshotRepository(id: "jboss-snapshots-repository", url: "https://repository.jboss.org/nexus/content/repositories/snapshots")
901513e @sebersole HHH-5616 - Switch to Gradle for builds .. uploads
sebersole authored
284 }
285 }
286
f8acf15 @sebersole HHH-5616 - Switch to Gradle for builds ... applied javadoc and source…
sebersole authored
287 task sourcesJar(type: Jar, dependsOn: compileJava) {
288 from sourceSets.main.allSource
289 classifier = 'sources'
290 }
291
292 artifacts {
293 archives sourcesJar
294 }
295
b5f8d98 @stliu HHH-6332 rollback
stliu authored
296 uploadArchives.dependsOn sourcesJar
34c2839 @sebersole HHH-5616 - Switch to Gradle for builds
sebersole authored
297 }
901513e @sebersole HHH-5616 - Switch to Gradle for builds .. uploads
sebersole authored
298
34c2839 @sebersole HHH-5616 - Switch to Gradle for builds
sebersole authored
299 }
300
248ef97 @sebersole HHH-5616 - Switch to Gradle for builds .. gradlew
sebersole authored
301 dependsOnChildren()
302
303 // This is a task that generates the gradlew scripts, allowing users to run gradle without having gradle installed
304 // on their system.
44cca7a @sebersole HHH-6106 - Fix up IntelliJ project generation
sebersole authored
305 // This task should be run by "build master" and the resulting output committed to source control. Its outputs include:
248ef97 @sebersole HHH-5616 - Switch to Gradle for builds .. gradlew
sebersole authored
306 // 1) /gradlew which is the *NIX shell script for executing builds
307 // 2) /gradlew.bat which is the windows bat script for for executing builds
308 // 3) /wrapper which is a directory named by the "jarPath" config which contains other needed files.
309 task wrapper(type: Wrapper) {
44cca7a @sebersole HHH-6106 - Fix up IntelliJ project generation
sebersole authored
310 // HHH-6106 - this is needed for IntellJ generation until 1.0-milestone-3 is released.
311 gradleVersion = '1.0-milestone-3-20110411214339+0200'
ee6bde2 @gbadner change h2 to 1.2.140; add DVCC=TRUE to TestingDatabaseInfo
gbadner authored
312 }
Something went wrong with that request. Please try again.