/* * SPDX-License-Identifier: Apache-2.0 */ plugins { id 'com.gradleup.shadow' version '9.2.2' id 'application' id 'checkstyle' id 'jacoco' } group 'org.hyperledger.fabric.samples' version '1.0-SNAPSHOT' dependencies { implementation 'org.hyperledger.fabric-chaincode-java:fabric-chaincode-shim:2.5.+' implementation 'org.json:json:+' testImplementation platform('org.junit:junit-bom:5.14.0') testImplementation 'org.junit.jupiter:junit-jupiter' testRuntimeOnly 'org.junit.platform:junit-platform-launcher' testImplementation 'org.assertj:assertj-core:3.27.6' testImplementation 'org.mockito:mockito-core:5.20.0' } repositories { mavenCentral() maven { url 'https://jitpack.io' } } compileJava { options.release = 11 } 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 } test { useJUnitPlatform() testLogging { events "passed", "skipped", "failed" } } shadowJar { archiveBaseName = 'chaincode' archiveVersion = '' archiveClassifier = '' duplicatesStrategy = DuplicatesStrategy.INCLUDE mergeServiceFiles() manifest { attributes 'Main-Class': 'org.hyperledger.fabric.contract.ContractRouter' } } installDist.dependsOn check