Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 84 lines (77 sloc) 2.263 kB
5f16704 @egonw Added set up for creating module HTML pages
authored
1 #!/usr/bin/groovy
2
917cc7e @egonw Added link to JUnit stats
authored
3 def nightly = "http://pele.farmbio.uu.se/nightly-1.2.x/"
a917c82 @egonw Added list of classes in the module, with links to Nightly@Pele
authored
4
5f16704 @egonw Added set up for creating module HTML pages
authored
5 ant = new AntBuilder()
6
7 ant.delete(dir:"doc/modules")
8 ant.mkdir(dir:"doc/modules")
9
10 def basedir = new File("src/META-INF")
11 files = basedir.listFiles().grep(~/.*cdkdepends$/)
ede2572 @egonw Added set up for creating module HTML pages
authored
12 files.add(new File(basedir,"annotation.cdkdepends"))
13 files.add(new File(basedir,"interfaces.cdkdepends"))
7693308 @egonw Output where it is working on
authored
14 files.each { file ->
15 println "Processing $file";
5f16704 @egonw Added set up for creating module HTML pages
authored
16 m = (file =~ ~/\/([-|\w]*)\.cdkdepends/)
17 module = m[0][1]
18
19 def writer = new StringWriter()
20 def builder = new groovy.xml.MarkupBuilder(writer)
21 builder.html(){
22 head(){
23 title("CDK Module: " + module){}
24 }
25 body(){
26 h1("CDK Module: " + module)
917cc7e @egonw Added link to JUnit stats
authored
27 if (!module.contains("test")) {
28 h2("QA Reports")
29 p(){
30 junitURL = nightly+"test/result-"+module
31 stats = "";
32 try {
33 junitURL.toURL().eachLine {
34 if (it =~ ~/Tests\srun/) {
35 stats = it
36 }
37 }
38 a(href:junitURL,"JUnit")
39 span(": " + stats)
40 } catch (FileNotFoundException exc) {}
41 }
42 }
cbdffa7 @egonw Added links to PMD pages
authored
43 p(){
44 a(href:nightly+"javadoc/$module/", "DocCheck Results")
45 }
46 p(){
47 span("PDM: ")
48 a(href:nightly+"pmd-unused/"+module+".html", "unused")
49 a(href:nightly+"pmd-migrating/"+module+".html", "migration")
50 a(href:nightly+"pmd/"+module+".html", "all")
51 }
ede2572 @egonw Added set up for creating module HTML pages
authored
52 h2("Depends")
53 p(){
54 if (file.exists()) {
55 b("CDK")
56 file.text.eachLine{
57 dependency = (it =~ ~/cdk-([-|\w]*)\.jar/)[0][1]
58 a(href:dependency+".html", dependency)
59 }
60 }
61 }
62 libdepends = new File(basedir, module + ".libdepends")
63 p(){
64 if (libdepends.exists()) {
65 b("Libraries")
66 libdepends.text.eachLine{
67 span(it)
68 }
69 }
70 }
a917c82 @egonw Added list of classes in the module, with links to Nightly@Pele
authored
71 h2("Classes")
72 classes = new File("build/" + module + ".javafiles").text
73 classes.eachLine {
74 classURL = it.replaceAll(/.java/,"")
75 clazz = classURL.replaceAll(/\//,".")
917cc7e @egonw Added link to JUnit stats
authored
76 a(href:nightly+"api/"+classURL+".html", clazz)
a917c82 @egonw Added list of classes in the module, with links to Nightly@Pele
authored
77 br()
78 }
ede2572 @egonw Added set up for creating module HTML pages
authored
79 }
5f16704 @egonw Added set up for creating module HTML pages
authored
80 }
81 new File("doc/modules/" + module + ".html").write(writer.toString())
82 }
83
Something went wrong with that request. Please try again.