@@ -46,6 +46,10 @@ dependencies {
4646}
4747
4848task cmakeTask (type : Exec ) {
49+ File jniLibs = new File (buildDir. path + " /tiledb_jni" )
50+ File tiledbLibs = new File (buildDir. path + " /install/lib" )
51+
52+ onlyIf { ! buildDir. exists() || ! jniLibs. exists() || ! tiledbLibs. exists() }
4953 doFirst {
5054 mkdir buildDir
5155 }
@@ -75,6 +79,14 @@ task cmakeTask(type: Exec) {
7579}
7680
7781task cmakeBuildTask (type : Exec ) {
82+ File jniLibs = new File (buildDir. path + " /tiledb_jni" )
83+ File tiledbLibs = new File (buildDir. path + " /install/lib" )
84+
85+ onlyIf { ! buildDir. exists() || ! jniLibs. exists() || ! tiledbLibs. exists() }
86+ doFirst {
87+ mkdir buildDir
88+ }
89+
7890 workingDir = buildDir
7991 executable = ' cmake'
8092 args " --build" , " ." , " --config" , " release"
@@ -106,18 +118,21 @@ test {
106118}
107119
108120jar {
109- into(new File (' lib' , osdetector . classifier ). toString()) {
121+ into(new File (' lib' ). toString()) {
110122 // Linux and macOS
111- from file(" $buildDir /install/lib/${ System.mapLibraryName("tiledb")} " )
112- from file(" $buildDir /install/lib64/${ System.mapLibraryName("tiledb")} " )
113- from file(" $buildDir /tiledb_jni/${ System.mapLibraryName("tiledbjni")} " )
123+ from file(" $buildDir /install/lib/libtiledb.dylib" )
124+ from file(" $buildDir /install/lib64/libtiledb.so" )
125+ from file(" $buildDir /tiledb_jni/libtiledbjni.so" )
126+
127+ from file(" $buildDir /install/lib/libtiledb.dylib" )
128+ from file(" $buildDir /tiledb_jni/libtiledbjni.dylib" )
129+
114130 // Windows
115- from file(" $buildDir /install/bin/${ System.mapLibraryName(" tbb") } " )
116- from file(" $buildDir /install/bin/${ System.mapLibraryName(" tiledb") } " )
117- from file(" $buildDir /tiledb_jni/Release/${ System.mapLibraryName(" tiledbjni") } " )
131+ from file(" $buildDir /install/bin/tbb.dll " )
132+ from file(" $buildDir /install/bin/tiledb.dll " )
133+ from file(" $buildDir /tiledb_jni/Release/tiledbjni.dll " )
118134 }
119135
120-
121136 manifest {
122137 attributes(" Implementation-Title" : " Gradle" ,
123138 " Implementation-Version" : archiveVersion)
@@ -209,6 +224,8 @@ signing {
209224import com.github.sherter.googlejavaformatgradleplugin.GoogleJavaFormat
210225import com.github.sherter.googlejavaformatgradleplugin.VerifyGoogleJavaFormat
211226
227+ import java.nio.file.Files
228+
212229task format (type : GoogleJavaFormat ) {
213230 source = sourceSets* . allJava
214231 source ' swig/customCode'
0 commit comments