From ae6d84b974e3c3e897f7259131debcc43dad9a7f Mon Sep 17 00:00:00 2001 From: barreiro Date: Wed, 5 Aug 2015 05:40:14 +0100 Subject: [PATCH] HHH-10077 - Fix SourceSet generation on gradle plugin (cherry picked from commit c2c69ca62c0e4144e7fd7b823ea601910704abf3) --- .../hibernate/orm/tooling/gradle/HibernateExtension.groovy | 5 +++-- .../org/hibernate/orm/tooling/gradle/HibernatePlugin.java | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tooling/hibernate-gradle-plugin/src/main/groovy/org/hibernate/orm/tooling/gradle/HibernateExtension.groovy b/tooling/hibernate-gradle-plugin/src/main/groovy/org/hibernate/orm/tooling/gradle/HibernateExtension.groovy index 327bcf60dc..5cb900c9c3 100644 --- a/tooling/hibernate-gradle-plugin/src/main/groovy/org/hibernate/orm/tooling/gradle/HibernateExtension.groovy +++ b/tooling/hibernate-gradle-plugin/src/main/groovy/org/hibernate/orm/tooling/gradle/HibernateExtension.groovy @@ -23,7 +23,8 @@ class HibernateExtension { /** * The source sets that hold persistent model. Default is project.sourceSets.main */ - def SourceSet[] sourceSets + def SourceSet[] sourceSets + /** * Configuration for bytecode enhancement. Private; see instead {@link #enhance(groovy.lang.Closure)} */ @@ -43,7 +44,7 @@ class HibernateExtension { if ( sourceSets == null ) { sourceSets = [] } - sourceSets += sourceSets + sourceSets += sourceSet } void enhance(Closure closure) { diff --git a/tooling/hibernate-gradle-plugin/src/main/groovy/org/hibernate/orm/tooling/gradle/HibernatePlugin.java b/tooling/hibernate-gradle-plugin/src/main/groovy/org/hibernate/orm/tooling/gradle/HibernatePlugin.java index 02b2ea8dd0..d5528651eb 100644 --- a/tooling/hibernate-gradle-plugin/src/main/groovy/org/hibernate/orm/tooling/gradle/HibernatePlugin.java +++ b/tooling/hibernate-gradle-plugin/src/main/groovy/org/hibernate/orm/tooling/gradle/HibernatePlugin.java @@ -159,7 +159,7 @@ public class HibernatePlugin implements Plugin { return new URLClassLoader( urls.toArray( new URL[urls.size()] ), - ClassLoader.getSystemClassLoader().getParent() + Enhancer.class.getClassLoader() ); }