Gr8Conf US 2018: Add some Groovy magic to your Java project – why, where and how to leverage Groovy in a Java codebase

Gr8Conf US 2018: Add some Groovy magic to your Java project – why, where and how to leverage Groovy in a Java codebase

Given the fact that Groovy is such a powerful and flexible technology, with a very flat learning curve for Java developers, it is surprising how little it's used in Java projects and how many Java devs there are that have never coded a line of Groovy code. As a result, they are missing out on a very strong device in their programming toolbox. This talk is dedicated to all the Java developers interested in making their life easier by adding some Groovy goodness to their projects. I will present practical and easy ways of incorporating Groovy into any Java project, including such areas as tests, generating demo data, scripting, building your project and, finally, enhancing your Continuous Delivery infrastructure.

2559c50bf24b65eaba52fd7c75260c93?s=128

Olga Maciaszek-Sharma

July 26, 2018
Tweet

Transcript

  1. Add some Groovy Add some Groovy magic to your Java

    magic to your Java project. project. Why, where and how to leverage Why, where and how to leverage Groovy in a Java codebase. Groovy in a Java codebase. @olga_maciaszek Olga Maciaszek-Sharma 26.07.2018
  2. Olga Maciaszek-Sharma Olga Maciaszek-Sharma @olga_maciaszek https:/ /github.com/OlgaMaciaszek https:/ /github.com/OlgaMaciaszek @

    @olga_maciaszek olga_maciaszek
  3. Groovy Popularity Groovy Popularity https:/ /www.tiobe.com/tio https:/ /www.tiobe.com/tio be-index/ be-index/

    @olga_maciaszek
  4. Code Demo Code Demo Java Code into Groovy Java Code

    into Groovy @olga_maciaszek
  5. Code Demo Code Demo Groovy and Java in 1 project

    Groovy and Java in 1 project @olga_maciaszek
  6. Maven Maven <dependency> <groupId>org.codehaus.groovy</groupId> <artifactId>groovy-all</artifactId> </dependency> <plugin> <groupId>org.codehaus.gmavenplus</groupId> <artifactId>gmavenplus-plugin</artifactId> <version>1.5</version>

    <executions> <execution> <goals> <goal>testCompile</goal> <goal>compile</goal> </goals> </execution> </executions> </plugin> @olga_maciaszek
  7. Features Tools Features Tools Frameworks Frameworks @olga_maciaszek

  8. Spock Spock @olga_maciaszek

  9. Json/ XML parsing Json/ XML parsing @olga_maciaszek

  10. Scripting Scripting @olga_maciaszek

  11. DSLs DSLs @olga_maciaszek Command Chaining Operator Overloading Closures and Delegates

    AST Transformations *
  12. Gradle Gradle

  13. Jenkins Job DSL Jenkins Job DSL https://jenkinsci.github.io/job-dsl-plugin/ https://job-dsl.herokuapp.com/ @olga_maciaszek

  14. Performance Performance @CompileStatic / @CompileDynamic @olga_maciaszek

  15. Private Scope Private Scope @PackageScope @olga_maciaszek

  16. IDE Support IDE Support @olga_maciaszek

  17. Closure Hell Closure Hell @olga_maciaszek

  18. Method Missing Method Missing Inferno Inferno @olga_maciaszek

  19. Conventions Conventions @olga_maciaszek

  20. Demo Code Links Demo Code Links https://github.com/OlgaMaciaszek/groovy-demo-java-for- refactor https://github.com/OlgaMaciaszek/groovy-demo-file- refactor

    https://github.com/OlgaMaciaszek/groovy-demo @olga_maciaszek
  21. https:/ /github.com/OlgaMaciaszek https:/ /github.com/OlgaMaciaszek @ @olga_maciaszek olga_maciaszek Thank you Thank

    you