|
| 1 | +buildscript { |
| 2 | + ext { |
| 3 | + javaVersion = "1.8" |
| 4 | + vavrVersion = "0.9.2" |
| 5 | + kotlinVersion = "1.2.30" |
| 6 | + springCloudVersion = "Finchley.M6" |
| 7 | + springBootVersion = "2.0.0.RELEASE" |
| 8 | + springIntegrationVersion = "5.0.2.RELEASE" |
| 9 | + } |
| 10 | +} |
| 11 | + |
| 12 | +plugins { |
| 13 | + id "idea" |
| 14 | + id "java" |
| 15 | + id "maven" |
| 16 | + id "eclipse" |
| 17 | + id "org.jetbrains.kotlin.jvm" version "1.2.30" |
| 18 | + id "org.springframework.boot" version "2.0.0.RELEASE" |
| 19 | + id "com.avast.gradle.docker-compose" version "0.6.13" |
| 20 | + id "org.jetbrains.kotlin.plugin.spring" version "1.2.30" |
| 21 | + id "io.spring.dependency-management" version "1.0.4.RELEASE" |
| 22 | +} |
| 23 | + |
| 24 | +group = "daggerok" |
| 25 | +version = "0.0.1" |
| 26 | +sourceCompatibility = targetCompatibility = "$javaVersion" |
| 27 | + |
| 28 | +compileKotlin { |
| 29 | + incremental = true |
| 30 | + kotlinOptions { |
| 31 | + freeCompilerArgs = ["-Xjsr305=strict"] |
| 32 | + jvmTarget = "$javaVersion" |
| 33 | + } |
| 34 | +} |
| 35 | + |
| 36 | +compileTestKotlin { |
| 37 | + incremental = true |
| 38 | + kotlinOptions { |
| 39 | + freeCompilerArgs = ["-Xjsr305=strict"] |
| 40 | + jvmTarget = "$javaVersion" |
| 41 | + } |
| 42 | +} |
| 43 | + |
| 44 | +defaultTasks "clean", "build" |
| 45 | + |
| 46 | +repositories { |
| 47 | + mavenLocal() |
| 48 | + mavenCentral() |
| 49 | +} |
| 50 | + |
| 51 | +dependencies { |
| 52 | + |
| 53 | + compile("org.springframework.boot:spring-boot-starter-integration") |
| 54 | + compile("org.springframework.boot:spring-boot-starter-webflux") |
| 55 | + compile("org.springframework.boot:spring-boot-starter-actuator") |
| 56 | + testCompile("org.springframework.boot:spring-boot-starter-test") |
| 57 | + testCompile("io.projectreactor:reactor-test") |
| 58 | + compile("io.vavr:vavr:$vavrVersion") |
| 59 | + compileOnly("org.projectlombok:lombok") |
| 60 | + testCompileOnly("org.projectlombok:lombok") |
| 61 | + compile("com.fasterxml.jackson.module:jackson-module-kotlin:2.9.4.1") |
| 62 | + compile("org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion") |
| 63 | + testCompile("org.jetbrains.kotlin:kotlin-test:$kotlinVersion") |
| 64 | +} |
| 65 | + |
| 66 | +dependencyManagement { |
| 67 | + imports { |
| 68 | + mavenBom "org.springframework.integration:spring-integration-bom:$springIntegrationVersion" |
| 69 | + mavenBom "org.springframework.boot:spring-boot-dependencies:$springBootVersion" |
| 70 | + mavenBom "org.springframework.cloud:spring-cloud-dependencies:$springCloudVersion" |
| 71 | + } |
| 72 | +} |
| 73 | + |
| 74 | +bootJar { |
| 75 | + launchScript() |
| 76 | +} |
| 77 | + |
| 78 | +def profile = project.hasProperty("profile") ? project.getProperty("profile") : "gradle" |
| 79 | + |
| 80 | +dockerCompose { |
| 81 | + useComposeFiles = [project.file("docker-compose-${profile}.yaml")] |
| 82 | + // captureContainersOutput = true |
| 83 | + captureContainersOutput = false |
| 84 | + stopContainers = true |
| 85 | + removeContainers = true |
| 86 | + removeImages = "Local" |
| 87 | + removeVolumes = true |
| 88 | + removeOrphans = true |
| 89 | + forceRecreate = true |
| 90 | + waitForTcpPorts = false |
| 91 | + projectName = project.name |
| 92 | +} |
| 93 | + |
| 94 | +composeUp.dependsOn assemble |
| 95 | + |
| 96 | +task wrapper(type: Wrapper) { |
| 97 | + gradleVersion = "4.6" |
| 98 | + distributionType = "ALL" |
| 99 | +} |
0 commit comments