mirror of
https://github.com/corda/corda.git
synced 2025-04-07 19:34:41 +00:00
Merged in clint-fatjarfix (pull request #451)
Added back gradle config needed by quasar and capsule.
This commit is contained in:
commit
aa7e99f1b6
16
build.gradle
16
build.gradle
@ -33,6 +33,7 @@ apply plugin: 'kotlin'
|
||||
apply plugin: 'project-report'
|
||||
apply plugin: 'com.github.ben-manes.versions'
|
||||
apply plugin: 'maven-publish'
|
||||
apply plugin: QuasarPlugin
|
||||
|
||||
allprojects {
|
||||
apply plugin: 'java'
|
||||
@ -51,7 +52,17 @@ allprojects {
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
jcenter()
|
||||
maven {
|
||||
url 'https://dl.bintray.com/kotlin/exposed'
|
||||
}
|
||||
}
|
||||
|
||||
// Required for building out the fat JAR.
|
||||
dependencies {
|
||||
compile project(':node')
|
||||
compile "com.google.guava:guava:19.0"
|
||||
}
|
||||
|
||||
task jacocoRootReport(type: org.gradle.testing.jacoco.tasks.JacocoReport) {
|
||||
@ -79,7 +90,8 @@ tasks.withType(Test) {
|
||||
reports.html.destination = file("${reporting.baseDir}/${name}")
|
||||
}
|
||||
|
||||
task buildCordaJAR(type: FatCapsule, dependsOn: ['build', 'buildCertSigningRequestUtilityJAR']) {
|
||||
// TODO: Move fat JAR building into node subproject.
|
||||
task buildCordaJAR(type: FatCapsule, dependsOn: ['quasarScan', 'buildCertSigningRequestUtilityJAR']) {
|
||||
applicationClass 'com.r3corda.node.MainKt'
|
||||
archiveName 'corda.jar'
|
||||
applicationSource = files(project.tasks.findByName('jar'), 'node/build/classes/main/CordaCaplet.class')
|
||||
@ -139,6 +151,8 @@ task installTemplateNodes(dependsOn: 'buildCordaJAR') << {
|
||||
// TODO: Verify this works for gradle plugins.
|
||||
task(install, dependsOn: 'publishToMavenLocal')
|
||||
|
||||
quasarScan.dependsOn('classes', ':node:classes', ':core:classes', ':finance:classes')
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
corda(MavenPublication) {
|
||||
|
@ -1,6 +1,7 @@
|
||||
import org.gradle.api.*
|
||||
import org.gradle.api.tasks.testing.Test
|
||||
import org.gradle.api.tasks.JavaExec
|
||||
import java.nio.file.Files
|
||||
|
||||
/**
|
||||
* QuasarPlugin creates a "quasar" configuration, adds quasar as a dependency and creates a "quasarScan" task that scans
|
||||
@ -43,13 +44,15 @@ class QuasarPlugin implements Plugin<Project> {
|
||||
ant.taskdef(name:'scanSuspendables', classname:'co.paralleluniverse.fibers.instrument.SuspendablesScanner',
|
||||
classpath: "${project.sourceSets.main.output.classesDir}:${project.sourceSets.main.output.resourcesDir}:${project.configurations.runtime.asPath}")
|
||||
project.delete "$project.sourceSets.main.output.resourcesDir/META-INF/suspendables", "$project.sourceSets.main.output.resourcesDir/META-INF/suspendable-supers"
|
||||
ant.scanSuspendables(
|
||||
auto:false,
|
||||
suspendablesFile: "$project.sourceSets.main.output.resourcesDir/META-INF/suspendables",
|
||||
supersFile: "$project.sourceSets.main.output.resourcesDir/META-INF/suspendable-supers") {
|
||||
fileset(dir: project.sourceSets.main.output.classesDir)
|
||||
}
|
||||
|
||||
if(project.sourceSets.main.output.classesDir.exists()) {
|
||||
ant.scanSuspendables(
|
||||
auto: false,
|
||||
suspendablesFile: "$project.sourceSets.main.output.resourcesDir/META-INF/suspendables",
|
||||
supersFile: "$project.sourceSets.main.output.resourcesDir/META-INF/suspendable-supers") {
|
||||
fileset(dir: project.sourceSets.main.output.classesDir)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
project.jar.dependsOn project.quasarScan
|
||||
|
Loading…
x
Reference in New Issue
Block a user