corda/gradle-plugins/cordformation/build.gradle

70 lines
1.8 KiB
Groovy
Raw Normal View History

buildscript {
// For sharing constants between builds
Properties constants = new Properties()
file("$projectDir/../../constants.properties").withInputStream { constants.load(it) }
ext.kotlin_version = constants.getProperty("kotlinVersion")
ext.bouncycastle_version = constants.getProperty("bouncycastleVersion")
2017-04-10 12:45:40 +00:00
ext.typesafe_config_version = constants.getProperty("typesafeConfigVersion")
repositories {
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
2016-10-06 14:48:40 +00:00
apply plugin: 'groovy'
apply plugin: 'kotlin'
apply plugin: 'net.corda.plugins.publish-utils'
2016-10-06 14:48:40 +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()
}
configurations {
noderunner
compile.extendsFrom noderunner
}
sourceSets {
runnodes {
kotlin {
srcDir file('src/noderunner/kotlin')
compileClasspath += configurations.noderunner
}
}
}
dependencies {
compile gradleApi()
compile localGroovy()
noderunner "org.jetbrains.kotlin:kotlin-stdlib-jre8:$kotlin_version"
// TypeSafe Config: for simple and human friendly config files.
2017-04-10 12:45:40 +00:00
compile "com.typesafe:config:$typesafe_config_version"
// Bouncy Castle: for X.500 distinguished name manipulation
compile "org.bouncycastle:bcprov-jdk15on:${bouncycastle_version}"
2016-11-10 13:14:38 +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' }
}
}