From 639d8dc6cb90df83a1fc5f33178e0b0bf3b110ef Mon Sep 17 00:00:00 2001 From: CaiHQ Date: Wed, 29 Jun 2022 02:30:24 +0800 Subject: [PATCH] upgrade rocksdb publish cp-1.6.4 publish common-1.5.9 --- build.gradle | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index 84e8480..7d9790d 100644 --- a/build.gradle +++ b/build.gradle @@ -47,6 +47,7 @@ dependencies { implementation fileTree(dir: 'lib', include: '*.jar') testImplementation 'junit:junit:4.13.2' } +tasks.jar.setDuplicatesStrategy(DuplicatesStrategy.INCLUDE) task classJar(type: Jar, dependsOn: classes) { classifier = "jar" @@ -58,8 +59,14 @@ jar { } from { // uncomment this when publish! - // configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } + configurations.runtimeClasspath.filter { + // it.getAbsolutePath().contains("/lib/") + false + }.collect { + it.isDirectory() ? it : zipTree(it) + } } + manifest { attributes 'Manifest-Version': project.version attributes 'Main-Class': 'org.bdware.sc.ContractProcess' @@ -67,8 +74,13 @@ jar { } } -tasks.processResources.setDuplicatesStrategy(DuplicatesStrategy.INCLUDE) -tasks.processTestResources.setDuplicatesStrategy(DuplicatesStrategy.INCLUDE) +tasks.withType(Copy).all { + duplicatesStrategy = DuplicatesStrategy.INCLUDE +} +tasks.withType(Jar).all { + duplicatesStrategy = DuplicatesStrategy.INCLUDE +} + task copyLibs(type: Copy, dependsOn: ":common:jar") { into "./build/output/libs/"