mirror of
https://github.com/corda/corda.git
synced 2025-02-08 20:10:22 +00:00
Many fixes to get gradle plugins and other projects working post-merge.
This commit is contained in:
parent
34d1e1583e
commit
2b96f7e79e
@ -103,7 +103,7 @@ tasks.withType(Test) {
|
|||||||
// TODO: Move fat JAR building into node subproject.
|
// TODO: Move fat JAR building into node subproject.
|
||||||
task buildCordaJAR(type: FatCapsule, dependsOn: ['quasarScan', 'buildCertSigningRequestUtilityJAR']) {
|
task buildCordaJAR(type: FatCapsule, dependsOn: ['quasarScan', 'buildCertSigningRequestUtilityJAR']) {
|
||||||
applicationClass 'net.corda.node.MainKt'
|
applicationClass 'net.corda.node.MainKt'
|
||||||
archiveName 'corda.jar'
|
archiveName "corda-${corda_version}.jar"
|
||||||
applicationSource = files(project.tasks.findByName('jar'), 'node/build/classes/main/CordaCaplet.class')
|
applicationSource = files(project.tasks.findByName('jar'), 'node/build/classes/main/CordaCaplet.class')
|
||||||
|
|
||||||
capsuleManifest {
|
capsuleManifest {
|
||||||
@ -125,7 +125,7 @@ task buildCertSigningRequestUtilityJAR(type: FatCapsule, dependsOn: project.jar)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Use the Cordformation plugin.
|
// TODO: Use the Cordformation plugin.
|
||||||
task installTemplateNodes(dependsOn: 'buildCordaJAR') << {
|
task deployNodes(dependsOn: 'buildCordaJAR') << {
|
||||||
copy {
|
copy {
|
||||||
from buildCordaJAR.outputs.getFiles()
|
from buildCordaJAR.outputs.getFiles()
|
||||||
from 'config/dev/nameservernode.conf'
|
from 'config/dev/nameservernode.conf'
|
||||||
|
@ -8,7 +8,7 @@ The Corda all-in-one ``corda.jar`` file is generated by the ``gradle buildCordaJ
|
|||||||
This behaviour can be overidden using the ``--config-file`` command line option to target configuration files with different names, or different file location (relative paths are relative to the current working directory).
|
This behaviour can be overidden using the ``--config-file`` command line option to target configuration files with different names, or different file location (relative paths are relative to the current working directory).
|
||||||
Also, the ``--base-directory`` command line option alters the Corda node workspace location and if specified a ``node.conf`` configuration file is then expected in the root of the workspace.
|
Also, the ``--base-directory`` command line option alters the Corda node workspace location and if specified a ``node.conf`` configuration file is then expected in the root of the workspace.
|
||||||
|
|
||||||
The configuration file templates used for the ``gradle installTemplateNodes`` task are to be found in the ``/config/dev`` folder. Also note that there is a basic set of defaults loaded from
|
The configuration file templates used for the ``gradle deployNodes`` task are to be found in the ``/config/dev`` folder. Also note that there is a basic set of defaults loaded from
|
||||||
the built in resource file ``/node/src/main/resources/reference.conf`` of the ``:node`` gradle module. All properties in this can be overidden in the file configuration
|
the built in resource file ``/node/src/main/resources/reference.conf`` of the ``:node`` gradle module. All properties in this can be overidden in the file configuration
|
||||||
and for rarely changed properties this defaulting allows the property to be excluded from the configuration file.
|
and for rarely changed properties this defaulting allows the property to be excluded from the configuration file.
|
||||||
|
|
||||||
|
@ -9,3 +9,11 @@ the rest of the Corda libraries.
|
|||||||
Some of the plugins here are duplicated with the ones in buildSrc. While the duplication is unwanted any
|
Some of the plugins here are duplicated with the ones in buildSrc. While the duplication is unwanted any
|
||||||
currently known solution (such as publishing from buildSrc or setting up a separate project/repo) would
|
currently known solution (such as publishing from buildSrc or setting up a separate project/repo) would
|
||||||
introduce a two step build which is less convenient.
|
introduce a two step build which is less convenient.
|
||||||
|
|
||||||
|
Installing
|
||||||
|
----------
|
||||||
|
|
||||||
|
If you need to bootstrap the corda repository you can install these plugins with
|
||||||
|
|
||||||
|
|
||||||
|
gradle -u install
|
27
gradle-plugins/build.gradle
Normal file
27
gradle-plugins/build.gradle
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
// This script exists just to allow bootstrapping the gradle plugins if maven central or jcenter are unavailable
|
||||||
|
// or if you are developing these plugins. See the readme for more information.
|
||||||
|
|
||||||
|
buildscript {
|
||||||
|
// Our version: bump this on release.
|
||||||
|
ext.corda_version = "0.6-SNAPSHOT"
|
||||||
|
ext.corda_published_version = "0.5" // Depend on our existing published publishing plugin.
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
jcenter()
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
classpath "net.corda.plugins:publish-utils:$corda_published_version"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
apply plugin: 'maven-publish'
|
||||||
|
|
||||||
|
allprojects {
|
||||||
|
group 'net.corda'
|
||||||
|
version "$corda_version"
|
||||||
|
}
|
||||||
|
|
||||||
|
// Aliasing the publishToMavenLocal for simplicity.
|
||||||
|
task(install, dependsOn: 'publishToMavenLocal')
|
||||||
|
|
@ -1,5 +1,5 @@
|
|||||||
apply plugin: 'groovy'
|
apply plugin: 'groovy'
|
||||||
apply plugin: DefaultPublishTasks
|
apply plugin: 'net.corda.plugins.publish-utils'
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile gradleApi()
|
compile gradleApi()
|
||||||
|
@ -209,7 +209,7 @@ class Node {
|
|||||||
* @return A file representing the Corda JAR.
|
* @return A file representing the Corda JAR.
|
||||||
*/
|
*/
|
||||||
private File verifyAndGetCordaJar() {
|
private File verifyAndGetCordaJar() {
|
||||||
def maybeCordaJAR = project.configurations.runtime.filter { it.toString().contains("corda-${project.rootProject.corda_version}.jar")}
|
def maybeCordaJAR = project.configurations.runtime.filter { it.toString().contains("corda-${project.corda_version}.jar")}
|
||||||
if(maybeCordaJAR.size() == 0) {
|
if(maybeCordaJAR.size() == 0) {
|
||||||
throw new RuntimeException("No Corda Capsule JAR found. Have you deployed the Corda project to Maven? Looked for \"corda-${project.corda_version}.jar\"")
|
throw new RuntimeException("No Corda Capsule JAR found. Have you deployed the Corda project to Maven? Looked for \"corda-${project.corda_version}.jar\"")
|
||||||
} else {
|
} else {
|
||||||
|
1
gradle-plugins/gradle.properties
Normal file
1
gradle-plugins/gradle.properties
Normal file
@ -0,0 +1 @@
|
|||||||
|
version 0.6 s
|
@ -1,5 +1,5 @@
|
|||||||
apply plugin: 'groovy'
|
apply plugin: 'groovy'
|
||||||
apply plugin: DefaultPublishTasks
|
apply plugin: 'net.corda.plugins.publish-utils' // TODO: Remove when bintray publishing code is in master
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile gradleApi()
|
compile gradleApi()
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
apply plugin: 'groovy'
|
apply plugin: 'groovy'
|
||||||
apply plugin: DefaultPublishTasks
|
apply plugin: 'net.corda.plugins.publish-utils'
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile gradleApi()
|
compile gradleApi()
|
||||||
|
4
gradle-plugins/settings.gradle
Normal file
4
gradle-plugins/settings.gradle
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
rootProject.name = 'corda-gradle-plugins'
|
||||||
|
include 'quasar-utils'
|
||||||
|
include 'publish-utils'
|
||||||
|
include 'cordformation'
|
@ -25,6 +25,10 @@ repositories {
|
|||||||
maven {
|
maven {
|
||||||
url 'https://dl.bintray.com/kotlin/exposed'
|
url 'https://dl.bintray.com/kotlin/exposed'
|
||||||
}
|
}
|
||||||
|
// A hack to allow the samples to use the locally built corda.jar. Do not copy in other cordapps.
|
||||||
|
flatDir {
|
||||||
|
dirs rootProject.buildDir.toString() + '/libs'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
@ -35,7 +35,6 @@ repositories {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
main {
|
main {
|
||||||
resources {
|
resources {
|
||||||
|
@ -75,9 +75,6 @@ dependencies {
|
|||||||
compile("org.graphstream:gs-ui:1.3") {
|
compile("org.graphstream:gs-ui:1.3") {
|
||||||
exclude group: "bouncycastle"
|
exclude group: "bouncycastle"
|
||||||
}
|
}
|
||||||
|
|
||||||
// Cordapp dependencies
|
|
||||||
// Specify your cordapp's dependencies below, including dependent cordapps
|
|
||||||
}
|
}
|
||||||
|
|
||||||
task deployNodes(type: net.corda.plugins.Cordform, dependsOn: [':install']) {
|
task deployNodes(type: net.corda.plugins.Cordform, dependsOn: [':install']) {
|
||||||
|
@ -8,9 +8,6 @@ include 'experimental'
|
|||||||
include 'test-utils'
|
include 'test-utils'
|
||||||
include 'tools:explorer'
|
include 'tools:explorer'
|
||||||
include 'tools:loadtest'
|
include 'tools:loadtest'
|
||||||
include 'gradle-plugins:quasar-utils'
|
|
||||||
include 'gradle-plugins:publish-utils'
|
|
||||||
include 'gradle-plugins:cordformation'
|
|
||||||
include 'docs/source/example-code' // Note that we are deliberately choosing to use '/' here. With ':' gradle would treat the directories as actual projects.
|
include 'docs/source/example-code' // Note that we are deliberately choosing to use '/' here. With ':' gradle would treat the directories as actual projects.
|
||||||
include 'samples:attachment-demo'
|
include 'samples:attachment-demo'
|
||||||
include 'samples:trader-demo'
|
include 'samples:trader-demo'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user