Skip to content

Commit

Permalink
Fix deprecation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielThomas committed Sep 14, 2017
1 parent c6d571e commit c0a2b8b
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import org.gradle.api.internal.file.CopyActionProcessingStreamAction
import org.gradle.api.internal.file.copy.*
import org.gradle.api.internal.tasks.SimpleWorkResult
import org.gradle.api.tasks.WorkResult
import org.gradle.api.tasks.WorkResults
import org.gradle.internal.UncheckedException
import org.slf4j.Logger
import org.slf4j.LoggerFactory
Expand All @@ -43,10 +44,14 @@ public abstract class AbstractPackagingCopyAction<T extends SystemPackagingTask>
stream.process(new StreamAction());
endVisit()
} catch (Exception e) {
UncheckedException.throwAsUncheckedException(e);
UncheckedException.throwAsUncheckedException(e)
}
try {
// Gradle 4.2 and later
return WorkResults.didWork(true)
} catch (ClassNotFoundException e) {
return new SimpleWorkResult(true)
}

return new SimpleWorkResult(true);
}

// Not a static class
Expand Down

0 comments on commit c0a2b8b

Please sign in to comment.