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 ) ) {
|
||||
final String javaFileRelativePath = javaFileAbsolutePath.substring(
|
||||
sourceDirectoryAbsolutePath.length() + 1,
|
||||
javaFileAbsolutePath.lastIndexOf( '/' )
|
||||
javaFileAbsolutePath.lastIndexOf( File.separator )
|
||||
);
|
||||
return javaFileRelativePath.replace( '/', '.' );
|
||||
return javaFileRelativePath.replace( File.separator, "." );
|
||||
}
|
||||
}
|
||||
throw new RuntimeException( "ugh" );
|
||||
|
|
Loading…
Reference in New Issue