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-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-05-18 14:58:35 +00:00
|
|
|
compile project(':cordform-common')
|
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
|
|
|
}
|
2017-07-18 11:34:56 +00:00
|
|
|
|
|
|
|
publish {
|
|
|
|
name project.name
|
|
|
|
}
|