HHH-13071 Use SourceSetOutput.getClassesDirs to prevent deprecation warnings during build when using the gradle plugin
This commit is contained in:
parent
71af989f60
commit
aa441ddb12
|
@ -122,13 +122,14 @@ public class HibernatePlugin implements Plugin<Project> {
|
|||
|
||||
final Enhancer enhancer = Environment.getBytecodeProvider().getEnhancer( enhancementContext );
|
||||
|
||||
final FileTree fileTree = project.fileTree( sourceSet.getOutput().getClassesDir() );
|
||||
for ( File classesDir: sourceSet.getOutput().getClassesDirs() ) {
|
||||
final FileTree fileTree = project.fileTree( classesDir );
|
||||
for ( File file : fileTree ) {
|
||||
if ( !file.getName().endsWith( ".class" ) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
final byte[] enhancedBytecode = doEnhancement( sourceSet.getOutput().getClassesDir(), file, enhancer );
|
||||
final byte[] enhancedBytecode = doEnhancement( classesDir, file, enhancer );
|
||||
if ( enhancedBytecode != null ) {
|
||||
writeOutEnhancedClass( enhancedBytecode, file );
|
||||
logger.info( "Successfully enhanced class [" + file + "]" );
|
||||
|
@ -139,6 +140,7 @@ public class HibernatePlugin implements Plugin<Project> {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue