Skip to content

Commit

Permalink
docs: enable JPMS in example
Browse files Browse the repository at this point in the history
  • Loading branch information
iseki0 committed Nov 18, 2024
1 parent 28e8092 commit ada4304
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 1 deletion.
6 changes: 5 additions & 1 deletion example/api/example.api
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
public final class MainKt {
public final class example/MainKt {
public static final fun main ()V
public static synthetic fun main ([Ljava/lang/String;)V
}

public class example/PlaceHolder {
public fun <init> ()V
}

11 changes: 11 additions & 0 deletions example/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,20 @@ plugins {
java
kotlin("jvm")
id("org.jetbrains.kotlinx.binary-compatibility-validator") apply false
application
}

dependencies {
implementation(project(":"))
implementation(kotlin("stdlib"))
}

application {
mainClass = "example.MainKt"
}

tasks.compileJava {
options.compilerArgumentProviders.add(CommandLineArgumentProvider {
listOf("--patch-module", "pefile.example.main=${sourceSets["main"].output.asPath}")
})
}
4 changes: 4 additions & 0 deletions example/src/main/java/example/PlaceHolder.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package example;

public class PlaceHolder {
}
5 changes: 5 additions & 0 deletions example/src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module pefile.example.main {
requires kotlin.stdlib;
requires space.iseki.pefile;
exports example;
}
2 changes: 2 additions & 0 deletions example/src/main/kotlin/Main.kt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
package example

import space.iseki.pefile.PEFile
import space.iseki.pefile.walk
import java.nio.file.Path
Expand Down

0 comments on commit ada4304

Please sign in to comment.