Skip to content

Commit

Permalink
Explicitly list the java files for what we need to generate header.
Browse files Browse the repository at this point in the history
  • Loading branch information
mgautierfr committed Feb 9, 2023
1 parent 12a6898 commit 8ce4ed1
Showing 1 changed file with 31 additions and 1 deletion.
32 changes: 31 additions & 1 deletion lib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -285,5 +285,35 @@ task checkCurrentJavaVersion() {

task generateHeaderFilesFromJavaWrapper(type: Exec) {
workingDir "${projectDir}/src/main/java/org/kiwix/"
commandLine 'bash', '-c', "javac -h ${buildDir}/include/javah_generated/ -d ${buildDir}/libzim/ libzim/*.java libkiwix/*.java"
commandLine 'bash', '-c', "javac -h ${buildDir}/include/javah_generated/ -d ${buildDir}/libzim/ ${getLibzimFiles()} ${getLibkiwixFiles()}"
}

String getLibkiwixFiles() {
return "${projectDir}/src/main/java/org/kiwix/libkiwix/Book.java " +
"${projectDir}/src/main/java/org/kiwix/libkiwix/Bookmark.java " +
"${projectDir}/src/main/java/org/kiwix/libkiwix/Filter.java " +
"${projectDir}/src/main/java/org/kiwix/libkiwix/JNIICU.java " +
"${projectDir}/src/main/java/org/kiwix/libkiwix/Illustration.java " +
"${projectDir}/src/main/java/org/kiwix/libkiwix/JNIKiwixException.java " +
"${projectDir}/src/main/java/org/kiwix/libkiwix/Library.java " +
"${projectDir}/src/main/java/org/kiwix/libkiwix/Manager.java " +
"${projectDir}/src/main/java/org/kiwix/libkiwix/Server.java"
}

String getLibzimFiles() {
return "${projectDir}/src/main/java/org/kiwix/libzim/Archive.java " +
"${projectDir}/src/main/java/org/kiwix/libzim/Blob.java " +
"${projectDir}/src/main/java/org/kiwix/libzim/DirectAccessInfo.java " +
"${projectDir}/src/main/java/org/kiwix/libzim/EntryIterator.java " +
"${projectDir}/src/main/java/org/kiwix/libzim/Entry.java " +
"${projectDir}/src/main/java/org/kiwix/libzim/Item.java " +
"${projectDir}/src/main/java/org/kiwix/libzim/Query.java " +
"${projectDir}/src/main/java/org/kiwix/libzim/Searcher.java " +
"${projectDir}/src/main/java/org/kiwix/libzim/SearchIterator.java" +
"${projectDir}/src/main/java/org/kiwix/libzim/Search.java" +
"${projectDir}/src/main/java/org/kiwix/libzim/SuggestionItem.java" +
"${projectDir}/src/main/java/org/kiwix/libzim/SuggestionIterator.java" +
"${projectDir}/src/main/java/org/kiwix/libzim/SuggestionSearcher.java" +
"${projectDir}/src/main/java/org/kiwix/libzim/SuggestionSearch.java" +
"${projectDir}/src/main/java/org/kiwix/libzim/ZimFileFormatException.java"
}

0 comments on commit 8ce4ed1

Please sign in to comment.