mirror of
https://github.com/corda/corda.git
synced 2024-12-28 00:38:55 +00:00
4dbd404f64
* Remove non-deterministic classes from Avian (wip). * Complete integration between Avian and our local OpenJDK fork. * Revert accidental Avian modification. * Implements a "blacklist filter" for Avian's system classloader. * Remove .DSA, .RSA, .SF and .MF files when creating a fat jar. * Revert more accidental Avian changes. * Fix breakage with dependencies, and retain Kryo instance. * Apply blacklisting per thread rather than globally. * Blacklist java.lang.ClassLoader and all java.lang.Thread* classes. * Add comment explaining class blacklisting. * Fix Avian when building without OpenJDK. * Configure ProGuard to keep more classes for deserialisation. * Retain explicit return type for secure random function. * Add sources of random numbers to the class blacklist. * Blacklist the threading classes more precisely. * Make SystemClassLoader.isForbidden() static. * Prevent ProGuard from removing SerializedLambda.readResolve(). * Remove Avian tests involving direct buffers.
83 lines
2.5 KiB
Groovy
83 lines
2.5 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
|
|
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'
|
|
}
|
|
|
|
task generateNativeSgxHeaders(type: Exec) {
|
|
def classpath = sourceSets.main.output.classesDirs.asPath
|
|
commandLine "javah", "-o", "$buildDir/native/include/jni_sgx_api.h", "-cp", classpath, "com.r3.enclaves.txverify.NativeSgxApi"
|
|
dependsOn classes
|
|
}
|