mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-06-29 15:22:15 +00:00
Fix File separator in settings.gradle script
Fixes gh-3852
This commit is contained in:
parent
ceef70946b
commit
7e2dd3bcb9
@ -53,17 +53,17 @@ include 'bom'
|
|||||||
|
|
||||||
findProject(':bom').name = 'spring-security-bom'
|
findProject(':bom').name = 'spring-security-bom'
|
||||||
|
|
||||||
includeSamples("samples/xml")
|
includeSamples("samples" + File.separator + "xml")
|
||||||
includeSamples("samples/javaconfig")
|
includeSamples("samples" + File.separator + "javaconfig")
|
||||||
|
|
||||||
void includeSamples(String samplesDir) {
|
void includeSamples(String samplesDir) {
|
||||||
FileTree tree = fileTree(samplesDir) {
|
FileTree tree = fileTree(samplesDir) {
|
||||||
include '**/*.gradle'
|
include '**' + File.separator + '*.gradle'
|
||||||
}
|
}
|
||||||
tree.each {File file ->
|
tree.each {File file ->
|
||||||
String projectDir = file.path.substring(file.path.indexOf(samplesDir), file.path.lastIndexOf('/'))
|
String projectDir = file.path.substring(file.path.indexOf(samplesDir), file.path.lastIndexOf(File.separator))
|
||||||
String projectPath = projectDir.substring(projectDir.lastIndexOf('/') + 1)
|
String projectPath = projectDir.substring(projectDir.lastIndexOf(File.separator) + 1)
|
||||||
String projectNamePrefix = samplesDir.substring(samplesDir.lastIndexOf('/') + 1).toLowerCase();
|
String projectNamePrefix = samplesDir.substring(samplesDir.lastIndexOf(File.separator) + 1).toLowerCase();
|
||||||
|
|
||||||
include projectPath
|
include projectPath
|
||||||
|
|
||||||
@ -73,7 +73,7 @@ void includeSamples(String samplesDir) {
|
|||||||
project.projectDir = new File(settingsDir, projectDir)
|
project.projectDir = new File(settingsDir, projectDir)
|
||||||
|
|
||||||
if (!project.buildFile.exists()) {
|
if (!project.buildFile.exists()) {
|
||||||
project.buildFileName = file.path.substring(file.path.lastIndexOf('/') + 1)
|
project.buildFileName = file.path.substring(file.path.lastIndexOf(File.separator) + 1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user