2017-03-22 14:08:23 +00:00
|
|
|
buildscript {
|
2017-03-30 15:27:01 +00:00
|
|
|
// For sharing constants between builds
|
|
|
|
Properties constants = new Properties()
|
|
|
|
file("$projectDir/../../constants.properties").withInputStream { constants.load(it) }
|
|
|
|
|
|
|
|
ext.kotlin_version = constants.getProperty("kotlinVersion")
|
2017-04-27 11:22:04 +00:00
|
|
|
ext.bouncycastle_version = constants.getProperty("bouncycastleVersion")
|
2017-04-10 12:45:40 +00:00
|
|
|
ext.typesafe_config_version = constants.getProperty("typesafeConfigVersion")
|
2017-03-22 14:08:23 +00:00
|
|
|
|
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-10-06 14:48:40 +00:00
|
|
|
apply plugin: 'groovy'
|
2017-03-22 14:08:23 +00:00
|
|
|
apply plugin: 'kotlin'
|
2016-12-05 17:37:37 +00:00
|
|
|
apply plugin: 'net.corda.plugins.publish-utils'
|
2016-10-06 14:48:40 +00:00
|
|
|
|
2016-12-05 17:37:37 +00:00
|
|
|
description 'A small gradle plugin for adding some basic Quasar tasks and configurations to reduce build.gradle bloat.'
|
2016-10-06 14:48:40 +00:00
|
|
|
|
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
|
|
|
}
|
|
|
|
|
2017-03-22 14:08:23 +00:00
|
|
|
configurations {
|
|
|
|
noderunner
|
|
|
|
compile.extendsFrom noderunner
|
|
|
|
}
|
|
|
|
|
|
|
|
sourceSets {
|
|
|
|
runnodes {
|
|
|
|
kotlin {
|
|
|
|
srcDir file('src/noderunner/kotlin')
|
|
|
|
compileClasspath += configurations.noderunner
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-12-05 17:37:37 +00:00
|
|
|
dependencies {
|
|
|
|
compile gradleApi()
|
|
|
|
compile localGroovy()
|
2016-11-24 13:44:11 +00:00
|
|
|
|
2017-03-30 15:27:01 +00:00
|
|
|
noderunner "org.jetbrains.kotlin:kotlin-stdlib-jre8:$kotlin_version"
|
2017-03-22 14:08:23 +00:00
|
|
|
|
2017-01-03 14:15:23 +00:00
|
|
|
// TypeSafe Config: for simple and human friendly config files.
|
2017-04-10 12:45:40 +00:00
|
|
|
compile "com.typesafe:config:$typesafe_config_version"
|
2017-04-27 11:22:04 +00:00
|
|
|
|
|
|
|
// Bouncy Castle: for X.500 distinguished name manipulation
|
|
|
|
compile "org.bouncycastle:bcprov-jdk15on:${bouncycastle_version}"
|
2016-11-10 13:14:38 +00:00
|
|
|
}
|
2016-12-05 17:37:37 +00:00
|
|
|
|
2017-03-22 14:08:23 +00:00
|
|
|
task createNodeRunner(type: Jar, dependsOn: [classes]) {
|
|
|
|
manifest {
|
|
|
|
attributes('Main-Class': 'net.corda.plugins.NodeRunnerKt')
|
|
|
|
}
|
|
|
|
baseName = project.name + '-fatjar'
|
|
|
|
from { configurations.noderunner.collect { it.isDirectory() ? it : zipTree(it) } }
|
|
|
|
from sourceSets.runnodes.output
|
|
|
|
}
|
|
|
|
|
|
|
|
jar {
|
|
|
|
from(createNodeRunner) {
|
|
|
|
rename { 'net/corda/plugins/runnodes.jar' }
|
|
|
|
}
|
2017-03-30 15:27:01 +00:00
|
|
|
}
|