@@ -79,7 +79,9 @@ ext.libkiwix_base_url = 'https://download.kiwix.org/nightly'
7979ext. libzim_base_url = ' https://download.openzim.org/nightly'
8080// change this date to get latest libzim .so and header files
8181ext. nightly_date_for_libkiwix = project. properties[" nightly_date_for_libkiwix" ] ?: " "
82+ ext. nightly_date_for_libkiwix_linux = project. properties[" nightly_date_for_libkiwix_linux" ] ?: " "
8283ext. nightly_date_for_libzim = project. properties[" nightly_date_for_libzim" ] ?: " "
84+ ext. nightly_date_for_libzim_linux = project. properties[" nightly_date_for_libzim_linux" ] ?: " "
8385
8486ext. libkiwix_version = project. properties[" libkiwix_version" ] ?: " "
8587ext. libzim_version = project. properties[" libzim_version" ] ?: " "
@@ -100,6 +102,10 @@ task checkCurrentLibzimDate() {
100102 project. ext. set(" nightly_date_for_libzim" , getDateFromPath(buildDir. path, " libzim_android-arm64-" ))
101103}
102104
105+ task checkCurrentLinuxLibzimDate () {
106+ project. ext. set(" nightly_date_for_libzim_linux" , getDateFromPath(buildDir. path, " libzim_linux-x86_64-" ))
107+ }
108+
103109task unzipLibzim (type : Copy ) {
104110 // unzip android arm
105111 from tarTree(buildDir. path + " /libzim_android-arm.tar.gz" )
@@ -150,8 +156,8 @@ task copyLibzimAndroidx86_64(type: Copy) {
150156
151157task copyLibzimLinux_x86_64 (type : Copy ) {
152158 // copying linux_x86_64 so file
153- project. ext. set(" libzim_version" , getFileFromFolder(buildDir. path + " /libzim_linux-x86_64-" + nightly_date_for_libzim + " /lib/x86_64-linux-gnu/" ))
154- from buildDir. path + " /libzim_linux-x86_64-" + nightly_date_for_libzim + " /lib/x86_64-linux-gnu/" + libzim_version
159+ project. ext. set(" libzim_version" , getFileFromFolder(buildDir. path + " /libzim_linux-x86_64-" + nightly_date_for_libzim_linux + " /lib/x86_64-linux-gnu/" ))
160+ from buildDir. path + " /libzim_linux-x86_64-" + nightly_date_for_libzim_linux + " /lib/x86_64-linux-gnu/" + libzim_version
155161 into buildDir. path
156162}
157163
@@ -180,6 +186,10 @@ task checkCurrentLibkiwixDate() {
180186 project. ext. set(" nightly_date_for_libkiwix" , getDateFromPath(buildDir. path, " libkiwix_android-arm64-" ))
181187}
182188
189+ task checkCurrentLinuxLibkiwixDate () {
190+ project. ext. set(" nightly_date_for_libkiwix_linux" , getDateFromPath(buildDir. path, " libkiwix_linux-x86_64-" ))
191+ }
192+
183193static String getDateFromPath (String path , String matchesString ) {
184194 File folder = new File (path)
185195 if (folder. exists()) {
@@ -241,8 +251,8 @@ task copyLibkiwixAndroidx86_64(type: Copy) {
241251
242252task copyLibkiwixLinux_x86_64 (type : Copy ) {
243253 // copying linux_x86_64 so file
244- project. ext. set(" libkiwix_version" , getFileFromFolder(buildDir. path + " /libkiwix_linux-x86_64-" + nightly_date_for_libkiwix + " /lib/x86_64-linux-gnu/" ))
245- from buildDir. path + " /libkiwix_linux-x86_64-" + nightly_date_for_libkiwix + " /lib/x86_64-linux-gnu/" + libkiwix_version
254+ project. ext. set(" libkiwix_version" , getFileFromFolder(buildDir. path + " /libkiwix_linux-x86_64-" + nightly_date_for_libkiwix_linux + " /lib/x86_64-linux-gnu/" ))
255+ from buildDir. path + " /libkiwix_linux-x86_64-" + nightly_date_for_libkiwix_linux + " /lib/x86_64-linux-gnu/" + libkiwix_version
246256 into buildDir. path
247257}
248258
@@ -267,13 +277,13 @@ task renameLibkiwixSoFile(type: Copy) {
267277
268278task copyBuildKiwixSoFile (type : Copy ) {
269279 // copying linux_x86_64 so file
270- from projectDir. path + " /src/androidTests/java/org/kiwix/kiwixlib /libbuildkiwix.so"
280+ from projectDir. path + " /src/test /libbuildkiwix.so"
271281 into buildDir. path
272282}
273283
274284task createCodeCoverageReport (type : Exec ) {
275- workingDir " ${ projectDir} /src/androidTests/java/org/kiwix/kiwixlib /"
276- commandLine ' sh' , ' -c' , " bash 'compile_and_run_test.sh' ${ buildDir} /libs/*app *.jar $buildDir "
285+ workingDir " ${ projectDir} /src/test /"
286+ commandLine ' sh' , ' -c' , " bash 'compile_and_run_test.sh' ${ buildDir} /libs/*lib *.jar $buildDir "
277287}
278288
279289task checkCurrentJavaVersion () {
@@ -285,7 +295,7 @@ task checkCurrentJavaVersion() {
285295
286296task generateHeaderFilesFromJavaWrapper (type : Exec ) {
287297 workingDir " ${ projectDir} /src/main/java/org/kiwix/"
288- commandLine ' bash' , ' -c' , " javac -h ${ buildDir} /include/javah_generated/ -d ${ buildDir } /libzim / ${ getLibzimFiles()} ${ getLibkiwixFiles()} "
298+ commandLine ' bash' , ' -c' , " javac -h ${ buildDir} /include/javah_generated/ -d ${ projectDir } /src/test / ${ getLibzimFiles()} ${ getLibkiwixFiles()} "
289299}
290300
291301String getLibkiwixFiles () {
0 commit comments