Browse Source

Fix guides spec

Rob Winch 11 years ago
parent
commit
f1f3acdf75
1 changed files with 20 additions and 29 deletions
  1. 20 29
      docs/guides/build.gradle

+ 20 - 29
docs/guides/build.gradle

@@ -1,36 +1,27 @@
+apply plugin: 'asciidoctor'
 
 
-import org.asciidoctor.gradle.*
-
-file("src/asciidoc").eachFileMatch(~/.*\.asc/) { file->
-    task "asciidoctor-${file.name}"(type: AsciidoctorTask) {
-        sourceDocumentName = file
-        options = [
-          eruby: 'erubis',
-          eruby: 'erubis',
-          attributes: [
-              copycss : '',
-              icons : 'font',
-              'source-highlighter': 'prettify',
-              sectanchors : '',
-              toc2: '',
-              idprefix: '',
-              idseparator: '-',
-              doctype: 'book',
-              'spring-security-version' : project.version,
-              revnumber : project.version
-          ]
-        ]
-    }
-}
-
-task asciidoctor {
-    group = 'Documentation'
-    description = "Generates the asciidoc for $project.name"
-    dependsOn tasks.matching { t -> t.name.startsWith('asciidoctor-') }
+asciidoctor {
+    options = [
+      eruby: 'erubis',
+      eruby: 'erubis',
+      attributes: [
+          copycss : '',
+          icons : 'font',
+          'source-highlighter': 'prettify',
+          sectanchors : '',
+          toc2: '',
+          idprefix: '',
+          idseparator: '-',
+          doctype: 'book',
+          'spring-security-version' : project.version,
+          revnumber : project.version
+      ]
+    ]
 }
 }
 
 
 ext.spec = copySpec {
 ext.spec = copySpec {
     into ('guides') {
     into ('guides') {
-        from("$buildDir/asciidoctor/dist/html5/")
+        from(asciidoctor.outputDir)
+        exclude 'build', 'Guardfile'
     }
     }
 }
 }