buildscript { ext.kotlin_version = '1.2.0' ext { springBootVersion = '2.0.0.M7' } repositories { mavenCentral() maven { url "https://repo.spring.io/milestone" } jcenter() } dependencies { classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}") classpath('se.transmode.gradle:gradle-docker:1.2') classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "org.jetbrains.kotlin:kotlin-allopen:$kotlin_version" classpath 'com.github.ben-manes:gradle-versions-plugin:0.17.0' } } group = 'dissem' apply plugin: 'java' apply plugin: 'kotlin' apply plugin: 'kotlin-spring' apply plugin: 'eclipse' apply plugin: 'idea' apply plugin: 'org.springframework.boot' apply plugin: 'io.spring.dependency-management' apply plugin: 'docker' apply plugin: 'com.github.ben-manes.versions' sourceCompatibility = 1.8 targetCompatibility = 1.8 repositories { jcenter() mavenCentral() maven { url "https://repo.spring.io/snapshot" } maven { url "https://repo.spring.io/milestone" } maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' } } configurations { providedRuntime } ext.jabitVersion = 'feature-refactoring-SNAPSHOT' dependencies { compile("org.springframework.boot:spring-boot-starter-hateoas") compile("org.springframework.boot:spring-boot-starter-jersey") compile("org.springframework.boot:spring-boot-starter-web") compile("io.springfox:springfox-swagger2:2.7.0") compile("io.springfox:springfox-swagger-ui:2.7.0") compile "ch.dissem.jabit:jabit-core:$jabitVersion" compile "ch.dissem.jabit:jabit-networking:$jabitVersion" compile "ch.dissem.jabit:jabit-repositories:$jabitVersion" compile "ch.dissem.jabit:jabit-cryptography-bouncy:$jabitVersion" compile "ch.dissem.jabit:jabit-extensions:$jabitVersion" compile 'com.h2database:h2:1.4.194' compile 'com.google.zxing:core:3.3.1' providedRuntime("org.springframework.boot:spring-boot-starter-tomcat") testCompile("org.springframework.boot:spring-boot-starter-test") compile "org.jetbrains.kotlin:kotlin-stdlib-jre8:$kotlin_version" compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version" compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" } eclipse { classpath { containers.remove('org.eclipse.jdt.launching.JRE_CONTAINER') containers 'org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8' } } task buildDocker(type: Docker, dependsOn: build) { push = true applicationName = 'jabit-server' dockerfile = file('src/main/docker/Dockerfile') doFirst { copy { from jar into stageDir } } } jar { baseName = 'jabit-server' from('frontend/dist') { //Public is a default supported Spring Boot resources directory. into 'public' } } //frontend:build will be run before the processResources processResources.dependsOn('frontend:build') task wrapper(type: Wrapper) { gradleVersion = '2.3' } compileKotlin { kotlinOptions { jvmTarget = "1.8" } } compileTestKotlin { kotlinOptions { jvmTarget = "1.8" } }