mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-21 17:15:10 +00:00
Update fabcar java sample build (#219)
- Update gradle version - Switch to application plugin (cc is started as an app not a lib, and java-library-distribution is still incubating) - make sure tests and coverage checks are run before installDist Signed-off-by: James Taylor <jamest@uk.ibm.com>
This commit is contained in:
parent
c0570df2f8
commit
7154ed8629
2 changed files with 11 additions and 9 deletions
|
|
@ -3,8 +3,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
|
id 'application'
|
||||||
id 'checkstyle'
|
id 'checkstyle'
|
||||||
id 'java-library-distribution'
|
|
||||||
id 'jacoco'
|
id 'jacoco'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -30,6 +30,10 @@ repositories {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
application {
|
||||||
|
mainClass = 'org.hyperledger.fabric.contract.ContractRouter'
|
||||||
|
}
|
||||||
|
|
||||||
checkstyle {
|
checkstyle {
|
||||||
toolVersion '8.21'
|
toolVersion '8.21'
|
||||||
configFile file("config/checkstyle/checkstyle.xml")
|
configFile file("config/checkstyle/checkstyle.xml")
|
||||||
|
|
@ -43,14 +47,11 @@ checkstyleTest {
|
||||||
source ='src/test/java'
|
source ='src/test/java'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
jacocoTestReport {
|
||||||
|
dependsOn test
|
||||||
|
}
|
||||||
|
|
||||||
jacocoTestCoverageVerification {
|
jacocoTestCoverageVerification {
|
||||||
afterEvaluate {
|
|
||||||
classDirectories = files(classDirectories.files.collect {
|
|
||||||
fileTree(dir: it, exclude: [
|
|
||||||
'org/hyperledger/fabric/samples/fabcar/Start.*'
|
|
||||||
])
|
|
||||||
})
|
|
||||||
}
|
|
||||||
violationRules {
|
violationRules {
|
||||||
rule {
|
rule {
|
||||||
limit {
|
limit {
|
||||||
|
|
@ -70,3 +71,4 @@ test {
|
||||||
}
|
}
|
||||||
|
|
||||||
check.dependsOn jacocoTestCoverageVerification
|
check.dependsOn jacocoTestCoverageVerification
|
||||||
|
installDist.dependsOn check
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5.1-bin.zip
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue