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-563: Complete the build of mnemonic-nvml-pmem-service
Date Sun, 20 Dec 2020 02:17:37 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 e22180b  MNEMONIC-563: Complete the build of mnemonic-nvml-pmem-service
e22180b is described below

commit e22180b5aabc29d66b4fce472e70ec5b08b7d790
Author: Xiaojin Jiao <xj.jiao@gmail.com>
AuthorDate: Fri Dec 18 12:51:40 2020 -0800

    MNEMONIC-563: Complete the build of mnemonic-nvml-pmem-service
    
    Signed-off-by: Xiaojin Jiao <xj.jiao@gmail.com>
---
 .../mnemonic-nvml-pmem-service/build.gradle        | 41 +++++++++++++++++++++-
 1 file changed, 40 insertions(+), 1 deletion(-)

diff --git a/mnemonic-memory-services/mnemonic-nvml-pmem-service/build.gradle b/mnemonic-memory-services/mnemonic-nvml-pmem-service/build.gradle
index 123c555..4b8a6bf 100644
--- a/mnemonic-memory-services/mnemonic-nvml-pmem-service/build.gradle
+++ b/mnemonic-memory-services/mnemonic-nvml-pmem-service/build.gradle
@@ -15,8 +15,47 @@
  * limitations under the License.
  */
 
+plugins {
+  id 'net.freudasoft.gradle-cmake-plugin'
+  id 'com.github.johnrengelman.shadow'
+  id 'com.google.osdetector'
+}
+
 description = 'mnemonic-nvml-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