mirror of
https://github.com/corda/corda.git
synced 2024-12-30 17:57:02 +00:00
a75dd409aa
* Remove component signature files from enclave's fat jar. * Create fat jar using everything in the runtime configuration.
78 lines
2.3 KiB
Groovy
78 lines
2.3 KiB
Groovy
apply plugin: 'kotlin'
|
|
|
|
repositories {
|
|
mavenLocal()
|
|
mavenCentral()
|
|
maven {
|
|
url 'http://oss.sonatype.org/content/repositories/snapshots'
|
|
}
|
|
jcenter()
|
|
maven {
|
|
url 'https://dl.bintray.com/kotlin/exposed'
|
|
}
|
|
}
|
|
|
|
//noinspection GroovyAssignabilityCheck
|
|
configurations {
|
|
// we don't want isolated.jar in classPath, since we want to test jar being dynamically loaded as an attachment
|
|
runtime.exclude module: 'isolated'
|
|
|
|
integrationTestCompile.extendsFrom testCompile
|
|
integrationTestRuntime.extendsFrom testRuntime
|
|
}
|
|
|
|
sourceSets {
|
|
integrationTest {
|
|
kotlin {
|
|
compileClasspath += main.output + test.output
|
|
runtimeClasspath += main.output + test.output
|
|
srcDir file('src/integration-test/kotlin')
|
|
}
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
compile project(':core')
|
|
compile project(':finance')
|
|
// This is added so that we include node-api/src/main/resources/META-INF/services/net.corda.core.node.CordaPluginRegistry
|
|
// which is needed for the serialisation whitelist initialisation.
|
|
// TODO think about this.
|
|
compile project(':node-api')
|
|
|
|
compile "org.jetbrains.kotlin:kotlin-stdlib-jre8:$kotlin_version"
|
|
compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
|
|
testCompile "org.jetbrains.kotlin:kotlin-test:$kotlin_version"
|
|
|
|
testCompile project(':node-driver')
|
|
}
|
|
|
|
jar {
|
|
from '../node/capsule/NOTICE' // Copy CDDL notice
|
|
// Create a fat jar by packing all deps into the output
|
|
from {
|
|
configurations.runtime.collect { it.isDirectory() ? it : zipTree(it) }
|
|
}
|
|
exclude "META-INF/*.DSA"
|
|
exclude "META-INF/*.RSA"
|
|
exclude "META-INF/*.SF"
|
|
exclude "META-INF/*.MF"
|
|
archiveName "corda-enclavelet.jar"
|
|
manifest {
|
|
attributes(
|
|
'Main-Class': 'com.r3.enclaves.txverify.Enclavelet',
|
|
)
|
|
}
|
|
}
|
|
|
|
task integrationTest(type: Test) {
|
|
testClassesDirs = sourceSets.integrationTest.output.classesDirs
|
|
classpath = sourceSets.integrationTest.runtimeClasspath
|
|
jvmArgs '-Djava.library.path=../sgx-jvm/jvm-enclave/jni/build'
|
|
}
|
|
|
|
task generateNativeSgxHeaders(type: Exec) {
|
|
def classpath = sourceSets.main.output.classesDirs.asPath
|
|
commandLine "javah", "-o", "build/native/include/jni_sgx_api.h", "-cp", classpath, "com.r3.enclaves.txverify.NativeSgxApi"
|
|
dependsOn classes
|
|
}
|