build.gradle 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. plugins {
  2. id 'org.asciidoctor.convert' version '1.5.3'
  3. }
  4. apply plugin: 'java'
  5. apply plugin: 'org.asciidoctor.convert'
  6. version = '3.1.0-SNAPSHOT'
  7. asciidoctorj {
  8. version = '1.5.4'
  9. }
  10. asciidoctor {
  11. resources {
  12. from('src/docs/images')
  13. }
  14. resources {
  15. from('src/docs/resources')
  16. }
  17. // Add requirement on Ruby extension.
  18. requires './src/docs/lib/emoji-inline-macro.rb'
  19. attributes 'build-gradle': file('build.gradle'),
  20. 'sourcedir': project.asciidoctor.sourceDir,
  21. 'endpoint-url': 'https://wiki.jmonkeyengine.org',
  22. 'source-highlighter' : 'coderay',
  23. 'linkcss': 'true',
  24. //'imagesdir':'/images',
  25. 'toc':'left',
  26. 'icons': 'font',
  27. 'setanchors':'true',
  28. 'idprefix':'',
  29. 'idseparator':'-',
  30. 'docinfo1':'true',
  31. 'wiki_link_edit_prefix': 'https://github.com/jMonkeyEngine/wiki/edit/master/src/docs/asciidoc',
  32. 'wiki_link_create_prefix': 'https://github.com/jMonkeyEngine/wiki/new/master/src/docs/asciidoc',
  33. 'orgname':'jMonkeyEngine'
  34. options header_footer: true,
  35. template_dirs: [file('src/templates/slim').absolutePath]
  36. /*
  37. extensions {
  38. block_macro(name: 'iframe') {
  39. parent, target, attributes ->
  40. String content = """<iframe src="${target}"></iframe>""";
  41. createBlock(parent, "pass", [content], attributes, config);
  42. }
  43. }
  44. */
  45. }
  46. asciidoctor.doLast {
  47. copy {
  48. from 'build/asciidoc/html5'
  49. into 'build/asciidoc/html5'
  50. rename { String fileName -> 'index.html'}
  51. include 'documentation.html'
  52. }
  53. }