2
0
mirror of https://github.com/rehlds/metamod-r.git synced 2025-01-13 23:28:23 +03:00

Remove leading lib prefix on all projects

This commit is contained in:
s1lent 2017-11-18 22:40:22 +07:00
parent 4abf731650
commit bc64710eb8
No known key found for this signature in database
GPG Key ID: 0FE401DC73916B5C

View File

@ -155,10 +155,24 @@ afterEvaluate {
}
}
task buildFinalize << {
if (GradleCppUtils.windows) {
return;
}
binaries.withType(SharedLibraryBinarySpec) {
def sharedBinary = it.getSharedLibraryFile();
if (sharedBinary.exists()) {
sharedBinary.renameTo(new File(sharedBinary.getParent() + "/" + sharedBinary.getName().replaceFirst("^lib", "")));
}
}
}
task buildRelease {
dependsOn binaries.withType(SharedLibraryBinarySpec).matching { SharedLibraryBinarySpec blib ->
blib.buildable && blib.buildType.name == 'release'
}
finalizedBy buildFinalize
}
tasks.clean.doLast {