Skip to content

Commit 1840712

Browse files
committed
Build: Set allow-script-in-comments for newer java 8 versions.
1 parent f490fff commit 1840712

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

build.gradle

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ configure(subprojects.findAll { it.name != 'util' }) {
105105
exclude "**/org/bson/**/internal/**"
106106

107107
dependsOn project(':util').compileJava //We need taglets to be compiled
108+
108109
options.author = true
109110
options.version = true
110111
options.links 'http://docs.oracle.com/javase/7/docs/api/'
@@ -136,6 +137,14 @@ configure(subprojects.findAll { it.name != 'util' }) {
136137
}
137138
</script>
138139
'''
140+
141+
// Add --allow-script-in-comments if available (since 1.8.0_121)
142+
try {
143+
if (Class.forName('com.sun.tools.doclets.formats.html.ConfigurationImpl')
144+
.newInstance().optionLength('--allow-script-in-comments') > 0) {
145+
options.addBooleanOption("-allow-script-in-comments", true)
146+
}
147+
} catch (ignored) {}
139148
}
140149
}
141150

0 commit comments

Comments
 (0)