Skip to content

Commit 644157e

Browse files
committed
Update build
1 parent cb5122b commit 644157e

File tree

5 files changed

+45
-72
lines changed

5 files changed

+45
-72
lines changed

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ MAINTAINER Joris Borgdorff <[email protected]>, Yatharth Ranjan<yatharth.ranjan@k
3131

3232
LABEL description="RADAR-base output data restructuring"
3333

34+
ENV RADAR_OUTPUT_RESTRUCTURE_OPTS=""
3435
ENV JAVA_OPTS="-Djava.security.egd=file:/dev/./urandom -XX:+UseG1GC -XX:MaxHeapFreeRatio=10 -XX:MinHeapFreeRatio=10"
3536

3637
COPY --from=builder /code/build/third-party/* /usr/lib/

Dockerfile.hdfs

Lines changed: 0 additions & 47 deletions
This file was deleted.

build.gradle

Lines changed: 13 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,16 @@
11
plugins {
2-
id 'java'
3-
id 'java-library'
2+
id 'org.jetbrains.kotlin.jvm'
43
id 'application'
54
id 'com.jfrog.bintray' version '1.8.5'
65
id 'maven-publish'
7-
id 'org.jetbrains.kotlin.jvm'
6+
id "org.jetbrains.dokka"
87
id 'com.avast.gradle.docker-compose' version "0.13.4"
98
}
109

1110
group 'org.radarbase'
12-
version '1.1.6-SNAPSHOT'
11+
version '1.2.0-SNAPSHOT'
1312
mainClassName = 'org.radarbase.output.Application'
1413

15-
sourceCompatibility = '1.8'
16-
targetCompatibility = '1.8'
17-
1814
ext {
1915
moduleDescription = 'RADAR-base output restructuring'
2016
website = 'https://radar-base.org'
@@ -80,21 +76,15 @@ dependencies {
8076
testRuntimeOnly group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: junitVersion
8177
testImplementation group: 'org.hamcrest', name: 'hamcrest-all', version: '1.3'
8278
testImplementation "com.nhaarman.mockitokotlin2:mockito-kotlin:2.2.0"
83-
}
8479

85-
compileKotlin {
86-
kotlinOptions {
87-
jvmTarget = "1.8"
88-
}
80+
dokkaHtmlPlugin("org.jetbrains.dokka:kotlin-as-java-plugin:$kotlinVersion")
8981
}
90-
compileTestKotlin {
91-
kotlinOptions {
92-
jvmTarget = "1.8"
93-
}
94-
}
95-
compileIntegrationTestKotlin {
82+
83+
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
9684
kotlinOptions {
97-
jvmTarget = "1.8"
85+
jvmTarget = "11"
86+
apiVersion = "1.4"
87+
languageVersion = "1.4"
9888
}
9989
}
10090

@@ -186,18 +176,17 @@ task sourcesJar(type: Jar, dependsOn: classes) {
186176
manifest.from sharedManifest
187177
}
188178

189-
task javadocJar(type: Jar, dependsOn: javadoc) {
190-
archiveClassifier.set('javadoc')
191-
from javadoc.destinationDir
192-
manifest.from sharedManifest
179+
task dokkaJar(type: Jar, dependsOn: dokkaJavadoc) {
180+
archiveClassifier.set("javadoc")
181+
from("$buildDir/dokka/javadoc/")
193182
}
194183

195184
publishing {
196185
publications {
197186
mavenJar(MavenPublication) {
198187
from components.java
199188
artifact sourcesJar
200-
artifact javadocJar
189+
artifact dokkaJar
201190
pom {
202191
url = githubUrl as String
203192
description = moduleDescription

settings.gradle

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@ pluginManagement {
22
resolutionStrategy {
33
eachPlugin {
44
if ( requested.id.id == 'org.jetbrains.kotlin.jvm' ) {
5-
useModule( "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion" )
5+
useModule("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
6+
}
7+
if (requested.id.id == "org.jetbrains.dokka") {
8+
useModule("org.jetbrains.dokka:dokka-gradle-plugin:$kotlinVersion")
69
}
710
}
811
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
package org.radarbase.output.util
2+
3+
import org.hamcrest.MatcherAssert.assertThat
4+
import org.hamcrest.Matchers.`is`
5+
import org.hamcrest.Matchers.equalTo
6+
import org.junit.jupiter.api.Assertions.*
7+
import org.junit.jupiter.api.BeforeEach
8+
import org.junit.jupiter.api.Test
9+
import org.junit.jupiter.api.io.TempDir
10+
import java.nio.file.Files
11+
import java.nio.file.Path
12+
13+
internal class TemporaryDirectoryTest {
14+
@Test
15+
fun createAndDelete(@TempDir root: Path) {
16+
TemporaryDirectory(root, "worker-").use {
17+
assertThat(Files.list(root).count(), `is`(1))
18+
Files.createTempFile(it.path, "test", "txt")
19+
Files.createTempFile(it.path, "test", "txt")
20+
21+
assertThat(Files.list(it.path).count(), `is`(2))
22+
assertThat(Files.list(root).count(), `is`(1))
23+
}
24+
25+
assertThat(Files.list(root).count(), `is`(0))
26+
}
27+
}

0 commit comments

Comments
 (0)