diff --git a/metamod/build.gradle b/metamod/build.gradle index 569c622..86fac29 100644 --- a/metamod/build.gradle +++ b/metamod/build.gradle @@ -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 {