diff --git a/buildSrc/src/main/kotlin/Libs.kt b/buildSrc/src/main/kotlin/Libs.kt index 978c8881..e08419db 100644 --- a/buildSrc/src/main/kotlin/Libs.kt +++ b/buildSrc/src/main/kotlin/Libs.kt @@ -3,7 +3,8 @@ object Libs { const val kotlinVersion = "1.4.21" const val org = "com.sksamuel.scrimage" - const val CommonsIoVersion = "2.6" + const val CommonsIoVersion = "2.6" + const val CommonsLangVersion = "3.11" object TwelveMonkeys { private const val Version = "3.6" @@ -40,6 +41,7 @@ object Libs { } object Commons { - const val io = "commons-io:commons-io:$CommonsIoVersion" + const val io = "commons-io:commons-io:$CommonsIoVersion" + const val lang = "org.apache.commons:commons-lang3:$CommonsLangVersion" } } diff --git a/scrimage-webp/build.gradle.kts b/scrimage-webp/build.gradle.kts index ec154361..bd4cde68 100644 --- a/scrimage-webp/build.gradle.kts +++ b/scrimage-webp/build.gradle.kts @@ -5,6 +5,7 @@ plugins { dependencies { api(project(":scrimage-core")) + implementation(Libs.Commons.lang) testImplementation(Libs.Kotest.junit5) testImplementation(Libs.Kotest.assertions) } diff --git a/scrimage-webp/src/main/java/com/sksamuel/scrimage/webp/WebpHandler.java b/scrimage-webp/src/main/java/com/sksamuel/scrimage/webp/WebpHandler.java index 2cb92c5b..125cb067 100644 --- a/scrimage-webp/src/main/java/com/sksamuel/scrimage/webp/WebpHandler.java +++ b/scrimage-webp/src/main/java/com/sksamuel/scrimage/webp/WebpHandler.java @@ -1,5 +1,7 @@ package com.sksamuel.scrimage.webp; +import org.apache.commons.lang3.SystemUtils; + import java.io.IOException; import java.io.InputStream; import java.nio.file.Files; @@ -20,7 +22,10 @@ protected static void installBinary(Path output, String... sources) throws IOExc if (in != null) { Files.copy(in, output, StandardCopyOption.REPLACE_EXISTING); in.close(); - setExecutable(output); + + if(!SystemUtils.IS_OS_WINDOWS) { + setExecutable(output); + } return; } }