CORDA-1915 Simm Valuation demo update for JAR signing (#4105)

The build process creates new version fo Cordapp JAR in post 'jar' task.
So far JAR signing was integral part of the jar task, now it's also available as a separate task signJar (gradle-plugins PR corda/corda-gradle-plugins#130).
Using signJar to re-sign Cordapp shrinked JAR.
This commit is contained in:
szymonsztuka 2018-12-10 13:57:56 +00:00 committed by GitHub
parent 58ef83a67e
commit e7d1306335
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 9 deletions

View File

@ -71,9 +71,6 @@ task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar', nodeTask,
cordapp project(':samples:simm-valuation-demo:flows')
rpcUsers = [['username': "default", 'password': "default", 'permissions': [ 'ALL' ]]]
}
signing {
enabled false
}
node {
name "O=Notary Service,L=Zurich,C=CH"
notary = [validating : true]

View File

@ -9,8 +9,7 @@ cordapp {
targetPlatformVersion = corda_platform_version.toInteger()
}
signing {
// We need to sign the output of the "shrink" task,
// but the jar signer doesn't support that yet.
// Cordapp is signed after the "shrink" task.
enabled false
}
sealing {
@ -79,8 +78,14 @@ task shrink(type: ProGuardTask) {
keepclassmembers 'class com.google.** { *; }', includedescriptorclasses:true
keepclassmembers 'class org.joda.** { *; }', includedescriptorclasses:true
}
task sign(type: net.corda.plugins.SignJar) {
inputJars shrink
}
jar.finalizedBy shrink
shrink.finalizedBy sign
artifacts {
shrinkArtifacts file: shrinkJar, name: project.name, type: 'jar', extension: 'jar', classifier: 'tiny', builtBy: shrink
shrinkArtifacts file: sign.outputJars.singleFile, name: project.name, type: 'jar', extension: 'jar', classifier: 'tiny', builtBy: sign
}

View File

@ -6,9 +6,6 @@ cordapp {
vendor = 'R3'
targetPlatformVersion = corda_platform_version.toInteger()
}
signing {
enabled false
}
sealing {
// Cannot seal JAR because other module also defines classes in the package net.corda.vega.analytics
enabled false
@ -38,3 +35,7 @@ dependencies {
compile "com.opengamma.strata:strata-loader:$strata_version"
compile "com.opengamma.strata:strata-math:$strata_version"
}
jar {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}