Skip to content
This repository was archived by the owner on Aug 8, 2025. It is now read-only.

Commit 2ea0271

Browse files
authored
Merge pull request #11 from linked-planet/maintenance/upgrade-versions
upgrade versions
2 parents f22c4aa + 54d4048 commit 2ea0271

File tree

87 files changed

+6474
-2617
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+6474
-2617
lines changed

.github/workflows/ktorbase-example.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@ on:
44
push:
55
branches:
66
- master
7+
schedule:
8+
- cron: "0 1 * * *"
79

810
jobs:
911

1012
github-build-and-test:
1113
runs-on: ubuntu-latest
1214
steps:
13-
- uses: actions/cache@v2
15+
- uses: actions/cache@v3
1416
with:
1517
path: |
1618
~/.gradle/caches
@@ -19,11 +21,10 @@ jobs:
1921
restore-keys: |
2022
${{ runner.os }}-gradle-example-ktorbase-
2123
22-
# ktor prevents compile-time 11, see: https://youtrack.jetbrains.com/issue/KTOR-619
23-
- name: Set up JDK 8
24-
uses: actions/setup-java@v2
24+
- name: Set up JDK
25+
uses: actions/setup-java@v3
2526
with:
26-
java-version: '8'
27+
java-version: '11'
2728
distribution: 'adopt'
2829

2930
- name: Initialize
@@ -53,10 +54,10 @@ jobs:
5354
run: cd /tmp/com.linked-planet.ktor-example && ./gradlew build
5455

5556
- name: Set up QEMU
56-
uses: docker/setup-qemu-action@v1
57+
uses: docker/setup-qemu-action@v2
5758

5859
- name: Set up Docker Buildx
59-
uses: docker/setup-buildx-action@v1
60+
uses: docker/setup-buildx-action@v2
6061

6162
- name: Docker Build and Push
6263
working-directory: /tmp/com.linked-planet.ktor-example

.github/workflows/ktorbase.yml

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,22 @@
11
name: KtorBase
22

3-
on: [ push ]
3+
on:
4+
push:
5+
branches:
6+
- '**'
7+
schedule:
8+
- cron: "0 1 * * *"
9+
release:
10+
types: [ published ]
411

512
jobs:
613

714
build-and-test:
815
runs-on: ubuntu-latest
916
steps:
10-
- uses: actions/checkout@v2
17+
- uses: actions/checkout@v3
1118

12-
- uses: actions/cache@v2
19+
- uses: actions/cache@v3
1320
with:
1421
path: |
1522
~/.gradle/caches
@@ -18,30 +25,29 @@ jobs:
1825
restore-keys: |
1926
${{ runner.os }}-gradle-ktorbase-
2027
21-
# ktor prevents compile-time 11, see: https://youtrack.jetbrains.com/issue/KTOR-619
22-
- name: Set up JDK 8
23-
uses: actions/setup-java@v2
28+
- name: Set up JDK
29+
uses: actions/setup-java@v3
2430
with:
25-
java-version: '8'
31+
java-version: '11'
2632
distribution: 'adopt'
2733

2834
- name: Gradle Build
2935
run: ./gradlew build
3036

3137
- name: Set up QEMU
32-
uses: docker/setup-qemu-action@v1
38+
uses: docker/setup-qemu-action@v2
3339

3440
- name: Set up Docker Buildx
35-
uses: docker/setup-buildx-action@v1
41+
uses: docker/setup-buildx-action@v2
3642

3743
- name: Login to DockerHub
38-
uses: docker/login-action@v1
44+
uses: docker/login-action@v2
3945
with:
4046
username: ${{ secrets.DOCKERHUB_USERNAME }}
4147
password: ${{ secrets.DOCKERHUB_TOKEN }}
4248

4349
- name: Docker Build and Push
44-
uses: docker/build-push-action@v2
50+
uses: docker/build-push-action@v3
4551
with:
4652
context: .
4753
push: true

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
FROM openjdk:11-jre
22

33
# install prometheus jmx exporter
4-
ENV JMX_PROMETHEUS_VERSION="0.15.0"
4+
ENV JMX_PROMETHEUS_VERSION="0.17.2"
55
ENV JMX_PROMETHEUS_PORT=9404
66
RUN mkdir -p /opt/jmx_exporter
77
RUN wget --no-verbose \

README.md

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -137,19 +137,8 @@ want to use something else.
137137
The build is configured to use [Sassy CSS][sass].
138138
(*see [Sass vs. SCSS: which syntax is better?][sassy-vs-scss]*)
139139

140-
There are some utility classes
141-
that can be used to enable developer features like letting specific
142-
routes fail, or introducing random HTTP delay. We find these
143-
useful for testing how our applications behave in error situations.
144-
There might be more elegant ways or tools for doing this - use them
145-
at your own discretion, or delete them if you don't want them:
146-
- [DevOptions](frontend/src/main/kotlin/com/linkedplanet/ktorbase/DevOptions.kt)
147-
- [GlobalOptions](frontend/src/main/kotlin/com/linkedplanet/ktorbase/GlobalOptions.kt)
148-
- [Async](frontend/src/main/kotlin/com/linkedplanet/ktorbase/util/Async.kt)
149-
150-
We don't claim that these are the best ways to handle these situations. So far,
151-
they worked for us very reliably. If you know how to do things in a better way,
152-
please tell us :-)
140+
For further information regarding frontend development, see
141+
[linked-planet UI-Kit][ui-kit].
153142

154143

155144
## Deployment
@@ -164,12 +153,6 @@ please tell us :-)
164153
- If you don't use Docker either, delete the [docker-build](docker-build) directory
165154
and the [Dockerfile](Dockerfile)
166155

167-
### Java Version
168-
We are running on JRE 11, but the application is compiled with JDK 8 due to the following
169-
ktor issues:
170-
- https://github.com/ktorio/ktor/issues/1137
171-
- https://github.com/ktorio/ktor/issues/321
172-
173156
### Configuration
174157
AWS configuration parameters are stored within the repository in JSON files per
175158
environment (see [ktorbase-test.json](aws/templates/ktorbase-test.json)).
@@ -223,3 +206,4 @@ This template is distributed without any warranty. See <http://creativecommons.o
223206
[kotlin-fullstack-sample]: https://github.com/Kotlin/kotlin-full-stack-application-demo
224207
[jetty]: https://www.eclipse.org/jetty/
225208
[aws-prometheus]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/ContainerInsights-Prometheus.html
209+
[ui-kit]: https://github.com/linked-planet/ui-kit

backend/build.gradle.kts

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
22
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
33

44
val kotlinVersion: String by project
5-
val jvmTarget: String by project
65

76
plugins {
87
kotlin("jvm")
98
application
10-
id("com.github.johnrengelman.shadow") version "7.0.0"
9+
id("com.github.johnrengelman.shadow") version "7.1.2"
1110
}
1211

1312
val ktorVersion = "1.5.4"
13+
val log4jVersion = "2.19.0"
1414
dependencies {
1515
implementation(kotlin("stdlib-jdk8", kotlinVersion))
1616
implementation(project(":common"))
@@ -25,17 +25,16 @@ dependencies {
2525
implementation("io.ktor", "ktor-client-logging-jvm", ktorVersion)
2626
implementation("com.link-time.ktor", "ktor-onelogin-saml", "1.2.0-ktor-1.4.2")
2727

28-
implementation("org.apache.logging.log4j", "log4j-api", "2.14.0")
29-
implementation("org.apache.logging.log4j", "log4j-core", "2.14.0")
30-
implementation("org.apache.logging.log4j", "log4j-slf4j-impl", "2.14.0")
28+
implementation("org.apache.logging.log4j", "log4j-api", log4jVersion)
29+
implementation("org.apache.logging.log4j", "log4j-core", log4jVersion)
30+
implementation("org.apache.logging.log4j", "log4j-slf4j-impl", log4jVersion)
3131

32-
testImplementation("org.junit.jupiter", "junit-jupiter-api", "5.7.1")
33-
testRuntime("org.junit.jupiter", "junit-jupiter-engine", "5.7.1")
34-
testImplementation("io.rest-assured", "rest-assured", "4.3.3")
32+
testImplementation(kotlin("test"))
33+
testImplementation("io.rest-assured", "rest-assured", "5.3.0")
3534
}
3635

3736
tasks.withType<KotlinCompile> {
38-
kotlinOptions.jvmTarget = jvmTarget
37+
kotlinOptions.jvmTarget = "11"
3938
kotlinOptions.freeCompilerArgs = listOf("-Xuse-experimental=kotlin.Experimental")
4039
}
4140

@@ -66,7 +65,7 @@ task("updateBuildVersion") {
6665
}
6766

6867
sourceSets {
69-
create("integrationTest") {
68+
create("integration") {
7069
kotlin {
7170
compileClasspath += main.get().output + configurations.testRuntimeClasspath.get()
7271
runtimeClasspath += output + compileClasspath
@@ -77,8 +76,7 @@ sourceSets {
7776
val integrationTest = task<Test>("integrationTest") {
7877
description = "Run all integration tests"
7978
group = "verification"
80-
testClassesDirs = sourceSets["integrationTest"].output.classesDirs
81-
classpath = sourceSets["integrationTest"].runtimeClasspath
79+
testClassesDirs = sourceSets["integration"].output.classesDirs
80+
classpath = sourceSets["integration"].runtimeClasspath
8281
mustRunAfter(tasks["test"])
83-
useJUnitPlatform()
8482
}

backend/src/integrationTest/kotlin/IntegrationTest.kt renamed to backend/src/integration/kotlin/IntegrationTest.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ import io.restassured.RestAssured
33
import io.restassured.RestAssured.given
44
import io.restassured.http.ContentType
55
import io.restassured.response.ValidatableResponse
6-
import org.junit.jupiter.api.*
6+
import org.junit.BeforeClass
7+
import kotlin.test.Test
78

89
/*
910
* Meant to run against the fully built application, deployed e.g. as Docker Container.
@@ -34,7 +35,7 @@ class IntegrationTest {
3435
}
3536

3637
companion object {
37-
@BeforeAll
38+
@BeforeClass
3839
@JvmStatic
3940
fun configureRestAssured() {
4041
RestAssured.baseURI = BackendConfig.baseUrl

build.gradle.kts

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
1-
import org.gradle.util.GradleVersion
2-
31
println("Gradle Version: " + GradleVersion.current().toString())
42
println("Java Version: " + JavaVersion.current().toString())
53

6-
group = "com.linked-planet"
7-
version = "0.1.0-SNAPSHOT"
4+
plugins {
5+
kotlin("multiplatform") version "1.7.22" apply false
86

9-
ext.set("kotlinVersion", "1.4.32")
10-
ext.set("jvmTarget", "1.8") // ktor prevents compile-time 11, see: https://youtrack.jetbrains.com/issue/KTOR-619
7+
// derive gradle version from git tag
8+
id("pl.allegro.tech.build.axion-release") version "1.14.3"
119

12-
plugins {
13-
kotlin("multiplatform") version "1.4.32" apply false
14-
id("com.github.hierynomus.license") version "0.16.1"
15-
id("com.github.hierynomus.license-report") version "0.16.1"
16-
id("com.github.ben-manes.versions") version "0.38.0"
10+
// provide & configure tasks: dependencyUpdates, useLatestVersions
11+
id("com.github.ben-manes.versions") version "0.44.0"
12+
id("se.ascp.gradle.gradle-versions-filter") version "0.1.16"
13+
id("se.patrikerdes.use-latest-versions") version "0.2.18"
1714
}
1815

16+
group = "com.linked-planet"
17+
version = scmVersion.version
18+
19+
ext.set("kotlinVersion", "1.7.22")
20+
1921
allprojects {
2022
repositories {
2123
mavenCentral()
22-
maven { url = uri("https://maven.pkg.jetbrains.space/kotlin/p/kotlin/kotlin-js-wrappers") }
2324
}
2425
}

common/build.gradle.kts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
val kotlinVersion: String by project
2-
val jvmTarget: String by project
3-
val copyJvmTarget = jvmTarget
42

53
plugins {
64
kotlin("multiplatform")

0 commit comments

Comments
 (0)