2017-02-21 14:00:49 +00:00
|
|
|
apply plugin: 'kotlin'
|
|
|
|
|
|
|
|
repositories {
|
|
|
|
mavenLocal()
|
|
|
|
mavenCentral()
|
|
|
|
maven {
|
|
|
|
url 'http://oss.sonatype.org/content/repositories/snapshots'
|
|
|
|
}
|
|
|
|
jcenter()
|
|
|
|
maven {
|
|
|
|
url 'https://dl.bintray.com/kotlin/exposed'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-03-06 17:29:21 +00:00
|
|
|
/*
|
|
|
|
* R3 Proprietary and Confidential
|
|
|
|
*
|
|
|
|
* Copyright (c) 2018 R3 Limited. All rights reserved.
|
|
|
|
*
|
|
|
|
* The intellectual and technical concepts contained herein are proprietary to R3 and its suppliers and are protected by trade secret law.
|
|
|
|
*
|
|
|
|
* Distribution of this file or any portion thereof via any medium without the express permission of R3 is strictly prohibited.
|
|
|
|
*/
|
|
|
|
|
2017-02-21 14:00:49 +00:00
|
|
|
//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')
|
|
|
|
|
2017-07-19 12:29:47 +00:00
|
|
|
compile "org.jetbrains.kotlin:kotlin-stdlib-jre8:$kotlin_version"
|
2017-02-21 14:00:49 +00:00
|
|
|
compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
|
2017-07-19 12:29:47 +00:00
|
|
|
testCompile "org.jetbrains.kotlin:kotlin-test:$kotlin_version"
|
2017-02-21 14:00:49 +00:00
|
|
|
|
2017-09-08 09:13:29 +00:00
|
|
|
testCompile project(':node-driver')
|
2017-02-21 14:00:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
jar {
|
|
|
|
from '../node/capsule/NOTICE' // Copy CDDL notice
|
|
|
|
// Create a fat jar by packing all deps into the output
|
|
|
|
from {
|
2017-09-09 08:56:39 +00:00
|
|
|
configurations.runtime.collect { it.isDirectory() ? it : zipTree(it) }
|
2017-02-21 14:00:49 +00:00
|
|
|
}
|
2017-09-09 08:56:39 +00:00
|
|
|
exclude "META-INF/*.DSA"
|
|
|
|
exclude "META-INF/*.RSA"
|
|
|
|
exclude "META-INF/*.SF"
|
|
|
|
exclude "META-INF/*.MF"
|
2017-02-21 14:00:49 +00:00
|
|
|
archiveName "corda-enclavelet.jar"
|
2017-09-06 16:32:08 +00:00
|
|
|
manifest {
|
|
|
|
attributes(
|
|
|
|
'Main-Class': 'com.r3.enclaves.txverify.Enclavelet',
|
|
|
|
)
|
|
|
|
}
|
2017-02-21 14:00:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
task integrationTest(type: Test) {
|
2017-08-31 07:19:20 +00:00
|
|
|
testClassesDirs = sourceSets.integrationTest.output.classesDirs
|
2017-02-21 14:00:49 +00:00
|
|
|
classpath = sourceSets.integrationTest.runtimeClasspath
|
2017-11-21 17:06:18 +00:00
|
|
|
systemProperties['java.library.path'] = '../sgx-jvm/jvm-enclave/jni/build'
|
|
|
|
}
|
|
|
|
|
|
|
|
test {
|
|
|
|
// Pending Gradle bug: https://github.com/gradle/gradle/issues/2657
|
|
|
|
//systemProperties['java.system.class.loader'] = 'com.r3.enclaves.DummySystemClassLoader'
|
2017-02-21 14:00:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
task generateNativeSgxHeaders(type: Exec) {
|
2017-08-31 07:19:20 +00:00
|
|
|
def classpath = sourceSets.main.output.classesDirs.asPath
|
2017-11-21 17:06:18 +00:00
|
|
|
commandLine "javah", "-o", "$buildDir/native/include/jni_sgx_api.h", "-cp", classpath, "com.r3.enclaves.txverify.NativeSgxApi"
|
2017-02-21 14:00:49 +00:00
|
|
|
dependsOn classes
|
2017-07-19 12:29:47 +00:00
|
|
|
}
|