forked from robfletcher/spock-extensions
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathgroovydoc.gradle
34 lines (31 loc) · 1.63 KB
/
groovydoc.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import java.text.SimpleDateFormat
/**
* http://gradle.org/docs/current/dsl/org.gradle.api.tasks.javadoc.Groovydoc.html
*/
def d = new Date()
def time = new SimpleDateFormat( "HH:mm '(GMT'Z')'" ).format( d )
def date = new SimpleDateFormat( 'MMMM dd, yyyy' ).format( d )
groovydoc {
use = true
groovyClasspath = configurations.compile // http://issues.gradle.org/browse/GRADLE-1391
destinationDir = new File(( System.getProperty( 'groovydocDir' ) ?: project.buildDir.path + '/groovydoc' ),
( project.version.contains( '-SNAPSHOT' ) ? '' : project.version ))
header = '<a href="http://evgeny-goldin.com/wiki/Spock-extensions">evgeny-goldin.com/wiki/Spock-extensions</a>'
footer = '<a href="http://evgeny-goldin.com/">Evgeny Goldin</a>. GrovyDoc was generated at ' + "$time on $date." + """
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-7925869-2']);
_gaq.push(['_setDomainName', 'none']);
_gaq.push(['_setAllowLinker', true]);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
"""
link 'http://download.oracle.com/javase/6/docs/api/', 'java.'
link 'http://evgeny-goldin.org/javadoc/spock-core/', 'spock.', 'org.spockframework'
link 'http://groovy.codehaus.org/api/', 'groovy.', 'org.codehaus.groovy.'
}