mirror of
https://github.com/corda/corda.git
synced 2024-12-22 14:22:28 +00:00
4aaefb4fe9
* Split Workflow and contracts of Finance App into separate Cordapps, part 1 - content which is different between OS and ENT is still in contract Cordapp. * Move CashSelection implementations to workflow module. * Move CashSelection implmentations to workflow module. * Move finance module to finance-flows, top level finance module is empty. * Move finance module to finance-flows, top level finance module is empty. * Updated build comment. * Revert publication of combined (contracts and flows) corda-finance.jar (to maintain backwards compatibility with 3rd party cordapps dependent on finance) * Added backwards compatibility clarification comment. * Re-instate new cordapp metadata. * Global rename of `finance-flows` to `finance-workflows` to follow adopted naming conventions. * Addressed final review comments. * Rename application to "Corda Finance Demo" * Generation of original corda-finance jar from new sub-modules. * Fixed and tested demobench with new split finance contract and workflow jars. * Renamed finance sub-modules to contracts and workflows. * Remove Michele!!! * Minor fix to filtering logic. * Align CorDapp configuration filename with workflows jar. * Fix breaks caused by finance module naming changes. * Final alignment between OS/ENT of finance contract code.
96 lines
2.8 KiB
Groovy
96 lines
2.8 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 {
|
|
targetPlatformVersion = corda_platform_version.toInteger()
|
|
minimumPlatformVersion 1
|
|
signing {
|
|
// Cordapp is signed after the "shrink" task.
|
|
enabled false
|
|
}
|
|
sealing {
|
|
// Cannot seal JAR because other module also defines classes in the package net.corda.vega.analytics
|
|
enabled false
|
|
}
|
|
contract {
|
|
name "net/corda/vega/contracts"
|
|
versionId 1
|
|
vendor "R3"
|
|
licence "Open Source (Apache 2)"
|
|
}
|
|
}
|
|
|
|
configurations {
|
|
shrinkArtifacts
|
|
}
|
|
|
|
dependencies {
|
|
cordaCompile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
|
|
|
// The SIMM demo CorDapp depends upon Cash CorDapp features
|
|
cordapp project(':finance:contracts')
|
|
|
|
// 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
|
|
}
|
|
|
|
task sign(type: net.corda.plugins.SignJar) {
|
|
inputJars shrink
|
|
}
|
|
|
|
jar.finalizedBy shrink
|
|
shrink.finalizedBy sign
|
|
|
|
artifacts {
|
|
shrinkArtifacts file: sign.outputJars.singleFile, name: project.name, type: 'jar', extension: 'jar', classifier: 'tiny', builtBy: sign
|
|
}
|