From c5f88cc28f9d27f867247a713605368c558795a0 Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Wed, 11 Jul 2018 16:42:26 +0200 Subject: chore: Update Gradle build configuration This change updates the Gradle build configuration in order to make use of the native JUnit 5 integration and the newest Kotlin and Dokka plugins. --- opendc-model-odc/jpa/build.gradle | 66 +++++++-------------------------------- 1 file changed, 11 insertions(+), 55 deletions(-) (limited to 'opendc-model-odc/jpa') diff --git a/opendc-model-odc/jpa/build.gradle b/opendc-model-odc/jpa/build.gradle index 191ca787..33b50d39 100644 --- a/opendc-model-odc/jpa/build.gradle +++ b/opendc-model-odc/jpa/build.gradle @@ -23,69 +23,25 @@ */ /* Build configuration */ -buildscript { - ext.kotlin_version = '1.2.21' - ext.dokka_version = '0.9.15' - - repositories { - mavenCentral() - jcenter() - } - - dependencies { - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - classpath "org.jetbrains.kotlin:kotlin-noarg:$kotlin_version" - classpath "org.jetbrains.dokka:dokka-gradle-plugin:$dokka_version" - classpath 'org.junit.platform:junit-platform-gradle-plugin:1.0.0-RC3' - } -} - -apply plugin: 'java' -apply plugin: 'kotlin' +apply from: '../../gradle/kotlin.gradle' +apply plugin: 'java-library' apply plugin: 'kotlin-jpa' -apply plugin: 'org.jetbrains.dokka' -apply plugin: 'org.junit.platform.gradle.plugin' - -compileKotlin { - kotlinOptions { - jvmTarget = "1.8" - } -} - -compileTestKotlin { - kotlinOptions { - jvmTarget = "1.8" - } -} - -kotlin { - experimental { - coroutines 'enable' - } -} - -dokka { - outputFormat = 'html' - outputDirectory = "$buildDir/javadoc" -} /* Project configuration */ -group 'com.atlarge.opendc' -version '1.1' - repositories { jcenter() } dependencies { - compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" + implementation "org.jetbrains.kotlin:kotlin-stdlib" - compile project(':opendc-core') - compile project(':opendc-stdlib') - compile project(':opendc-model-odc:core') - compile 'org.hibernate.javax.persistence:hibernate-jpa-2.1-api:1.0.0.Final' + api project(':opendc-core') + api project(':opendc-stdlib') + api project(':opendc-model-odc:core') + api "javax.persistence:javax.persistence-api:2.2" + implementation "io.github.microutils:kotlin-logging:1.4.6" - testCompile 'org.junit.jupiter:junit-jupiter-api:5.0.0-RC3' - testRuntime 'org.junit.jupiter:junit-jupiter-engine:5.0.0-RC3' - testCompile 'org.junit.platform:junit-platform-launcher:1.0.0-RC3' + testImplementation "org.junit.jupiter:junit-jupiter-api:$junit_jupiter_version" + testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit_jupiter_version" + testImplementation "org.junit.platform:junit-platform-launcher:$junit_platform_version" } -- cgit v1.2.3