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-562: Complete the build of mnemonic-nvml-vmem-service
Date Thu, 17 Dec 2020 05:56:53 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 897ac5a  MNEMONIC-562: Complete the build of mnemonic-nvml-vmem-service
897ac5a is described below

commit 897ac5a4c3a7f4e53b145993b48839a537ad892e
Author: Yanhui Zhao <yzhao@apache.org>
AuthorDate: Tue Dec 15 22:00:49 2020 -0800

    MNEMONIC-562: Complete the build of mnemonic-nvml-vmem-service
---
 .../mnemonic-nvml-vmem-service/build.gradle        | 42 +++++++++++++++++++++-
 1 file changed, 41 insertions(+), 1 deletion(-)

diff --git a/mnemonic-memory-services/mnemonic-nvml-vmem-service/build.gradle b/mnemonic-memory-services/mnemonic-nvml-vmem-service/build.gradle
index c04d4fa..87a61fa 100644
--- a/mnemonic-memory-services/mnemonic-nvml-vmem-service/build.gradle
+++ b/mnemonic-memory-services/mnemonic-nvml-vmem-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-nvml-vmem-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