mnemonic-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject [mnemonic] branch master updated: MNEMONIC-564: Complete the build of mnemonic-pmdk-pmem-service
Date Wed, 23 Dec 2020 19:03:20 GMT
This is an automated email from the ASF dual-hosted git repository.

garyw pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mnemonic.git


The following commit(s) were added to refs/heads/master by this push:
     new 39fd36c  MNEMONIC-564: Complete the build of mnemonic-pmdk-pmem-service
39fd36c is described below

commit 39fd36c8126290a367b742250333634d1d0ba57b
Author: chenyang <chenyang@apache.org>
AuthorDate: Tue Dec 22 19:55:01 2020 -0800

    MNEMONIC-564: Complete the build of mnemonic-pmdk-pmem-service
    
    Signed-off-by: chenyang <chenyang@apache.org>
---
 .../mnemonic-pmdk-pmem-service/build.gradle        | 42 +++++++++++++++++++++-
 1 file changed, 41 insertions(+), 1 deletion(-)

diff --git a/mnemonic-memory-services/mnemonic-pmdk-pmem-service/build.gradle b/mnemonic-memory-services/mnemonic-pmdk-pmem-service/build.gradle
index 67b2979..84170fe 100644
--- a/mnemonic-memory-services/mnemonic-pmdk-pmem-service/build.gradle
+++ b/mnemonic-memory-services/mnemonic-pmdk-pmem-service/build.gradle
@@ -15,8 +15,48 @@
  * limitations under the License.
  */
 
+plugins {
+  id 'net.freudasoft.gradle-cmake-plugin'
+  id 'com.github.johnrengelman.shadow'
+  id 'com.google.osdetector'
+}
+
 description = 'mnemonic-pmdk-pmem-service'
+
 dependencies {
-    testCompileOnly 'org.testng:testng'
+  implementation project(':mnemonic-core')
+  implementation 'org.flowcomputing.commons:commons-primitives'
+  testCompileOnly 'org.testng:testng'
 }
+
+def nativeDir = "$projectDir/src/main/native"
+
+cmake {
+  sourceFolder = file("$nativeDir")
+  workingFolder = file("$nativeDir/build")
+  buildSharedLibs = true
+  buildConfig = 'Release'
+  buildTarget = 'install'
+}
+
+task copyResources(type: Copy) {
+  from "$nativeDir/dist/native"
+  into "${buildDir}/classes/java/main/native"
+}
+
+shadowJar {
+  minimize()
+  destinationDirectory = file("$projectDir/../service-dist")
+  archiveClassifier = osdetector.classifier
+}
+
+task cleanDist(type: Delete) {
+  delete "$nativeDir/dist"
+}
+
+compileJava.dependsOn cmakeBuild
+processResources.dependsOn copyResources
+build.dependsOn shadowJar
+clean.dependsOn cmakeClean
+clean.dependsOn cleanDist
 test.useTestNG()


Mime
View raw message