version = '0.1' buildscript { ext.dokka_version = "0.9.15" ext.httpclient_version = "4.5.2" ext.nativeBuildDir = "$projectDir/native/build" ext.enclaveBuildDir = "$projectDir/../enclave/build" ext.debugArgs = "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005" repositories { mavenLocal() mavenCentral() jcenter() } dependencies { classpath "org.jetbrains.dokka:dokka-gradle-plugin:$dokka_version" } } apply plugin: 'kotlin' apply plugin: 'application' apply plugin: 'org.jetbrains.dokka' mainClassName = 'net.corda.sgx.cli.Program' description "Client side of SGX remote attestation process" configurations { 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 "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" testCompile "junit:junit:$junit_version" testCompile "org.jetbrains.kotlin:kotlin-test:$kotlin_version" compile "com.fasterxml.jackson.core:jackson-core:$jackson_version" compile "com.fasterxml.jackson.core:jackson-databind:$jackson_version" compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" compile "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version" compile "org.apache.httpcomponents:httpclient:$httpclient_version" compile "org.apache.logging.log4j:log4j-slf4j-impl:$log4j_version" compile "org.apache.logging.log4j:log4j-core:$log4j_version" runtime "org.apache.logging.log4j:log4j-web:$log4j_version" compile "org.slf4j:jcl-over-slf4j:$slf4j_version" } dokka { outputFormat = 'html' outputDirectory = "$buildDir/javadoc" } task integrationTest(type: Test) { testClassesDirs = sourceSets.integrationTest.output.classesDirs classpath = sourceSets.integrationTest.runtimeClasspath } tasks.withType(Test) { systemProperty "java.library.path", "$nativeBuildDir" systemProperty "corda.sgx.enclave.path", "$enclaveBuildDir" systemProperty "attestation.home", "$buildDir/logs" jvmArgs "$debugArgs" } task getClasspath(type: Task) { doLast { println sourceSets.main.runtimeClasspath.collect { it.toString() }.join(":") } }