Skip to content

Commit

Permalink
support webp on windows (#221)
Browse files Browse the repository at this point in the history
  • Loading branch information
SightStudio committed Feb 1, 2021
1 parent 11655d1 commit cbe15c8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
6 changes: 4 additions & 2 deletions buildSrc/src/main/kotlin/Libs.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
}
}
1 change: 1 addition & 0 deletions scrimage-webp/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ plugins {

dependencies {
api(project(":scrimage-core"))
implementation(Libs.Commons.lang)
testImplementation(Libs.Kotest.junit5)
testImplementation(Libs.Kotest.assertions)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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;
}
}
Expand Down

0 comments on commit cbe15c8

Please sign in to comment.