Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix JPMS Support #130

Merged
merged 1 commit into from
Feb 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -40,26 +40,25 @@ dependencies {
val kotlinVersion = "1.9.0"

val junit = "5.10.1"
val slf4j = "2.0.11"
val okhttp = "4.12.0"

compileOnly("org.jetbrains:annotations:$annotations")
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion")

compileOnly("io.javalin:javalin:$javalin")
implementation(platform("io.javalin:javalin-parent:$javalin")) //Javalin BOM

implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion")
implementation(platform("io.javalin:javalin-parent:$javalin")) //Javalin BOM
implementation("org.eclipse.jetty.http2:http2-server")
implementation("org.eclipse.jetty:jetty-alpn-conscrypt-server")
implementation("org.eclipse.jetty:jetty-alpn-java-server")

implementation("io.github.hakky54:sslcontext-kickstart:$sslContextKickstart")
implementation("io.github.hakky54:sslcontext-kickstart-for-jetty:$sslContextKickstart")
implementation("io.github.hakky54:sslcontext-kickstart-for-pem:$sslContextKickstart")

testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:$junit")
testImplementation("org.junit.jupiter:junit-jupiter-api:$junit")
testImplementation("io.javalin:javalin:$javalin")
testImplementation("org.slf4j:slf4j-simple:2.0.11")
testImplementation("org.slf4j:slf4j-simple:$slf4j")
testImplementation("com.squareup.okhttp3:okhttp:$okhttp")
testImplementation("com.squareup.okhttp3:okhttp-tls:$okhttp")

Expand Down Expand Up @@ -146,6 +145,8 @@ nexusPublishing {
}

tasks.register<Jar>("dokkaJavadocJar") {
group = "documentation"
description = "Generates a jar file containing the generated Javadoc API documentation."
dependsOn(tasks.dokkaJavadoc)
from(tasks.dokkaJavadoc.flatMap { it.outputDirectory })
archiveClassifier.set("javadoc")
Expand All @@ -159,6 +160,13 @@ java {
modularity.inferModulePath.set(true)
}

tasks.compileJava {
options.compilerArgumentProviders.add(CommandLineArgumentProvider {
// Provide compiled Kotlin classes to javac – needed for Java/Kotlin mixed sources to work
listOf("--patch-module", "io.javalin.community.ssl=${sourceSets["main"].output.asPath}")
})
}

kotlin {
compilerOptions{
jvmTarget.set(JvmTarget.JVM_11)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
exports io.javalin.community.ssl;
exports io.javalin.community.ssl.util;

requires io.javalin;
requires transitive io.javalin;
requires org.eclipse.jetty.server;
requires org.eclipse.jetty.alpn.server;
requires org.eclipse.jetty.http2.server;
Expand Down
Loading