Skip to content

Instantly share code, notes, and snippets.

@MemoAlfa
Created October 1, 2019 15:51
Show Gist options
  • Save MemoAlfa/9508fbf04f40fb82cbaa0871b7efc337 to your computer and use it in GitHub Desktop.
Save MemoAlfa/9508fbf04f40fb82cbaa0871b7efc337 to your computer and use it in GitHub Desktop.
Integration Test Demo build.gradle file
buildscript {
ext {
springBootVersion = '2.1.4.RELEASE'
junitJupiterVersion = '5.3.2'
}
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
mavenCentral()
}
dependencies {
classpath 'name.remal:gradle-plugins:1.0.127'
classpath "org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}"
classpath 'com.palantir.gradle.docker:gradle-docker:0.20.1'
classpath 'com.avast.gradle:gradle-docker-compose-plugin:0.8.13'
classpath 'com.adarshr:gradle-test-logger-plugin:1.6.0'
}
}
plugins {
id "org.flywaydb.flyway" version "5.2.4"
}
apply plugin: 'java'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'com.palantir.docker'
apply from: 'gradle/custom-plugins/testing.gradle'
group = 'com.document.example'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '1.8'
repositories {
mavenCentral()
}
dependencies {
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-actuator'
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-aop'
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-web'
compile group: 'org.springframework.boot', name: 'spring-boot-starter-aop'
compile group: 'io.micrometer', name: 'micrometer-registry-prometheus'
compile group: 'org.springframework.cloud', name: 'spring-cloud-starter'
compile group: 'org.springframework.cloud', name: 'spring-cloud-aws-autoconfigure'
compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.8.1'
compile group: 'org.springframework.cloud', name: 'spring-cloud-aws-messaging'
compile group: 'org.springframework.boot', name: 'spring-boot-starter-data-jpa'
compile group: 'org.postgresql', name: 'postgresql', version: '42.1.4'
compile group: 'org.flywaydb', name: 'flyway-core', version: '5.2.4'
compile group: 'org.projectlombok', name: 'lombok'
compile group: 'org.springframework.cloud', name: 'spring-cloud-starter-openfeign'
compile group: 'org.springframework.boot', name: 'spring-boot-starter-security'
testCompile group: 'org.springframework.restdocs', name: 'spring-restdocs-restassured', version: '2.0.3.RELEASE'
testCompile group: 'org.awaitility', name: 'awaitility', version: '3.1.5'
testCompile group: 'org.mockito', name: 'mockito-junit-jupiter', version: '2.17.0'
testCompile group: 'org.mock-server', name: 'mockserver-client-java', version: '5.6.0'
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: junitJupiterVersion
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-params', version: junitJupiterVersion
testRuntimeOnly group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: junitJupiterVersion
testImplementation group: 'org.springframework.boot', name: 'spring-boot-starter-test'
}
dependencyManagement {
imports {
mavenBom "org.springframework.cloud:spring-cloud-dependencies:Greenwich.SR1"
}
}
docker {
dependsOn build
name project.name
files bootJar.archivePath
buildArgs(['JAR_FILE': "${bootJar.archiveName}"])
}
flyway {
user = project.name
baselineOnMigrate = true
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment