Compare commits

...

2 Commits

Author SHA1 Message Date
0638b7a116
fix some errors
All checks were successful
continuous-integration/drone/push Build is passing
2020-10-22 00:14:00 +02:00
f6a8ac9aaf
use shadow 2020-10-22 00:12:27 +02:00
3 changed files with 31 additions and 10 deletions

View File

@ -9,7 +9,7 @@ RUN chown -R $APPLICATION_USER /app
USER $APPLICATION_USER
WORKDIR /app
COPY ./build/libs/birb-integrated-bench-0.0.1.jar /app/birb-integrated-bench.jar
COPY ./build/libs/birb-integrated-bench.jar /app/birb-integrated-bench.jar
COPY ./wave.wav /app/wave.wav
CMD ["java", "-server", "-XX:+UnlockExperimentalVMOptions", "-XX:InitialRAMFraction=2", "-XX:MinRAMFraction=2", "-XX:MaxRAMFraction=2", "-XX:+UseG1GC", "-XX:MaxGCPauseMillis=100", "-XX:+UseStringDeduplication", "-jar", "birb-integrated-bench.jar"]

View File

@ -1,14 +1,29 @@
buildscript {
repositories {
jcenter()
mavenCentral()
maven {
url = uri("https://repo.eclipse.org/content/repositories/paho-releases/")
}
maven {
url = uri("https://plugins.gradle.org/m2/")
}
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "com.github.jengelman.gradle.plugins:shadow:5.2.0"
}
}
tasks.withType(JavaCompile) {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
apply plugin: 'kotlin'
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'application'
group 'com.kmlabz.k8s'
@ -17,9 +32,7 @@ mainClassName = "io.ktor.server.jetty.EngineMain"
sourceSets {
main.kotlin.srcDirs = main.java.srcDirs = ['src']
test.kotlin.srcDirs = test.java.srcDirs = ['test']
main.resources.srcDirs = ['resources']
test.resources.srcDirs = ['testresources']
}
repositories {
@ -38,5 +51,19 @@ dependencies {
implementation "io.ktor:ktor-client-jetty:$ktor_version"
implementation "io.ktor:ktor-client-json-jvm:$ktor_version"
implementation "io.ktor:ktor-client-gson:$ktor_version"
testImplementation "io.ktor:ktor-server-tests:$ktor_version"
implementation 'org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.2.5'
}
kotlin.experimental.coroutines = 'enable'
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
kotlinOptions {
jvmTarget = "11"
}
}
shadowJar {
baseName = 'birb-integrated-bench'
classifier = null
version = null
}

View File

@ -2,21 +2,15 @@ package com.kmlabz.k8s
import com.google.gson.Gson
import com.google.gson.GsonBuilder
import com.google.gson.internal.GsonBuildConfig
import io.ktor.application.*
import io.ktor.response.*
import io.ktor.request.*
import io.ktor.client.*
import io.ktor.client.engine.jetty.*
import io.ktor.client.features.json.*
import io.ktor.client.request.*
import io.ktor.client.request.forms.*
import io.ktor.client.statement.*
import io.ktor.http.*
import io.ktor.http.ContentDisposition.Companion.File
import io.ktor.http.content.*
import io.ktor.util.*
import io.ktor.utils.io.streams.*
import kotlinx.coroutines.*
import java.io.File