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,19 +122,21 @@ public class HibernatePlugin implements Plugin<Project> {
|
||||||
|
|
||||||
final Enhancer enhancer = Environment.getBytecodeProvider().getEnhancer( enhancementContext );
|
final Enhancer enhancer = Environment.getBytecodeProvider().getEnhancer( enhancementContext );
|
||||||
|
|
||||||
final FileTree fileTree = project.fileTree( sourceSet.getOutput().getClassesDir() );
|
for ( File classesDir: sourceSet.getOutput().getClassesDirs() ) {
|
||||||
for ( File file : fileTree ) {
|
final FileTree fileTree = project.fileTree( classesDir );
|
||||||
if ( !file.getName().endsWith( ".class" ) ) {
|
for ( File file : fileTree ) {
|
||||||
continue;
|
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 ) {
|
if ( enhancedBytecode != null ) {
|
||||||
writeOutEnhancedClass( enhancedBytecode, file );
|
writeOutEnhancedClass( enhancedBytecode, file );
|
||||||
logger.info( "Successfully enhanced class [" + file + "]" );
|
logger.info( "Successfully enhanced class [" + file + "]" );
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
logger.info( "Skipping class [" + file.getAbsolutePath() + "], not an entity nor embeddable" );
|
logger.info( "Skipping class [" + file.getAbsolutePath() + "], not an entity nor embeddable" );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue