2021-08-02 19:04:41 -04:00
|
|
|
import org.asciidoctor.gradle.jvm.AsciidoctorTask
|
|
|
|
|
|
|
|
plugins {
|
2021-10-19 10:23:42 -04:00
|
|
|
id 'org.asciidoctor.jvm.convert' version '3.3.2'
|
2021-08-02 19:04:41 -04:00
|
|
|
}
|
2017-12-13 10:15:22 -05:00
|
|
|
|
2015-05-19 00:23:35 -04:00
|
|
|
/*
|
|
|
|
* Hibernate, Relational Persistence for Idiomatic Java
|
|
|
|
*
|
|
|
|
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
|
|
|
|
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
|
|
|
|
*/
|
2018-01-10 16:06:58 -05:00
|
|
|
|
|
|
|
|
|
|
|
apply from: rootProject.file( 'gradle/java-module.gradle' )
|
2021-07-14 12:44:35 -04:00
|
|
|
apply plugin: 'org.hibernate.matrix-test'
|
2016-02-18 04:16:46 -05:00
|
|
|
|
2021-06-28 16:59:35 -04:00
|
|
|
tasks.build.dependsOn 'buildDocs'
|
2013-11-22 15:51:56 -05:00
|
|
|
defaultTasks 'buildDocs'
|
|
|
|
|
2015-03-24 21:38:39 -04:00
|
|
|
|
2011-03-22 11:39:53 -04:00
|
|
|
dependencies {
|
2016-02-08 10:33:09 -05:00
|
|
|
ext.pressgangVersion = '3.0.0'
|
2013-11-22 15:51:56 -05:00
|
|
|
|
2021-05-14 15:59:59 -04:00
|
|
|
implementation project( ':hibernate-core' )
|
2016-02-08 10:33:09 -05:00
|
|
|
|
2021-05-14 15:59:59 -04:00
|
|
|
annotationProcessor project( ':hibernate-jpamodelgen' )
|
2011-03-29 16:14:09 -04:00
|
|
|
|
2021-05-14 15:59:59 -04:00
|
|
|
testImplementation project(':hibernate-testing')
|
|
|
|
testImplementation project(':hibernate-envers')
|
2021-09-22 18:52:06 -04:00
|
|
|
testImplementation project(':hibernate-spatial')
|
2021-11-16 11:15:58 -05:00
|
|
|
testImplementation project(':hibernate-jcache')
|
2021-05-14 15:59:59 -04:00
|
|
|
testImplementation project( path: ':hibernate-core', configuration: 'tests' )
|
|
|
|
|
|
|
|
testImplementation 'org.apache.commons:commons-lang3:3.4'
|
|
|
|
testImplementation 'org.osgi:org.osgi.core:4.3.1'
|
|
|
|
|
|
|
|
testImplementation libraries.mockito
|
|
|
|
testImplementation libraries.mockito_inline
|
|
|
|
|
|
|
|
testRuntimeOnly libraries.wildfly_transaction_client
|
2021-11-16 11:15:58 -05:00
|
|
|
testRuntimeOnly(libraries.ehcache3) {
|
|
|
|
capabilities {
|
|
|
|
requireCapability 'org.ehcache.modules:ehcache-xml-jakarta'
|
|
|
|
}
|
|
|
|
}
|
2016-01-13 01:28:20 -05:00
|
|
|
}
|
2013-11-22 15:51:56 -05:00
|
|
|
|
2016-03-22 09:16:21 -04:00
|
|
|
|
2018-04-30 11:38:09 -04:00
|
|
|
if ( project.ormVersion.isSnapshot ) {
|
2018-01-22 12:28:24 -05:00
|
|
|
// only run the ci build tasks for SNAPSHOT versions
|
|
|
|
task ciBuild( dependsOn: [clean, test] )
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
task release( dependsOn: [clean, test] )
|
|
|
|
}
|
|
|
|
|
2021-05-08 16:42:43 -04:00
|
|
|
//tasks.test.include 'org/hibernate/'
|
|
|
|
|
2016-02-11 16:59:13 -05:00
|
|
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
// grouping tasks - declaration, see below for task dependency definitions
|
|
|
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
2013-11-22 15:51:56 -05:00
|
|
|
task buildDocs {
|
2016-02-11 16:59:13 -05:00
|
|
|
group 'Documentation'
|
|
|
|
description 'Grouping task for performing all documentation building tasks'
|
|
|
|
}
|
|
|
|
|
|
|
|
task buildDocsForPublishing {
|
|
|
|
group 'Documentation'
|
|
|
|
description 'Grouping task for building all documentation for publishing (release)'
|
2013-11-22 15:51:56 -05:00
|
|
|
}
|
|
|
|
|
2016-02-11 16:59:13 -05:00
|
|
|
|
2021-08-02 19:04:41 -04:00
|
|
|
asciidoctorj {
|
|
|
|
attributes icons: 'font',
|
|
|
|
experimental: true,
|
|
|
|
'source-highlighter': 'prettify',
|
|
|
|
majorMinorVersion: rootProject.ormVersion.family,
|
|
|
|
fullVersion: rootProject.ormVersion.fullName
|
|
|
|
|
|
|
|
options logDocuments: true
|
2011-03-29 16:14:09 -04:00
|
|
|
}
|
|
|
|
|
2021-08-02 19:04:41 -04:00
|
|
|
|
2015-07-14 15:46:02 -04:00
|
|
|
// Topical Guides ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
2011-03-29 16:14:09 -04:00
|
|
|
|
2021-09-27 08:09:29 -04:00
|
|
|
task renderTopicalGuides(type: AsciidoctorTask, group: 'Documentation') {task->
|
2015-07-14 15:46:02 -04:00
|
|
|
description = 'Renders the Topical Guides in HTML format using Asciidoctor.'
|
2021-09-27 08:09:29 -04:00
|
|
|
tasks.buildDocs.dependsOn task
|
|
|
|
tasks.buildDocsForPublishing.dependsOn task
|
2021-08-02 19:04:41 -04:00
|
|
|
|
2015-07-14 15:46:02 -04:00
|
|
|
sourceDir = file( 'src/main/asciidoc/topical' )
|
2021-08-02 19:04:41 -04:00
|
|
|
outputDir = new File("$buildDir/asciidoc/topical/html_single")
|
|
|
|
|
2018-04-16 16:28:08 -04:00
|
|
|
resources {
|
|
|
|
from('src/main/asciidoc/topical/') {
|
|
|
|
include '**/images/**'
|
|
|
|
}
|
|
|
|
}
|
2011-03-29 16:14:09 -04:00
|
|
|
}
|
|
|
|
|
2013-10-14 21:12:47 -04:00
|
|
|
|
2015-07-14 15:46:02 -04:00
|
|
|
// Getting Started Guides (quick starts) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
2013-11-22 15:51:56 -05:00
|
|
|
|
2021-09-27 08:09:29 -04:00
|
|
|
task renderGettingStartedGuides(type: AsciidoctorTask, group: 'Documentation') {task->
|
2015-07-14 15:46:02 -04:00
|
|
|
description = 'Renders the Getting Started Guides (quick starts) in HTML format using Asciidoctor.'
|
2021-09-27 08:09:29 -04:00
|
|
|
tasks.buildDocs.dependsOn task
|
|
|
|
tasks.buildDocsForPublishing.dependsOn task
|
2021-08-02 19:04:41 -04:00
|
|
|
|
2015-07-14 15:46:02 -04:00
|
|
|
sourceDir = file( 'src/main/asciidoc/quickstart/guides' )
|
2018-06-26 04:49:57 -04:00
|
|
|
sources {
|
|
|
|
include 'index.adoc'
|
|
|
|
}
|
2016-02-11 16:59:13 -05:00
|
|
|
outputDir = new File("$buildDir/asciidoc/quickstart/html_single")
|
2013-10-31 07:08:36 -04:00
|
|
|
}
|
|
|
|
|
2016-02-11 16:59:13 -05:00
|
|
|
|
2021-09-27 08:09:29 -04:00
|
|
|
task buildTutorialZip(type: Zip) {task->
|
2016-02-11 16:59:13 -05:00
|
|
|
from 'src/main/asciidoc/quickstart/tutorials'
|
2021-06-28 16:59:35 -04:00
|
|
|
destinationDirectory = tasks.renderGettingStartedGuides.outputDir
|
|
|
|
archiveBaseName = 'hibernate-tutorials.zip'
|
2016-02-11 16:59:13 -05:00
|
|
|
expand(
|
|
|
|
version: project.version,
|
|
|
|
slf4j: "1.7.5",
|
2018-01-10 16:06:58 -05:00
|
|
|
junit: project.junitVersion,
|
|
|
|
h2: project.h2Version
|
2016-02-11 16:59:13 -05:00
|
|
|
)
|
2021-09-27 08:09:29 -04:00
|
|
|
tasks.renderGettingStartedGuides.dependsOn task
|
2016-02-11 16:59:13 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2016-08-02 09:45:36 -04:00
|
|
|
// User Guide ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
2021-09-27 08:09:29 -04:00
|
|
|
task renderUserGuide(type: AsciidoctorTask, group: 'Documentation') {task->
|
2016-01-11 10:25:13 -05:00
|
|
|
description = 'Renders the User Guides in HTML format using Asciidoctor.'
|
2021-09-27 08:09:29 -04:00
|
|
|
tasks.buildDocs.dependsOn task
|
|
|
|
tasks.buildDocsForPublishing.dependsOn task
|
2021-08-02 19:04:41 -04:00
|
|
|
|
2016-01-11 10:25:13 -05:00
|
|
|
sourceDir = file( 'src/main/asciidoc/userguide' )
|
2018-06-26 04:49:57 -04:00
|
|
|
sources {
|
|
|
|
include 'Hibernate_User_Guide.adoc'
|
|
|
|
}
|
2016-02-11 16:59:13 -05:00
|
|
|
outputDir = new File("$buildDir/asciidoc/userguide/html_single")
|
2021-08-02 19:04:41 -04:00
|
|
|
|
|
|
|
attributes linkcss: true,
|
2017-09-12 08:40:34 -04:00
|
|
|
stylesheet: "css/hibernate.css",
|
2020-04-14 10:58:41 -04:00
|
|
|
docinfo: 'private',
|
|
|
|
jpaJavadocUrlPrefix: "https://javaee.github.io/javaee-spec/javadocs/javax/persistence/"
|
2017-09-12 08:40:34 -04:00
|
|
|
|
|
|
|
resources {
|
2016-01-11 10:25:13 -05:00
|
|
|
from('src/main/asciidoc/userguide/') {
|
|
|
|
include 'images/**'
|
|
|
|
}
|
2016-03-02 08:16:13 -05:00
|
|
|
from('src/main/style/asciidoctor') {
|
|
|
|
include 'images/**'
|
|
|
|
}
|
2016-02-29 08:06:03 -05:00
|
|
|
from('src/main/style/asciidoctor') {
|
|
|
|
include 'css/**'
|
|
|
|
}
|
2017-09-12 08:40:34 -04:00
|
|
|
from('src/main/style/asciidoctor') {
|
|
|
|
include 'js/**'
|
|
|
|
}
|
2016-01-11 10:25:13 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-08-02 09:45:36 -04:00
|
|
|
// Integration Guide ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
2021-09-27 08:09:29 -04:00
|
|
|
task renderIntegrationGuide(type: AsciidoctorTask, group: 'Documentation') {task->
|
2016-08-02 09:45:36 -04:00
|
|
|
description = 'Renders the User Guides in HTML format using Asciidoctor.'
|
2021-09-27 08:09:29 -04:00
|
|
|
tasks.buildDocs.dependsOn task
|
|
|
|
tasks.buildDocsForPublishing.dependsOn task
|
2021-08-02 19:04:41 -04:00
|
|
|
|
2016-08-02 09:45:36 -04:00
|
|
|
sourceDir = file( 'src/main/asciidoc/integrationguide' )
|
2018-06-26 04:49:57 -04:00
|
|
|
sources {
|
|
|
|
include 'Hibernate_Integration_Guide.adoc'
|
|
|
|
}
|
2021-08-02 19:04:41 -04:00
|
|
|
|
2016-08-02 09:45:36 -04:00
|
|
|
outputDir = new File("$buildDir/asciidoc/integrationguide/html_single")
|
2021-08-02 19:04:41 -04:00
|
|
|
|
|
|
|
attributes linkcss: true,
|
|
|
|
stylesheet: "css/hibernate.css"
|
|
|
|
|
2016-08-02 09:45:36 -04:00
|
|
|
resources {
|
|
|
|
from('src/main/asciidoc/integrationguide/') {
|
|
|
|
include 'images/**'
|
|
|
|
}
|
|
|
|
from('src/main/style/asciidoctor') {
|
|
|
|
include 'images/**'
|
|
|
|
}
|
|
|
|
from('src/main/style/asciidoctor') {
|
|
|
|
include 'css/**'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2016-01-11 10:25:13 -05:00
|
|
|
|
2021-08-05 11:04:54 -04:00
|
|
|
tasks.withType(AsciidoctorTask).all {
|
|
|
|
baseDirFollowsSourceDir()
|
|
|
|
outputOptions {
|
|
|
|
separateOutputDirs = false
|
|
|
|
backends 'html5'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-03-21 15:57:57 -04:00
|
|
|
// Testing
|
|
|
|
|
2021-05-08 16:42:43 -04:00
|
|
|
test {
|
2021-08-23 11:23:12 -04:00
|
|
|
include '**/**'
|
2021-05-08 16:42:43 -04:00
|
|
|
}
|
|
|
|
|
2018-03-21 15:57:57 -04:00
|
|
|
// resources inherently exclude sources
|
|
|
|
sourceSets.test.resources {
|
|
|
|
setSrcDirs( ['src/test/java','src/test/resources'] )
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2016-02-11 16:59:13 -05:00
|
|
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
// grouping tasks
|
|
|
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
2015-07-14 15:46:02 -04:00
|
|
|
|
2016-02-11 16:59:13 -05:00
|
|
|
buildDocs.dependsOn renderTopicalGuides
|
|
|
|
buildDocs.dependsOn renderGettingStartedGuides
|
|
|
|
buildDocs.dependsOn renderUserGuide
|
2016-08-02 09:45:36 -04:00
|
|
|
buildDocs.dependsOn renderIntegrationGuide
|
2015-07-14 15:46:02 -04:00
|
|
|
|
2016-02-11 16:59:13 -05:00
|
|
|
buildDocsForPublishing.dependsOn renderTopicalGuides
|
|
|
|
buildDocsForPublishing.dependsOn renderGettingStartedGuides
|
|
|
|
buildDocsForPublishing.dependsOn renderUserGuide
|
2016-08-02 09:45:36 -04:00
|
|
|
buildDocsForPublishing.dependsOn renderIntegrationGuide
|
2017-12-13 12:38:25 -05:00
|
|
|
|
|
|
|
checkstyleMain.exclude '**/org/hibernate/userguide/model/*'
|
2018-01-10 16:06:58 -05:00
|
|
|
|