You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by pa...@apache.org on 2015/06/08 13:40:23 UTC
[13/13] incubator-groovy git commit: replace ant javadoc fixtool call
with gradle plugin
replace ant javadoc fixtool call with gradle plugin
Project: http://git-wip-us.apache.org/repos/asf/incubator-groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-groovy/commit/84feb915
Tree: http://git-wip-us.apache.org/repos/asf/incubator-groovy/tree/84feb915
Diff: http://git-wip-us.apache.org/repos/asf/incubator-groovy/diff/84feb915
Branch: refs/heads/GROOVY_2_4_X
Commit: 84feb915704ab9c1b1b7be6e5d710923eb672d89
Parents: ed269cf
Author: Paul King <pa...@asert.com.au>
Authored: Mon Jun 8 21:04:46 2015 +1000
Committer: Paul King <pa...@asert.com.au>
Committed: Mon Jun 8 21:39:40 2015 +1000
----------------------------------------------------------------------
build.gradle | 6 ++++++
gradle/docs.gradle | 19 ++-----------------
2 files changed, 8 insertions(+), 17 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-groovy/blob/84feb915/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index dd4bfec..7facdda 100644
--- a/build.gradle
+++ b/build.gradle
@@ -23,11 +23,16 @@ buildscript {
name 'Bintray Asciidoctor repo'
url 'http://dl.bintray.com/content/aalmiray/asciidoctor'
}
+ maven{
+ name 'Bintray Javadoc Hotfix repo'
+ url 'http://dl.bintray.com/melix/gradle-javadoc-hotfix-plugin'
+ }
}
dependencies {
classpath 'org.asciidoctor:asciidoctor-gradle-plugin:1.5.2'
classpath 'org.jfrog.buildinfo:build-info-extractor-gradle:2.2.3'
+ classpath 'me.champeau.gradle:gradle-javadoc-hotfix-plugin:0.1'
//classpath 'me.champeau.gradle:japicmp-gradle-plugin:0.1.1'
//classpath 'nl.javadude.gradle.plugins:license-gradle-plugin:0.11.0'
}
@@ -36,6 +41,7 @@ buildscript {
apply from: 'gradle/filter.gradle'
apply from: 'gradle/indy.gradle'
apply from: 'gradle/bintray.gradle'
+apply plugin: 'javadocHotfix'
File javaHome = new File(System.getProperty('java.home'))
logger.lifecycle "Using Java from $javaHome (version ${System.getProperty('java.version')})"
http://git-wip-us.apache.org/repos/asf/incubator-groovy/blob/84feb915/gradle/docs.gradle
----------------------------------------------------------------------
diff --git a/gradle/docs.gradle b/gradle/docs.gradle
index 42f4041..a06cb18 100644
--- a/gradle/docs.gradle
+++ b/gradle/docs.gradle
@@ -182,24 +182,9 @@ task docGDK {
}
}
-// this will apply the javadoc fix tool to all generated javadocs
-// we use it to make sure that the javadocs are not vulnerable independently of the JDK used to build
+// apply javadoc fix tool to generated javadocs - ensures no vulnerability even on old JDK versions
allprojects {
- tasks.withType(Javadoc).all {
- doLast {
- logger.lifecycle("Fixing Javadoc (see http://www.kb.cert.org/vuls/id/225657) for $destinationDir".toString())
- def fixtext = org.apache.tools.ant.taskdefs.Javadoc.getResourceAsStream('javadoc-frame-injections-fix.txt').text.trim()
- ant {
- replace(encoding: 'UTF-8', summary: true) {
- fileset(dir: destinationDir, casesensitive: false, includes: '**/index.html,**/index.htm,**/toc.html,**/toc.htm') {
- not { contains(text: 'function validURL(url) {', casesensitive: true) }
- }
- replaceToken('function loadFrames() {')
- replaceValue(expandProperties: false, fixtext)
- }
- }
- }
- }
+ apply plugin: 'javadocHotfix'
}
if (JavaVersion.current().isJava7Compatible()) {