Remove leading lib prefix

This commit is contained in:
s1lent 2018-05-22 14:33:28 +07:00
parent c288c32082
commit b68b545e77
No known key found for this signature in database
GPG Key ID: 0FE401DC73916B5C

View File

@ -299,6 +299,19 @@ model {
}
}
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'
@ -311,6 +324,9 @@ task buildFixes {
}
}
buildFixes.finalizedBy(buildFinalize);
buildRelease.finalizedBy(buildFinalize);
gradle.taskGraph.whenReady { graph ->
if (!graph.hasTask(buildFixes)) {
return;