From f746ccb7dc0f250d67094488c8bf9363ed79c28d Mon Sep 17 00:00:00 2001 From: CaiHQ Date: Fri, 13 May 2022 23:51:26 +0800 Subject: [PATCH 1/2] prune: update modules for mvn repository --- build.gradle | 94 ++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 92 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 680fb30..35b32a1 100644 --- a/build.gradle +++ b/build.gradle @@ -1,8 +1,19 @@ plugins { id 'java' id 'java-library' + id 'maven-publish' + id 'signing' + id 'com.github.johnrengelman.shadow' version '4.0.2' } +shadowJar { + classifier = "jar" + dependencies { + include(dependency(fileTree(dir: 'lib', include: '*.jar')) ) +// exclude(dependency('com.google.code.gson:gson:2.8.6')) +// relocate 'com.google.code.gson', 'irs.com.google.code.gson' + } +} sourceSets { main { java { @@ -24,11 +35,11 @@ sourceSets { sourceCompatibility = 1.8 dependencies { - api project(":gmhelper") + api 'org.bdware.bdcontract:gmhelper:0.1.0' api 'berkeleydb:je:3.2.76' // api 'com.fifesoft:rsyntaxtextarea:3.1.3' api 'commons-io:commons-io:2.11.0' - api 'io.netty:netty-all:4.1.63.Final' + api 'io.netty:netty-all:4.1.72.Final' api 'org.antlr:antlr4:4.9.2' api 'commons-codec:commons-codec:1.5' api 'org.apache.logging.log4j:log4j-core:2.17.2' @@ -53,3 +64,82 @@ task copyJar(type: Copy) { into "./build/output/" rename { String fileName -> "yjs.jar" } } +//task classJar(type: Jar, dependsOn: classes) { +// classifier = "jar" +//} +task sourceJar(type: Jar, dependsOn: classes) { + archiveClassifier = "sources" + classifier = "sources" + from sourceSets.main.allSource +} +tasks.withType(Javadoc) { + options.addStringOption('Xdoclint:none', '-quiet') +} + +task javadocJar(type: Jar, dependsOn: javadoc) { + archiveClassifier = 'javadoc' + classifier = "javadoc" + exclude { + details -> details.file.getAbsolutePath().contains("/gm/") + } + from javadoc.destinationDir +} + + +publishing { + publications { + mavenJava(MavenPublication) { + groupId project.group + artifactId "common" + version "${version}" + from components.java + artifact sourceJar + artifact javadocJar + artifact shadowJar + pom { + name = "bdware-common" + description = "common" + url = "https://gitee.com/BDWare/common" + licenses { + license { + name = "Mulan PSL v2" + url = "http://license.coscl.org.cn/MulanPSL2" + } + } + developers { + developer { + id = "dataware" + email = "caihq@pku.edu.cn" + } + } + scm { + connection = "scm:git:https://gitee.com/BDWare/common.git" + developerConnection = "scm:git:https://gitee.com/BDWare/common.git" + url = "https://gitee.com/BDWare/common" + } + } + + } + } + repositories { + maven { + name 'bdwareSnapshotRepository' + url 'https://oss.sonatype.org/content/repositories/snapshots' + credentials { + username = "${NEXUS_USERNAME}" + password = "${NEXUS_PASSWORD}" + } + } + maven { + name 'bdwareRepository' + url 'https://oss.sonatype.org/service/local/staging/deploy/maven2' + credentials { + username = "${NEXUS_USERNAME}" + password = "${NEXUS_PASSWORD}" + } + } + } +} +signing { + sign publishing.publications.mavenJava +} \ No newline at end of file From f292deae1459a3316a41e40b17e7b19747e46fcb Mon Sep 17 00:00:00 2001 From: CaiHQ Date: Fri, 20 May 2022 22:50:13 +0800 Subject: [PATCH 2/2] refactor: add bdledger dependencies feat: IRPUtil feat: support debug in docker --- build.gradle | 11 ++++++----- src/main/base/org/bdware/sc/node/Permission.java | 1 + 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/build.gradle b/build.gradle index 35b32a1..4f6f64e 100644 --- a/build.gradle +++ b/build.gradle @@ -9,7 +9,7 @@ plugins { shadowJar { classifier = "jar" dependencies { - include(dependency(fileTree(dir: 'lib', include: '*.jar')) ) + include(dependency(fileTree(dir: 'lib', include: '*.jar'))) // exclude(dependency('com.google.code.gson:gson:2.8.6')) // relocate 'com.google.code.gson', 'irs.com.google.code.gson' } @@ -35,9 +35,9 @@ sourceSets { sourceCompatibility = 1.8 dependencies { - api 'org.bdware.bdcontract:gmhelper:0.1.0' + api 'org.bdware.bdcontract:gmhelper:0.2.0' api 'berkeleydb:je:3.2.76' - // api 'com.fifesoft:rsyntaxtextarea:3.1.3' + // api 'com.fifesoft:rsyntaxtextarea:3.1.3' api 'commons-io:commons-io:2.11.0' api 'io.netty:netty-all:4.1.72.Final' api 'org.antlr:antlr4:4.9.2' @@ -47,11 +47,12 @@ dependencies { //api 'org.apache.velocity:velocity-engine-core:2.3' api 'org.rocksdb:rocksdbjni:6.22.1' - api fileTree(dir: 'lib', include: '*.jar') + // api fileTree(dir: 'lib', include: '*.jar') testImplementation 'junit:junit:4.13.2' } - +group = "org.bdware.sc" +version = "1.5.6" tasks.processResources.setDuplicatesStrategy(DuplicatesStrategy.INCLUDE) task copyLibs(type: Copy) { diff --git a/src/main/base/org/bdware/sc/node/Permission.java b/src/main/base/org/bdware/sc/node/Permission.java index 2e59e4e..34a34c2 100644 --- a/src/main/base/org/bdware/sc/node/Permission.java +++ b/src/main/base/org/bdware/sc/node/Permission.java @@ -16,6 +16,7 @@ public enum Permission { Ledger, CM, DOIP, + IRP, Async; public static Permission parse(String str) {