代码拉取完成,页面将自动刷新
plugins {
id 'com.github.sherter.google-java-format' version '0.8'
id 'com.github.johnrengelman.shadow' version '5.2.0'
id 'org.ajoberstar.grgit' version '4.0.1'
id 'maven-publish'
}
// Apply the java-library plugin to add support for Java Library
apply plugin: 'maven'
apply plugin: 'idea'
apply plugin: 'eclipse'
apply plugin: 'java'
//apply plugin: 'war'
apply plugin: 'jacoco'
apply plugin: 'com.github.johnrengelman.shadow'
group 'com.webank.wecross'
version '2.0.0-rc2'
sourceCompatibility = 1.8
// In this section you declare where to find the dependencies of your project
repositories {
// Use jcenter for resolving your dependencies.
// You can declare any Maven/Ivy/file repository here.
jcenter()
maven { url "https://maven.aliyun.com/nexus/content/groups/public/" }
maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
maven { url 'https://dl.bintray.com/ethereum/maven/' }
maven { url "https://s01.oss.sonatype.org/content/repositories/snapshots/" }
}
googleJavaFormat {
options style: 'AOSP'
source = sourceSets*.allJava
include '**/*.java'
exclude '**/temp/*.java'
}
verifyGoogleJavaFormat {
source = sourceSets*.allJava
include '**/*.java'
exclude '**/temp/*.java'
}
dependencies {
implementation 'com.moandjiezana.toml:toml4j:0.7.2'
implementation 'org.slf4j:slf4j-api:1.7.30'
implementation 'com.google.guava:guava:30.1-jre'
implementation 'org.yaml:snakeyaml:1.27'
implementation 'link.luyu:luyu-cross-chain-protocol:1.0.0'
implementation fileTree(dir: 'libs', include: '*.jar')
// Fabric
implementation 'javassist:javassist:3.12.1.GA'
implementation ("org.hyperledger.fabric-sdk-java:fabric-sdk-java:1.4.4") {
exclude group: 'io.netty'
}
// implementation 'io.netty:netty-tcnative-boringssl-static:2.0.27.Final'
// WeCross
implementation 'com.webank:wecross-java-stub:1.2.0'
configurations.compile.exclude(group: 'ch.qos.logback')
configurations.compile.exclude(group: 'org.apache.logging.log4j')
// Use JUnit test framework
testImplementation 'junit:junit:4.12'
}
sourceSets {
main {
resources {
exclude '**/*.toml'
exclude '**/*.xml'
exclude '**/*.properties'
exclude '**/*.yml'
exclude '**/*.crt'
exclude '**/*.key'
include 'chaincode/WeCrossProxy/proxy.go'
include 'chaincode/WeCrossHub/hub.go'
}
}
}
jar.enabled = false
project.tasks.assemble.dependsOn project.tasks.shadowJar
shadowJar {
mergeServiceFiles()
destinationDir file('dist/apps')
archiveName project.name + "-" + project.version + '.jar'
manifest {
attributes(
'Main-Class': 'com.webank.wecross.stub.fabric.FabricStubFactory',
'version': project.version,
)
try {
def repo = grgit.open(dir: file('.').canonicalPath)
if (repo != null) {
def date = new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
def branch = repo.branch.getCurrent().getName()
def commit = repo.head().getAbbreviatedId(40)
attributes(["Implementation-Timestamp": date,
"Git-Branch" : branch,
"Git-Commit" : commit
])
logger.info(" Commit : ")
logger.info(" => date: {}", date)
logger.info(" => branch: {}", branch)
logger.info(" => commit: {}", commit)
}
} catch (Exception e) {
// logger.warn(' .git not exist, cannot found commit info')
}
}
doLast {
copy {
from file('src/main/resources/')
into 'dist/conf'
}
copy {
from file('.').listFiles().findAll { File f -> (f.name.endsWith('.sh') || f.name.endsWith('.env')) }
into 'dist'
}
copy {
from file('scripts/')
into 'dist'
}
}
dependencies {
exclude(dependency('io.netty:.*'))
}
// minimize() // Enable this leads to tcnative core
// relocate 'io.netty', 'io.netty.fabric'
}
test {
testLogging.showStandardStreams = true
classpath = project.sourceSets.test.runtimeClasspath + files("${projectDir}/src/main/resources" )
}
jacocoTestReport {
reports {
xml.enabled true
html.enabled false
}
}
publishing {
publications {
mavenJava(MavenPublication) {
groupId = 'com.webank'
artifactId = 'wecross-fabric-stub'
from components.java
artifacts = [shadowJar]
// https://docs.gradle.org/current/dsl/org.gradle.api.publish.maven.MavenPublication.html
pom {
name = "WeCross-Fabric-Stub"
description = "Fabric Stub for WeCross"
url = "https://github.com/WeBankBlockchain/WeCross"
licenses {
license {
name = "The Apache License, Version 2.0"
url = "http://www.apache.org/licenses/LICENSE-2.0.txt"
}
}
developers {
developer {
id = "Shareong"
name = "Shareong"
email = "740310627@qq.com"
}
}
scm {
connection = "scm:git:git://github.com/WeBankBlockchain/WeCross.git"
developerConnection = "scm:git:ssh://github.com/WeBankBlockchain/WeCross.git"
url = "https://github.com/WeBankBlockchain/WeCross"
}
}
}
}
repositories {
maven {
def releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2"
def snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots"
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
//*
def NEXUS_USERNAME = ''
def NEXUS_PASSWORD = ''
//*/
credentials {
username = NEXUS_USERNAME
password = NEXUS_PASSWORD
}
}
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。