asciidoctor / asciidoclet

:clipboard: A Javadoc Doclet based on Asciidoctor that lets you write Javadoc in the AsciiDoc syntax.
https://github.com/asciidoctor/asciidoclet
Apache License 2.0
133 stars 40 forks source link

Latest 0.1.3 doclet testing #17

Closed jnorthr closed 10 years ago

jnorthr commented 10 years ago

have forked this doclet to https://github.com/jnorthr/asciidoclet and started to build a gradle wrapper around it. This is just so i can do some testing in isolation. If you care to try, you can clone my repo into some directory on your system, then CD into that directory and from a terminal command line do :

gradlew

that's all ya need as gradle carries it's own jars for self-execution as a 'wrapper' so gradlew just runs the internal gradle. It looks at the build.gradle script to get a default list of tasks to do(clean,build...) and also sees all those code dependencies the doclet needs to do it's thing and downloads them into it's own cache. I have made a guess at which dependencies to use and this combination seem to work:

asciidoclet 'org.asciidoctor:asciidoclet:0.1.3'  
compile group:'org.asciidoctor', name:'asciidoctor-java-integration', version:'0.1.4'
compile 'org.powermock:powermock-api-mockito:1.4.12'
compile 'org.codehaus.groovy:groovy:2.2.1'
compile group: 'junit',name:'junit',version: '4.+' 
compile group: 'org.powermock', name:'powermock-module-junit4', version:'1.5.4'
testCompile group: 'junit',name:'junit',version: '4.+' 

may not be the right combo but it all runs fine ! see screenshots to follow:

screen shot 2014-02-23 at 7 53 40 am

while the command to create javadocs looks like this:

screen shot 2014-02-23 at 7 57 40 am

there's some warnings there we need to figure out. any ideas guys ??

next up is more heavy-duty testing - more soon ;-}

johncarl81 commented 10 years ago

By the way, I went ahead and released 0.1.4:

asciidoclet 'org.asciidoctor:asciidoclet:0.1.4'

We've seen these warnings before, I believe they are from processing over the package multiple times. In the end these are annoying but benign. If you have an idea on how to fix them I'm all ears.

That's awesome that it works with Gradle so simply and out of the box. I'm not sure I want to break from Maven just yet, but this is a good example.

jnorthr commented 10 years ago

ah, wonderful ! i can go forward with that. while i was looking for ways to include your doclet with groovy, i came across this set of links related to UML generation from markup in java source code. It's a java thing so it may give u a few ideas :)

overview: https://code.google.com/p/enhanced-groovydoc/

source code: https://code.google.com/p/enhanced-groovydoc/source/browse/#svn%2Ftrunk%2Fenhanced-groovydoc%2Fsrc%2Fmain%2Fjava%2Forg%2Fumlgraph%2Fdoclet

On 23 February 2014 17:13, John Ericksen notifications@github.com wrote:

By the way, I went ahead and released 0.1.4:

asciidoclet 'org.asciidoctor:asciidoclet:0.1.4'

We've seen these warnings before, I believe they are from processing over the package multiple times. In the end these are annoying but benign. If you have an idea on how to fix them I'm all ears.

That's awesome that it works with Gradle so simply and out of the box. I'm not sure I want to break from Maven just yet, but this is a good example.

— Reply to this email directly or view it on GitHubhttps://github.com/asciidoctor/asciidoclet/issues/17#issuecomment-35835086 .

jnorthr commented 10 years ago

john was going to ask if a java source module is using BOTH asciidoc markup together with the old-style javadocs markup, would your doclet handle that senario ?

also to build/test, is it ok to use powermock-api-mockito:1.4.12 or do ya prefer another version ?

jnorthr commented 10 years ago

have been looking 2 c how we could use this doclet in groovy-land. it looks like the bog-standard groovydocs tool will NOT do doclets out-of-the-box. i would need to mod that tool and really dont have the time 4 that, cos i'm still on the trail of the asciidoctorTemplateEngine for groovy guys (and gals) - perhaps later