Skip to content

Instantly share code, notes, and snippets.

@Pierry
Created August 31, 2018 16:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Pierry/33a9f995680567f4c4b9728eb4597ea5 to your computer and use it in GitHub Desktop.
Save Pierry/33a9f995680567f4c4b9728eb4597ea5 to your computer and use it in GitHub Desktop.
buildscript {
repositories {
mavenCentral()
jcenter()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:2.0.3.RELEASE")
classpath('gradle.plugin.com.palantir.gradle.docker:gradle-docker:0.13.0')
}
}
group 'br.com.opentravel.ws'
version '1.0'
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
apply plugin: "application"
apply plugin: 'com.palantir.docker'
sourceCompatibility = 1.8
targetCompatibility = 1.8
mainClassName = 'br.com.opentravel.ws.aereo.App'
task wrapper(type: Wrapper) {
gradleVersion = "4.6"
}
bootJar {
baseName = 'ws-aereo'
version = '0.1.0'
launchScript()
mainClassName = 'br.com.opentravel.ws.aereo.App'
}
repositories {
mavenCentral()
maven { url "https://repository.jboss.org/nexus/content/repositories/releases" }
}
dependencies {
compile("org.springframework.boot:spring-boot-starter-web")
compile("com.google.code.gson:gson:2.8.5")
testCompile('org.springframework.boot:spring-boot-starter-test')
testCompile group: 'junit', name: 'junit', version: '4.12'
compile("org.springframework.boot:spring-boot-starter-data-jpa")
compile("org.hibernate:hibernate-core:5.3.5.Final")
compile group: 'org.hibernate', name: 'hibernate-entitymanager', version: '4.1.7.Final'
compile("com.h2database:h2")
compile fileTree(dir: 'libs', include: '*.jar')
}
configurations {
system.extendsFrom compile
}
sourceSets {
main {
compileClasspath = configurations.system
}
}
docker {
dependsOn build
name "${project.group}/${bootJar.baseName}"
files bootJar.archivePath
buildArgs(['JAR_FILE': "${bootJar.archiveName}"])
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment