Skip to content

Commit 97d4e6b

Browse files
committed
Gradle, intelliJ, kotlin, java chores
1 parent fbd0cd7 commit 97d4e6b

File tree

7 files changed

+34
-18
lines changed

7 files changed

+34
-18
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,7 @@ bin/
3939
.vscode/
4040

4141
### Mac OS ###
42-
.DS_Store
42+
.DS_Store
43+
44+
### Kotlin ###
45+
.kotlin/errors/

.idea/detekt.xml

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/gradle.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/kotlinc.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CONTRIBUTING.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ All submissions need to be reviewed before being merged. When you are ready with
2222
## Recommended setup
2323

2424
1. Install Git and configure your GitHub access.
25-
2. Install a Java SDK (e.g. [Eclipse Temurin](https://adoptium.net/temurin/releases)) with compliance level Java 11 at least.
25+
2. Install a Java SDK (e.g. [Eclipse Temurin](https://adoptium.net/temurin/releases)) with compliance level Java 17 at least.
2626
- Set the `JAVA_HOME` environment variable to the installation directory of the Java SDK.
2727
3. Install [IntelliJ IDEA](https://www.jetbrains.com/idea/download/) (Community Edition is enough).
2828
4. Install the [detekt plugin](https://plugins.jetbrains.com/plugin/10761-detekt) in IntelliJ.
@@ -40,7 +40,7 @@ All submissions need to be reviewed before being merged. When you are ready with
4040
4. unselect all packages in the `Import Layout` list.
4141
6. Clone the repository and open it in IntelliJ.
4242
7. Make sure to use the Java SDK you installed in step 2. Set it in `File -> Project Structure -> Project -> Project SDK`.
43-
8. Make sure to use Java 11 as the language level. Set it in `File -> Project Structure -> Project -> Project language level`.
43+
8. Make sure to use Java 17 as the language level. Set it in `File -> Project Structure -> Project -> Project language level`.
4444
9. Develop your code.
4545
10. Build and test the project with `./gradlew build` (or `gradlew.bat build` on Windows).
4646
11. Fix any findings of the static code analysis tool (detekt).
@@ -49,11 +49,18 @@ All submissions need to be reviewed before being merged. When you are ready with
4949
## Alternative setup
5050

5151
1. Install Git and configure your GitHub access.
52-
2. Install a Java SDK (e.g. [Eclipse Temurin](https://adoptium.net/temurin/releases)) with compliance level Java 11 at least.
52+
2. Install a Java SDK (e.g. [Eclipse Temurin](https://adoptium.net/temurin/releases)) with compliance level Java 17 at least.
5353
- Set the `JAVA_HOME` environment variable to the installation directory of the Java SDK.
5454
3. Install [Gradle](https://gradle.org/install/).
5555
4. Clone the repository and open it in your favourite IDE.
5656
5. Develop your code.
5757
6. Build and test the project with `./gradlew build` (or `gradlew.bat build` on Windows).
5858
7. Fix any findings of the static code analysis tool (detekt).
59-
8. Fix any failing tests.
59+
8. Fix any failing tests.
60+
61+
62+
## Troubleshooting
63+
64+
## Gradle: "Could not connect to Kotlin compile daemon"
65+
66+
If you experience `Could not connect to Kotlin compile daemon` while running Gradle build by the Gradle plugin in intelliJ, then run `./gradle build` and the other Gradle commands via the CLI.

build.gradle.kts

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
1-
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
2-
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
3-
41
plugins {
52
kotlin("jvm") version "2.1.21"
63
kotlin("plugin.serialization") version "2.1.21"
7-
id("io.gitlab.arturbosch.detekt") version ("1.23.1")
4+
id("io.gitlab.arturbosch.detekt") version ("1.23.8")
85
id("jacoco")
96
id("org.jetbrains.dokka") version "2.0.0"
107
id("maven-publish")
@@ -20,9 +17,9 @@ repositories {
2017
mavenLocal()
2118
}
2219

23-
val ktorVersion by extra { "2.3.3" }
24-
val detektVersion by extra { "1.23.1" }
25-
val kotestVersion by extra { "5.6.2" }
20+
val ktorVersion by extra { "2.3.13" }
21+
val detektVersion by extra { "1.23.8" }
22+
val kotestVersion by extra { "5.9.1" }
2623

2724
dependencies {
2825
detektPlugins("io.gitlab.arturbosch.detekt:detekt-formatting:$detektVersion")
@@ -47,12 +44,19 @@ tasks.test {
4744
testLogging {
4845
events("skipped", "failed")
4946
showStackTraces = true
50-
exceptionFormat = TestExceptionFormat.FULL
47+
exceptionFormat = org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL
5148
}
5249
}
5350

54-
tasks.withType<KotlinCompile> {
55-
kotlinOptions.jvmTarget = "11"
51+
52+
java {
53+
sourceCompatibility = JavaVersion.VERSION_17
54+
targetCompatibility = JavaVersion.VERSION_17
55+
}
56+
kotlin {
57+
compilerOptions {
58+
jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17
59+
}
5660
}
5761

5862
val sourcesJar by tasks.registering(Jar::class) {

0 commit comments

Comments
 (0)