Skip to content

Commit e470a89

Browse files
authored
JVM enhancements (#10)
1 parent cd5b60d commit e470a89

File tree

77 files changed

+4109
-712
lines changed

Some content is hidden

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

77 files changed

+4109
-712
lines changed

.github/workflows/build.yaml

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ on:
77
branches: [ main ]
88

99
jobs:
10-
test:
10+
test-gradle:
1111
runs-on: ubuntu-latest
1212
strategy:
1313
fail-fast: false
1414
matrix:
1515
java-version: ['11', '21']
1616
steps:
17-
- uses: actions/checkout@v3
17+
- uses: actions/checkout@v4
1818
- name: Set up JDK ${{ matrix.java-version }}
1919
uses: actions/setup-java@v4
2020
with:
@@ -37,6 +37,24 @@ jobs:
3737
**/build/reports/
3838
**/build/test-results/
3939
40+
test-sbt:
41+
runs-on: ubuntu-latest
42+
steps:
43+
- uses: actions/checkout@v4
44+
- name: Set up JDK 21
45+
uses: actions/setup-java@v4
46+
with:
47+
cache: 'sbt'
48+
java-version: 21
49+
distribution: 'temurin'
50+
- name: Setup Gradle
51+
uses: gradle/actions/setup-gradle@v3
52+
- name: Setup sbt
53+
uses: sbt/setup-sbt@v1
54+
- name: Build and test
55+
run: sbt -v publishLocalGradleDependencies ++test
56+
working-directory: ./tasks-scala
57+
4058
# publish-snapshot:
4159
# runs-on: ubuntu-latest
4260
# needs: test

.gitignore

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,28 @@ bin/
4242
/.kotlin
4343
/kotlin-js-store/
4444

45+
# sbt specific
46+
dist/*
47+
target/
48+
lib_managed/
49+
src_managed/
50+
project/boot/
51+
project/plugins/project/
52+
project/local-plugins.sbt
53+
.history
54+
.ensime
55+
.ensime_cache/
56+
.sbt-scripted/
57+
local.sbt
58+
59+
# Bloop
60+
.bsp
61+
62+
# Metals
63+
.bloop/
64+
.metals/
65+
metals.sbt
66+
4567
### Secrets
4668
.envrc
4769

Makefile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
.PHONY: build
2+
3+
build:
4+
./gradlew build
5+
16
dependency-updates:
27
./gradlew dependencyUpdates \
38
-Drevision=release \
@@ -12,6 +17,6 @@ test-watch:
1217
./gradlew -t -i check
1318

1419
test-coverage:
15-
./gradlew clean jvmTest koverHtmlReportJvm
16-
open ./tasks-core/build/reports/kover/htmlJvm/index.html
20+
./gradlew clean build jacocoTestReport koverHtmlReportJvm
21+
open tasks-jvm/build/reports/jacoco/test/html/index.html
1722
open ./tasks-kotlin/build/reports/kover/htmlJvm/index.html

build.gradle.kts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,18 @@ repositories {
1313

1414
buildscript {
1515
dependencies {
16-
classpath("org.jetbrains.dokka:dokka-base:1.9.20")
17-
// classpath("org.jetbrains.dokka:kotlin-as-java-plugin:1.9.20")
16+
classpath("org.jetbrains.dokka:dokka-base:2.0.0")
17+
// classpath("org.jetbrains.dokka:kotlin-as-java-plugin:2.0.0")
1818
}
1919
}
2020

21+
//dokka {
22+
// dokkaPublications.html {
23+
// outputDirectory.set(rootDir.resolve("build/dokka"))
24+
// outputDirectory.set(file("build/dokka"))
25+
// }
26+
//}
27+
2128
tasks.dokkaHtmlMultiModule {
2229
outputDirectory.set(file("build/dokka"))
2330
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
plugins {
2+
`java-library`
3+
jacoco
4+
id("tasks.base")
5+
}

buildSrc/src/main/kotlin/tasks.kmp-project.gradle.kts

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,12 @@ val javadocJar = tasks.create<Jar>("javadocJar") {
2727
}
2828

2929
java {
30-
sourceCompatibility = JavaVersion.VERSION_11
31-
targetCompatibility = JavaVersion.VERSION_11
30+
sourceCompatibility = JavaVersion.VERSION_17
31+
targetCompatibility = JavaVersion.VERSION_17
3232
}
3333

3434
kotlin {
35-
jvm {
36-
withJava()
37-
}
35+
jvm {}
3836

3937
js(IR) {
4038
browser {
@@ -47,23 +45,23 @@ kotlin {
4745
}
4846

4947
tasks.withType<JavaCompile> {
50-
sourceCompatibility = "11"
51-
targetCompatibility = "11"
48+
sourceCompatibility = JavaVersion.VERSION_17.majorVersion
49+
targetCompatibility = JavaVersion.VERSION_17.majorVersion
5250
jvmToolchain {
53-
languageVersion.set(JavaLanguageVersion.of(11))
51+
languageVersion.set(JavaLanguageVersion.of(JavaVersion.VERSION_17.majorVersion))
5452
}
5553
}
5654

5755
tasks.withType<KotlinCompile> {
5856
compilerOptions {
5957
// explicitApiMode = ExplicitApiMode.Strict
6058
// allWarningsAsErrors = true
61-
jvmTarget.set(JvmTarget.JVM_11)
59+
jvmTarget.set(JvmTarget.JVM_17)
6260
freeCompilerArgs.add("-Xjvm-default=all")
6361
}
6462
kotlinJavaToolchain.toolchain.use(
6563
javaLauncher = javaToolchains.launcherFor {
66-
languageVersion = JavaLanguageVersion.of(11)
64+
languageVersion = JavaLanguageVersion.of(JavaVersion.VERSION_17.majorVersion)
6765
}
6866
)
6967
}
@@ -73,6 +71,6 @@ tasks.withType<Test> {
7371
useJUnitPlatform()
7472
javaLauncher =
7573
javaToolchains.launcherFor {
76-
languageVersion = JavaLanguageVersion.of(11)
74+
languageVersion = JavaLanguageVersion.of(JavaVersion.VERSION_17.majorVersion)
7775
}
7876
}

gradle.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,6 @@ kotlin.code.style=official
22

33
# TO BE modified whenever a new version is released
44
project.version=0.0.2
5+
6+
# https://kotlinlang.org/docs/dokka-migration.html#sync-your-project-with-gradle
7+
org.jetbrains.dokka.experimental.gradle.pluginMode=V2EnabledWithHelpers

gradle/libs.versions.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
[versions]
2-
kotlin = "2.0.0"
3-
kover = "0.8.2"
4-
dokka = "1.9.20"
2+
kotlin = "2.1.20"
3+
kover = "0.9.1"
4+
dokka = "2.0.0"
55
gradleVersions = "0.51.0"
6-
kotlinx-coroutines = "1.9.0-RC"
7-
jetbrains-annotations = "24.1.0"
6+
kotlinx-coroutines = "1.10.1"
7+
jetbrains-annotations = "26.0.2"
88
junit-jupiter = "5.10.3"
99
publish = "0.29.0"
1010
jspecify = "1.0.0"
11-
lombok = "1.18.34"
11+
lombok = "1.18.36"
1212
binary-compatibility-validator = "0.16.2"
1313

1414
[libraries]

gradle/wrapper/gradle-wrapper.jar

51 Bytes
Binary file not shown.

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

0 commit comments

Comments
 (0)