mirror of
https://gitee.com/BDWare/cp.git
synced 2025-01-10 01:44:08 +00:00
prune: update modules for mvn repository
This commit is contained in:
parent
6064882843
commit
4318162fa8
111
build.gradle
111
build.gradle
@ -1,10 +1,14 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id 'java'
|
id 'java'
|
||||||
id 'java-library'
|
id 'java-library'
|
||||||
id 'application'
|
//id 'application'
|
||||||
|
id 'com.github.johnrengelman.shadow' version '4.0.2'
|
||||||
|
id 'maven-publish'
|
||||||
|
id 'signing'
|
||||||
}
|
}
|
||||||
|
|
||||||
mainClassName = 'org.bdware.sc.ContractProcess'
|
|
||||||
|
//mainClassName = 'org.bdware.sc.ContractProcess'
|
||||||
repositories {
|
repositories {
|
||||||
mavenLocal()
|
mavenLocal()
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
@ -41,21 +45,29 @@ dependencies {
|
|||||||
implementation 'com.sun.mail:javax.mail:1.6.2'
|
implementation 'com.sun.mail:javax.mail:1.6.2'
|
||||||
implementation 'com.squareup.okhttp3:okhttp:4.9.1'
|
implementation 'com.squareup.okhttp3:okhttp:4.9.1'
|
||||||
implementation 'org.bdware.bdcontract:sdk-java:1.0.0'
|
implementation 'org.bdware.bdcontract:sdk-java:1.0.0'
|
||||||
implementation 'org.bdware.doip:doip-audit-tool:0.9.3'
|
implementation 'org.bdware.doip:doip-audit-tool:0.9.4'
|
||||||
api fileTree(dir: 'lib', include: '*.jar')
|
compile fileTree(dir: 'lib', include: '*.jar')
|
||||||
|
|
||||||
testImplementation 'junit:junit:4.13.2'
|
testImplementation 'junit:junit:4.13.2'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
task classJar(type: Jar, dependsOn: classes) {
|
||||||
|
classifier = "jar"
|
||||||
|
}
|
||||||
|
//jar {
|
||||||
|
// classifier = ""
|
||||||
|
//}
|
||||||
|
|
||||||
jar {
|
jar {
|
||||||
String libs = ''
|
String libs = ''
|
||||||
configurations.runtimeClasspath.each {
|
configurations.runtimeClasspath.each {
|
||||||
libs = libs + " libs/" + it.name
|
libs = libs + " libs/" + it.name
|
||||||
}
|
}
|
||||||
|
from {
|
||||||
|
configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
|
||||||
|
}
|
||||||
manifest {
|
manifest {
|
||||||
attributes 'Manifest-Version': project.version
|
attributes 'Manifest-Version': project.version
|
||||||
attributes 'Main-Class': mainClassName
|
// attributes 'Main-Class': mainClassName
|
||||||
attributes 'Class-Path': libs
|
attributes 'Class-Path': libs
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -78,4 +90,89 @@ task buildBundle(dependsOn: [":cp:copyLibs", ":cp:copyJar"]) {
|
|||||||
doLast {
|
doLast {
|
||||||
println "buildBundle in ./build/output/ successfully"
|
println "buildBundle in ./build/output/ successfully"
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
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
|
||||||
|
}
|
||||||
|
//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'
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
|
||||||
|
publishing {
|
||||||
|
publications {
|
||||||
|
mavenJava(MavenPublication) {
|
||||||
|
groupId project.group
|
||||||
|
artifactId "cp"
|
||||||
|
version "${version}"
|
||||||
|
from components.java
|
||||||
|
artifact sourceJar
|
||||||
|
artifact javadocJar
|
||||||
|
artifact classJar
|
||||||
|
pom {
|
||||||
|
name = "bdware-cp"
|
||||||
|
description = "cp"
|
||||||
|
url = "https://gitee.com/BDWare/cp"
|
||||||
|
licenses {
|
||||||
|
license {
|
||||||
|
name = "GPL v2"
|
||||||
|
url = "https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
developers {
|
||||||
|
developer {
|
||||||
|
id = "dataware"
|
||||||
|
email = "caihq@pku.edu.cn"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
scm {
|
||||||
|
connection = "scm:git:https://gitee.com/BDWare/cp.git"
|
||||||
|
developerConnection = "scm:git:https://gitee.com/BDWare/cp.git"
|
||||||
|
url = "https://gitee.com/BDWare/cp"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
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
|
||||||
}
|
}
|
@ -2,8 +2,8 @@ package org.bdware.sc.debugger;
|
|||||||
|
|
||||||
import com.google.gson.JsonElement;
|
import com.google.gson.JsonElement;
|
||||||
import com.google.gson.JsonObject;
|
import com.google.gson.JsonObject;
|
||||||
import org.apache.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
import org.bdware.client.SmartContractClient;
|
import org.bdware.client.SmartContractClient;
|
||||||
import org.bdware.sc.ContractProcess;
|
import org.bdware.sc.ContractProcess;
|
||||||
import org.bdware.sc.bean.Contract;
|
import org.bdware.sc.bean.Contract;
|
||||||
|
@ -133,7 +133,7 @@ public class JSONTool {
|
|||||||
recorded.add(arr);
|
recorded.add(arr);
|
||||||
JsonObject jsonObject = new JsonObject();
|
JsonObject jsonObject = new JsonObject();
|
||||||
for (Object k : arr.keySet()) {
|
for (Object k : arr.keySet()) {
|
||||||
jsonObject.add(k.toString(), convertMirrorToJsonInternal(k, recorded));
|
jsonObject.add(k.toString(), convertMirrorToJsonInternal(arr.get(k), recorded));
|
||||||
}
|
}
|
||||||
return jsonObject;
|
return jsonObject;
|
||||||
} else if (obj.getClass() == jdk.internal.dynalink.beans.StaticClass.class) {
|
} else if (obj.getClass() == jdk.internal.dynalink.beans.StaticClass.class) {
|
||||||
|
Loading…
Reference in New Issue
Block a user