打包智能合约,需要将完整的依赖包也一并打到jar包中,这里提供gradle的两种方式,仅供参考:
一、使用application插件
1、build.gradle配置
plugins {
id 'java'
id 'application'
}
apply plugin :'application'
group 'org.hyperledger.fabric-chaincode-java'
version '1.0-SNAPSHOT'
repositories {
maven {
url "https://hyperledger.jfrog.io/hyperledger/fabric-maven"
}
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
maven{ url 'http://maven.aliyun.com/nexus/content/repositories/jcenter'}
jcenter()
maven {
url 'https://jitpack.io'
}
}
application {
mainClass = 'org.hyperledger.fabric.chaincode.Accou