mirror of
https://github.com/kiwix/java-libkiwix.git
synced 2025-09-09 15:19:32 -04:00
Displaying an error in the Install Dependencies
task when no file is available for renaming.
* We have incorporated an additional validation check to verify the existence of the file during the copy/rename process. By default, the copy operation does not raise an error if the source file is unavailable.
This commit is contained in:
parent
435cf3a302
commit
c7aad36143
@ -153,6 +153,11 @@ task copyLibzimHeaderAndSoFiles(type: Copy) {
|
||||
|
||||
task renameLibzimSoFile(type: Copy) {
|
||||
if (libzim_version != null) {
|
||||
def sourceFile = file(buildDir.path + "/libzim.so." + libzim_version)
|
||||
|
||||
if (project.gradle.startParameter.taskNames.contains("renameLibzimSoFile") && !sourceFile.exists()) {
|
||||
throw new RuntimeException("Rename Libzim so file task failed, File not found: ${sourceFile}")
|
||||
}
|
||||
from(buildDir.path)
|
||||
include "libzim.so." + libzim_version
|
||||
destinationDir file(buildDir.path)
|
||||
@ -247,6 +252,11 @@ task copyLibkiwixHeaderAndSoFiles(type: Copy) {
|
||||
|
||||
task renameLibkiwixSoFile(type: Copy) {
|
||||
if (libkiwix_version != null) {
|
||||
def sourceFile = file(buildDir.path + "/libkiwix.so." + libkiwix_version)
|
||||
|
||||
if (project.gradle.startParameter.taskNames.contains("renameLibkiwixSoFile") && !sourceFile.exists()) {
|
||||
throw new RuntimeException("Rename Libkiwix so file task failed, File not found: ${sourceFile}")
|
||||
}
|
||||
from(buildDir.path)
|
||||
include "libkiwix.so." + libkiwix_version
|
||||
destinationDir file(buildDir.path)
|
||||
|
Loading…
x
Reference in New Issue
Block a user