mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-16 16:15:06 +00:00
OS independent file separator in Gradle script
This commit is contained in:
parent
e52d184b51
commit
755d7fb788
@ -90,9 +90,9 @@ String determinePackageName(SourceDirectorySet sourceDirectorySet, File javaFile
|
|||||||
if ( javaFileAbsolutePath.startsWith( sourceDirectoryAbsolutePath ) ) {
|
if ( javaFileAbsolutePath.startsWith( sourceDirectoryAbsolutePath ) ) {
|
||||||
final String javaFileRelativePath = javaFileAbsolutePath.substring(
|
final String javaFileRelativePath = javaFileAbsolutePath.substring(
|
||||||
sourceDirectoryAbsolutePath.length() + 1,
|
sourceDirectoryAbsolutePath.length() + 1,
|
||||||
javaFileAbsolutePath.lastIndexOf( '/' )
|
javaFileAbsolutePath.lastIndexOf( File.separator )
|
||||||
);
|
);
|
||||||
return javaFileRelativePath.replace( '/', '.' );
|
return javaFileRelativePath.replace( File.separator, "." );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
throw new RuntimeException( "ugh" );
|
throw new RuntimeException( "ugh" );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user