Tuesday, April 30, 2013

Could not create plugin of type 'MatrixTestingPlugin'

After forked and cloned Hibernate-orm project from Github, I tried to compile the project using

./gradlew clean build


But I'm kept getting error:

Could not create plugin of type 'MatrixTestingPlugin'


I checked my environment, I have "JAVA_HOME" configured. I even have had previously installed gradle removed.

Eventually, I figured the problem is that the path of "JAVA_HOME" has the empty space, and gradle 1.5 failed to recognize that. So after moved Java into a location with no space in the path, the problem solved.

Wednesday, April 24, 2013

Very quick takeout of Gradle


  • Gradle is a DSL created with Groovy.
  • Gradle build script is simply Groovy code that drives the Gradle API.
  • As a Java developer, to think of build.gradle script is writing main() method in a class that implemented  Project  interface.
  • Gradle scripts are made of "task"s, an equivalent of "target" in Ant, or "goal" in Maven.
  • There are Plugins available for different languages which includes the "task"s based on languages convention. Such as Java, after added plugin, try gradle tasks to verify what tasks are available.
    apply plugin: 'java'
  • To understand the basic of Gradle, read User Guide chapter 6 Build Script Basics.
  • The ultimate reference for Gradle DSL, all the elements of scripts.
  • To start write build script for Java project. Read User Guide chapter 23. The Java Plugin.





Google+