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-558: Complete the build of mnemonic-sys-vmem-service
Date Sat, 12 Dec 2020 02:01:36 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 4302fb9  MNEMONIC-558: Complete the build of mnemonic-sys-vmem-service
4302fb9 is described below

commit 4302fb95874f0505c03862c8b5cefcd7cbbd204e
Author: Yanhui Zhao <yzhao@apache.org>
AuthorDate: Thu Dec 10 19:34:48 2020 -0800

    MNEMONIC-558: Complete the build of mnemonic-sys-vmem-service
---
 build.gradle                                       |  7 +++-
 .../mnemonic-sys-vmem-service/build.gradle         | 44 +++++++++++++++++++++-
 2 files changed, 48 insertions(+), 3 deletions(-)

diff --git a/build.gradle b/build.gradle
index 0975084..1aacdb0 100644
--- a/build.gradle
+++ b/build.gradle
@@ -16,8 +16,11 @@
  */
 
 plugins {
-    id "base"
-    id "io.spring.dependency-management" version "1.0.10.RELEASE"
+    id 'base'
+    id 'io.spring.dependency-management' version '1.0.10.RELEASE' apply false
+    id 'net.freudasoft.gradle-cmake-plugin' version '0.0.2' apply false
+    id 'com.github.johnrengelman.shadow' version '6.1.0' apply false
+    id 'com.google.osdetector' version '1.6.2' apply false
 }
 
 allprojects  {
diff --git a/mnemonic-memory-services/mnemonic-sys-vmem-service/build.gradle b/mnemonic-memory-services/mnemonic-sys-vmem-service/build.gradle
index 57af1d3..532878b 100644
--- a/mnemonic-memory-services/mnemonic-sys-vmem-service/build.gradle
+++ b/mnemonic-memory-services/mnemonic-sys-vmem-service/build.gradle
@@ -15,8 +15,50 @@
  * limitations under the License.
  */
 
+plugins {
+  id 'net.freudasoft.gradle-cmake-plugin'
+  id 'com.github.johnrengelman.shadow'
+  id 'com.google.osdetector'
+}
+
 description = 'mnemonic-sys-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