mirror of
https://github.com/kestra-io/kestra.git
synced 2025-12-19 18:05:41 -05:00
189 lines
5.8 KiB
Groovy
189 lines
5.8 KiB
Groovy
buildscript {
|
|
ext {
|
|
micronautVersion = "1.2.4"
|
|
confluentVersion = "5.3.1"
|
|
kafkaVersion = "2.3.0"
|
|
avroVersion = "1.9.0"
|
|
lombokVersion = "1.18.10"
|
|
}
|
|
}
|
|
|
|
plugins {
|
|
// micronaut
|
|
id "java"
|
|
id "net.ltgt.apt-eclipse" version "0.21"
|
|
id "net.ltgt.apt-idea" version "0.21"
|
|
id "com.github.johnrengelman.shadow" version "4.0.2"
|
|
id "application"
|
|
|
|
// test
|
|
id 'com.adarshr.test-logger' version '1.7.0'
|
|
}
|
|
|
|
idea {
|
|
module {
|
|
downloadJavadoc = true
|
|
downloadSources = true
|
|
}
|
|
}
|
|
|
|
/**********************************************************************************************************************\
|
|
* Main
|
|
**********************************************************************************************************************/
|
|
mainClassName = "org.floworc.cli.App"
|
|
sourceCompatibility = 11
|
|
|
|
dependencies {
|
|
compile project(":cli")
|
|
testCompile project(":cli")
|
|
}
|
|
|
|
|
|
/**********************************************************************************************************************\
|
|
* All projects
|
|
**********************************************************************************************************************/
|
|
allprojects {
|
|
group "org.floworc"
|
|
version "0.1"
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
maven { url "https://jcenter.bintray.com" }
|
|
maven { url "http://packages.confluent.io/maven/" }
|
|
maven { url 'https://jitpack.io' }
|
|
}
|
|
|
|
// micronaut
|
|
apply plugin:"java"
|
|
apply plugin:"net.ltgt.apt-eclipse"
|
|
apply plugin:"net.ltgt.apt-idea"
|
|
apply plugin: "jacoco"
|
|
|
|
// test
|
|
apply plugin:"com.adarshr.test-logger"
|
|
|
|
configurations {
|
|
// for dependencies that are needed for development only
|
|
developmentOnly
|
|
}
|
|
|
|
// dependencies
|
|
dependencies {
|
|
// utils
|
|
annotationProcessor "org.projectlombok:lombok:" + lombokVersion
|
|
runtime "ch.qos.logback:logback-classic:1.2.3"
|
|
compile group: 'com.google.guava', name: 'guava', version: '27.1-jre'
|
|
compileOnly 'org.projectlombok:lombok:' + lombokVersion
|
|
compile 'com.github.jknack:handlebars:4.1.2'
|
|
|
|
// micronaut
|
|
annotationProcessor platform("io.micronaut:micronaut-bom:$micronautVersion")
|
|
annotationProcessor "io.micronaut:micronaut-inject-java"
|
|
annotationProcessor "io.micronaut:micronaut-validation"
|
|
implementation platform("io.micronaut:micronaut-bom:$micronautVersion")
|
|
implementation "io.micronaut:micronaut-inject"
|
|
implementation "io.micronaut:micronaut-validation"
|
|
implementation "io.micronaut:micronaut-runtime"
|
|
compile 'io.micronaut:micronaut-views'
|
|
|
|
|
|
// test
|
|
testAnnotationProcessor platform("io.micronaut:micronaut-bom:$micronautVersion")
|
|
testAnnotationProcessor "io.micronaut:micronaut-inject-java"
|
|
testImplementation platform("io.micronaut:micronaut-bom:$micronautVersion")
|
|
testImplementation "org.junit.jupiter:junit-jupiter-api"
|
|
testImplementation "io.micronaut.test:micronaut-test-junit5"
|
|
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine"
|
|
testRuntime "org.junit.jupiter:junit-jupiter-params"
|
|
|
|
// hamcrest
|
|
testImplementation 'org.hamcrest:hamcrest:2.1'
|
|
testImplementation 'org.hamcrest:hamcrest-library:2.1'
|
|
testCompile group: 'org.exparity', name: 'hamcrest-date', version: '2.0.7'
|
|
|
|
// floworc
|
|
compile group: 'com.devskiller.friendly-id', name: 'friendly-id', version: '1.1.0'
|
|
}
|
|
|
|
// test
|
|
test {
|
|
useJUnitPlatform()
|
|
|
|
testLogging {
|
|
exceptionFormat = "full"
|
|
}
|
|
}
|
|
|
|
testlogger {
|
|
theme 'mocha-parallel'
|
|
showExceptions true
|
|
slowThreshold 2000
|
|
showStandardStreams true
|
|
}
|
|
}
|
|
|
|
/**********************************************************************************************************************\
|
|
* Micronaut
|
|
**********************************************************************************************************************/
|
|
tasks.withType(JavaCompile){
|
|
options.encoding = "UTF-8"
|
|
options.compilerArgs.add("-parameters")
|
|
}
|
|
|
|
run.classpath += configurations.developmentOnly
|
|
test.classpath += configurations.developmentOnly
|
|
|
|
run.jvmArgs(
|
|
"-noverify",
|
|
"-XX:TieredStopAtLevel=1",
|
|
"-Dcom.sun.management.jmxremote",
|
|
'-Dmicronaut.environments=dev,override'
|
|
)
|
|
|
|
/**********************************************************************************************************************\
|
|
* Jar
|
|
**********************************************************************************************************************/
|
|
jar {
|
|
manifest {
|
|
attributes "Main-Class": mainClassName
|
|
}
|
|
}
|
|
|
|
shadowJar {
|
|
mergeServiceFiles()
|
|
}
|
|
|
|
|
|
/**********************************************************************************************************************\
|
|
* Jacoco
|
|
**********************************************************************************************************************/
|
|
subprojects {
|
|
test {
|
|
finalizedBy jacocoTestReport
|
|
}
|
|
|
|
jacoco {
|
|
toolVersion = "0.8.4"
|
|
}
|
|
|
|
jacocoTestReport {
|
|
getAdditionalSourceDirs().setFrom(files(sourceSets.main.allSource.srcDirs))
|
|
getSourceDirectories().setFrom(files(sourceSets.main.allSource.srcDirs))
|
|
getClassDirectories().setFrom(files(sourceSets.main.output))
|
|
}
|
|
}
|
|
|
|
task jacoco(type: org.gradle.testing.jacoco.tasks.JacocoReport) {
|
|
dependsOn = subprojects.test
|
|
|
|
getAdditionalSourceDirs().setFrom(files(subprojects.sourceSets.main.allSource.srcDirs))
|
|
getSourceDirectories().setFrom(files(subprojects.sourceSets.main.allSource.srcDirs))
|
|
getClassDirectories().setFrom(files(subprojects.sourceSets.main.output))
|
|
getExecutionData().setFrom(files(subprojects.jacocoTestReport.executionData))
|
|
|
|
reports {
|
|
html.enabled = true
|
|
xml.enabled = true
|
|
csv.enabled = true
|
|
}
|
|
} |