mirror of
https://github.com/corda/corda.git
synced 2024-12-29 17:28:56 +00:00
47068e6b7a
* Upgrade gradle plugin; add target version attribute to finance and sample cordapps. * Remove '-SNAPSHOT' from gradlePluginsVersion. * Fix naming. * Update docs. * Respond to feedback. * Fix irs demo * Fix more samples * Fix more samples * Fix deployNodes * Fix deployNodes * more fixes * fix simm valuation * more fixes * more fixes * more fixes * more fixes * Publication should have *nothing* to do with cordformation and deployNodes. Remove it! And if this exposes a bug then "so be it". * Disable CorDapp signing for Cordapp Configuration and Network Verifier. * Disable CorDapp signing for SIMM Valuation Demo. * Remove remaining publishing nonsense from samples. * Workarounds fpr cordapp-configuration, network-verifier and simm-valuation-demo: JarSigner rejects jars with duplicates inside, so remove them. * Upgrade to Gradle plugin 4.0.32 and reenable CorDapp signing for samples.
83 lines
2.5 KiB
Groovy
83 lines
2.5 KiB
Groovy
apply plugin: 'net.corda.plugins.cordapp'
|
|
|
|
def javaHome = System.getProperty('java.home')
|
|
def shrinkJar = file("$buildDir/libs/${project.name}-${project.version}-tiny.jar")
|
|
|
|
cordapp {
|
|
info {
|
|
vendor = 'R3'
|
|
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.
|
|
enabled false
|
|
}
|
|
}
|
|
|
|
configurations {
|
|
shrinkArtifacts
|
|
}
|
|
|
|
dependencies {
|
|
cordaCompile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
|
|
|
// The SIMM demo CorDapp depends upon Cash CorDapp features
|
|
cordapp project(':finance')
|
|
|
|
// Corda integration dependencies
|
|
cordaCompile project(':core')
|
|
|
|
|
|
// Cordapp dependencies
|
|
// Specify your cordapp's dependencies below, including dependent cordapps
|
|
compile "com.opengamma.strata:strata-product:$strata_version"
|
|
compile "com.opengamma.strata:strata-market:$strata_version"
|
|
}
|
|
|
|
jar {
|
|
classifier = 'fat'
|
|
}
|
|
|
|
import proguard.gradle.ProGuardTask
|
|
task shrink(type: ProGuardTask) {
|
|
injars jar
|
|
outjars shrinkJar
|
|
|
|
libraryjars "$javaHome/lib/rt.jar"
|
|
libraryjars "$javaHome/lib/jce.jar"
|
|
configurations.runtime.forEach {
|
|
libraryjars it.path, filter: '!META-INF/versions/**'
|
|
}
|
|
|
|
dontwarn 'afu.org.checkerframework.**'
|
|
dontwarn 'co.paralleluniverse.**'
|
|
dontwarn 'org.checkerframework.**'
|
|
dontwarn 'org.joda.**'
|
|
dontnote
|
|
|
|
// We need to preserve our CorDapp's own directory structure so that Corda
|
|
// can find the contract classes.
|
|
keepdirectories 'net/corda/**'
|
|
keepattributes '*'
|
|
dontobfuscate
|
|
dontoptimize
|
|
verbose
|
|
|
|
// These are our CorDapp classes, so don't change these.
|
|
keep 'class net.corda.vega.** { *; }', includedescriptorclasses:true
|
|
|
|
// Until CorDapps are isolated from each other, we need to ensure that the
|
|
// versions of the classes that this CorDapp needs are still usable by other
|
|
// CorDapps. Unfortunately, this means that we cannot shrink them as much as
|
|
// we'd like to.
|
|
keepclassmembers 'class com.opengamma.strata.** { *; }', includedescriptorclasses:true
|
|
keepclassmembers 'class com.google.** { *; }', includedescriptorclasses:true
|
|
keepclassmembers 'class org.joda.** { *; }', includedescriptorclasses:true
|
|
}
|
|
jar.finalizedBy shrink
|
|
|
|
artifacts {
|
|
shrinkArtifacts file: shrinkJar, name: project.name, type: 'jar', extension: 'jar', classifier: 'tiny', builtBy: shrink
|
|
}
|