Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tested, multi-lingual user guide #677

Merged
merged 7 commits into from
Oct 11, 2018

Conversation

bmuschko
Copy link
Owner

  • Externalize source code from user guide and embed it instead
  • Very basic tests for externalized source code (the infrastructure can be improved in the future)
  • Shows Groovy and Kotlin DSL source example where applicable
  • User can switch between Groovy and Kotlin DSL via a tabbed view (implemented as AsciidoctorJ extension)
  • Clean up of existing sample source code

The testing of the source code revealed:

  • Reactive stream callbacks are currently not useable from the Kotlin DSL (as they use the Closure type)
  • Some of the code examples where not functional in their current form

@bmuschko bmuschko added this to the v4.0.0 milestone Oct 11, 2018
@bmuschko bmuschko self-assigned this Oct 11, 2018
@bmuschko bmuschko requested review from cdancy and orzeh October 11, 2018 17:58
@bmuschko bmuschko changed the title Add tested multi-lingual user guide Add tested, multi-lingual user guide Oct 11, 2018
@cdancy
Copy link
Collaborator

cdancy commented Oct 11, 2018

So are we trying to convert the entire project over to kotlin at this point?

@bmuschko
Copy link
Owner Author

bmuschko commented Oct 11, 2018

@cdancy No, this is just to document that you can use the plugin from a build script that leverages the Kotlin DSL. The plugin implementation will likely always stay in Groovy. Hope this makes things more clear.

@cdancy
Copy link
Collaborator

cdancy commented Oct 11, 2018

It's just a big change and trying to get a grep of what's in it. Looks entirely doc related and if I didn't know any better I'd say you were attempting to write a book about this plugin :)

@bmuschko
Copy link
Owner Author

bmuschko commented Oct 11, 2018

@cdancy No book planned really. ;-) I do it for two reasons:

  • Get familiar with the Kotlin DSL and the Kotlin language. So this project is more like a test bed.
  • You will see more and more Gradle users moving away from the Groovy DSL to the Kotlin DSL (with it going 1.0 final in Gradle 5.0). At least that's my prediction. It also means that those users will try to apply this plugin. If it doesn't work with the Kotlin DSL then they will complain and open issues. This PR emulates the users and demonstrates which portions of the plugin work and don't work with the Kotlin DSL.

You are right. This PR is only about documentation. We will want to change the implementation though to allow Kotlin DSL users to use the reactive streams properly. At least I couldn't find a way to make it work yet. You might want to generate the documentation for this branch just to see the effects of the change.

@cdancy
Copy link
Collaborator

cdancy commented Oct 11, 2018

Sounds good. @bmuschko is the "closures not working" a known issue we can work around with Kotlin? I've only been looking into the language very recently so I'm not sure if there is something analogous we can do.

@cdancy
Copy link
Collaborator

cdancy commented Oct 11, 2018

@bmuschko
Copy link
Owner Author

@cdancy Thanks for this pointer. I have been using this before but without any parameters. I will give it a shot. The example you posted shows how to deal with it.

@bmuschko
Copy link
Owner Author

@cdancy Had a look at it again. The it refers to the Map iterator and not the Closure parameter. I will have to ask on the Gradle Slack channel if there'a solution for it. The alternative is to turn it into an Action.

@bmuschko bmuschko merged commit ebc88f7 into master Oct 11, 2018
@bmuschko bmuschko deleted the bm/tested-multilingual-userguide branch October 11, 2018 20:03
@cdancy
Copy link
Collaborator

cdancy commented Oct 12, 2018

@bmuschko found this project this morning and appears to have a fair amount of helper functions we may be able to use with kotlin/gradle interop.

https://github.com/nebula-plugins/nebula-gradle-interop

@bmuschko
Copy link
Owner Author

@cdancy Thanks for the pointer. It won't be necessary. Currently, working on some internal changes that will leave the existing usage from the Groovy DSL intact while at the same time demonstrating the use from the Kotlin DSL for the reactive streams. Everything else is already useable from the Kotlin DSL.

@bmuschko
Copy link
Owner Author

bmuschko commented Oct 12, 2018

@cdancy Here it is: #678. The beauty of having tested sample code in documentation. :-) Now it pays off.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants