2020-10-15 18:20:30 -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
* /
apply from: rootProject . file ( 'gradle/base-information.gradle' )
2023-08-29 14:19:06 -04:00
tasks . named ( "javadoc" , Javadoc ) {
def currentYear = new GregorianCalendar ( ) . get ( Calendar . YEAR )
inputs . property "ormVersion" , project . ormVersion
inputs . property "currentYear" , currentYear
// exclude any generated sources and internal packages
exclude '**/generated-src/**'
exclude '**/internal/**'
include '**/*.java'
2020-10-15 18:20:30 -04:00
2023-08-29 14:19:06 -04:00
maxMemory = '512m'
2020-10-15 18:20:30 -04:00
configure ( options ) {
// this is the config needed to use asciidoclet for Javadoc rendering. It relies on a build from John's PR @ https://github.com/asciidoctor/asciidoclet/pull/91
// however, the PR does not work for me in that Javadocs with `@asciidoclet` are not rendered using asciidoc(tor/let). Also tried the preferable `@asciidoc`
// with the same result. Leaving all this config in place however as the outcome is the same as not enabling it.
// todo (6.0) : need to find out why the asciidoclet PR does not work
//
// Travis CI JDK 11 build did not like this
// docletpath = configurations.asciidoclet.files.asType(List)
// doclet = 'org.asciidoctor.Asciidoclet'
2023-08-29 14:19:06 -04:00
2020-10-15 18:20:30 -04:00
use = true
encoding = 'UTF-8'
2023-08-15 14:38:31 -04:00
2023-08-29 14:19:06 -04:00
stylesheetFile = rootProject . file ( "shared/javadoc/stylesheet.css" )
bottom = "Copyright © 2001-$currentYear <a href=\"https://redhat.com\">Red Hat, Inc.</a> All Rights Reserved."
2023-09-21 12:20:21 -04:00
// The javadoc folder contains cached versions of the respective element-list files to avoid release issues when servers are down
// When upgrading versions of the libraries, don't forget to update the file contents in the repository
linksOffline 'https://docs.oracle.com/en/java/javase/11/docs/api/' , "${project.rootDir}/javadoc/javase11"
linksOffline 'https://jakarta.ee/specifications/bean-validation/3.0/apidocs/' , "${project.rootDir}/javadoc/jakarta-validation-3.0"
linksOffline 'https://jakarta.ee/specifications/cdi/4.0/apidocs/' , "${project.rootDir}/javadoc/jakarta-cdi-4.0"
linksOffline 'https://jakarta.ee/specifications/platform/9/apidocs/' , "${project.rootDir}/javadoc/jakarta-platform-9"
linksOffline 'https://www.javadoc.io/doc/javax.cache/cache-api/1.0.0/' , "${project.rootDir}/javadoc/javax-cache-1.0"
2020-10-15 18:20:30 -04:00
tags (
2023-08-15 14:38:31 -04:00
'todo:X' ,
'apiNote:a:API Note:' ,
'implSpec:a:Implementation Specification:' ,
'implNote:a:Implementation Note:' ,
'settingDefault:f:Default Value:'
2020-10-15 18:20:30 -04:00
)
2023-08-29 14:19:06 -04:00
addStringOption ( 'Xdoclint:none' , '-quiet' )
2020-10-15 18:20:30 -04:00
}
2021-06-26 09:46:09 -04:00
}
task javadocJar ( type: Jar ) {
from project . tasks . javadoc . outputs
manifest {
attributes (
// Basic JAR manifest attributes
'Specification-Title' : project . name ,
'Specification-Version' : project . version ,
'Specification-Vendor' : 'Hibernate.org' ,
'Implementation-Title' : project . name ,
'Implementation-Version' : project . version ,
'Implementation-Vendor' : 'Hibernate.org' ,
'Implementation-Vendor-Id' : 'org.hibernate' ,
'Implementation-Url' : 'https://hibernate.org/orm' ,
// Hibernate-specific JAR manifest attributes
'Hibernate-VersionFamily' : project . ormVersion . family ,
2021-09-22 18:52:06 -04:00
'Hibernate-JpaVersion' : project . jakartaJpaVersion . name
2021-06-26 09:46:09 -04:00
)
}
archiveClassifier . set ( 'javadoc' )
2021-09-27 08:09:29 -04:00
}