@@ -79,7 +79,9 @@ ext.libkiwix_base_url = 'https://download.kiwix.org/nightly'
79
79
ext. libzim_base_url = ' https://download.openzim.org/nightly'
80
80
// change this date to get latest libzim .so and header files
81
81
ext. nightly_date_for_libkiwix = project. properties[" nightly_date_for_libkiwix" ] ?: " "
82
+ ext. nightly_date_for_libkiwix_linux = project. properties[" nightly_date_for_libkiwix_linux" ] ?: " "
82
83
ext. nightly_date_for_libzim = project. properties[" nightly_date_for_libzim" ] ?: " "
84
+ ext. nightly_date_for_libzim_linux = project. properties[" nightly_date_for_libzim_linux" ] ?: " "
83
85
84
86
ext. libkiwix_version = project. properties[" libkiwix_version" ] ?: " "
85
87
ext. libzim_version = project. properties[" libzim_version" ] ?: " "
@@ -100,6 +102,10 @@ task checkCurrentLibzimDate() {
100
102
project. ext. set(" nightly_date_for_libzim" , getDateFromPath(buildDir. path, " libzim_android-arm64-" ))
101
103
}
102
104
105
+ task checkCurrentLinuxLibzimDate () {
106
+ project. ext. set(" nightly_date_for_libzim_linux" , getDateFromPath(buildDir. path, " libzim_linux-x86_64-" ))
107
+ }
108
+
103
109
task unzipLibzim (type : Copy ) {
104
110
// unzip android arm
105
111
from tarTree(buildDir. path + " /libzim_android-arm.tar.gz" )
@@ -150,8 +156,8 @@ task copyLibzimAndroidx86_64(type: Copy) {
150
156
151
157
task copyLibzimLinux_x86_64 (type : Copy ) {
152
158
// 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
155
161
into buildDir. path
156
162
}
157
163
@@ -180,6 +186,10 @@ task checkCurrentLibkiwixDate() {
180
186
project. ext. set(" nightly_date_for_libkiwix" , getDateFromPath(buildDir. path, " libkiwix_android-arm64-" ))
181
187
}
182
188
189
+ task checkCurrentLinuxLibkiwixDate () {
190
+ project. ext. set(" nightly_date_for_libkiwix_linux" , getDateFromPath(buildDir. path, " libkiwix_linux-x86_64-" ))
191
+ }
192
+
183
193
static String getDateFromPath (String path , String matchesString ) {
184
194
File folder = new File (path)
185
195
if (folder. exists()) {
@@ -241,8 +251,8 @@ task copyLibkiwixAndroidx86_64(type: Copy) {
241
251
242
252
task copyLibkiwixLinux_x86_64 (type : Copy ) {
243
253
// 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
246
256
into buildDir. path
247
257
}
248
258
@@ -267,13 +277,13 @@ task renameLibkiwixSoFile(type: Copy) {
267
277
268
278
task copyBuildKiwixSoFile (type : Copy ) {
269
279
// 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"
271
281
into buildDir. path
272
282
}
273
283
274
284
task 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 "
277
287
}
278
288
279
289
task checkCurrentJavaVersion () {
@@ -285,7 +295,7 @@ task checkCurrentJavaVersion() {
285
295
286
296
task generateHeaderFilesFromJavaWrapper (type : Exec ) {
287
297
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()} "
289
299
}
290
300
291
301
String getLibkiwixFiles () {
0 commit comments