mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-17 07:25:10 +00:00
JCenter is deprecated, can no longer be published to, and is scheduled for removal. It is now causing build failures. Replace with Maven Central. Also remove mavenLocal() as this is not recommended practice: - https://docs.gradle.org/current/userguide/declaring_repositories.html#sec:case-for-maven-local Note that Jitpack still needs to be included as a package repository for Java chaincode since it has dependencies on an old version of com.github.everit-org.json-schema:org.everit.json.schema that is only published there. Signed-off-by: Mark S. Lewis <mark_lewis@uk.ibm.com>
84 lines
1.6 KiB
Groovy
84 lines
1.6 KiB
Groovy
/*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
plugins {
|
|
id 'com.github.johnrengelman.shadow' version '5.1.0'
|
|
id 'application'
|
|
id 'checkstyle'
|
|
id 'jacoco'
|
|
}
|
|
|
|
group 'org.hyperledger.fabric.samples'
|
|
version '1.0-SNAPSHOT'
|
|
|
|
dependencies {
|
|
compileOnly 'org.hyperledger.fabric-chaincode-java:fabric-chaincode-shim:2.+'
|
|
implementation 'com.owlike:genson:1.5'
|
|
testImplementation 'org.hyperledger.fabric-chaincode-java:fabric-chaincode-shim:2.+'
|
|
testImplementation 'org.junit.jupiter:junit-jupiter:5.4.2'
|
|
testImplementation 'org.assertj:assertj-core:3.11.1'
|
|
testImplementation 'org.mockito:mockito-core:2.+'
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
maven {
|
|
url 'https://jitpack.io'
|
|
}
|
|
}
|
|
|
|
application {
|
|
mainClass = 'org.hyperledger.fabric.contract.ContractRouter'
|
|
}
|
|
|
|
checkstyle {
|
|
toolVersion '8.21'
|
|
configFile file("config/checkstyle/checkstyle.xml")
|
|
}
|
|
|
|
checkstyleMain {
|
|
source ='src/main/java'
|
|
}
|
|
|
|
checkstyleTest {
|
|
source ='src/test/java'
|
|
}
|
|
|
|
jacocoTestReport {
|
|
dependsOn test
|
|
}
|
|
|
|
jacocoTestCoverageVerification {
|
|
violationRules {
|
|
rule {
|
|
limit {
|
|
minimum = 1.0
|
|
}
|
|
}
|
|
}
|
|
|
|
finalizedBy jacocoTestReport
|
|
}
|
|
|
|
test {
|
|
useJUnitPlatform()
|
|
testLogging {
|
|
events "passed", "skipped", "failed"
|
|
}
|
|
}
|
|
|
|
mainClassName = 'org.hyperledger.fabric.contract.ContractRouter'
|
|
|
|
shadowJar {
|
|
baseName = 'chaincode'
|
|
version = null
|
|
classifier = null
|
|
|
|
manifest {
|
|
attributes 'Main-Class': 'org.hyperledger.fabric.contract.ContractRouter'
|
|
}
|
|
}
|
|
|
|
check.dependsOn jacocoTestCoverageVerification
|
|
installDist.dependsOn check
|