ikvmnet / ikvm

A Java Virtual Machine and Bytecode-to-IL Converter for .NET
Other
1.22k stars 111 forks source link

Include JAR files in IKVM.NET.Sdk #326

Closed wasabii closed 1 year ago

wasabii commented 1 year ago

A conversation I had on Discord with @AliveDevil resulted in this.

IKVM.NET.Sdk should support the inclusion of .jar files along side it's existing support for .class and .java files. This will assist @AliveDevil with his project. But also, it's the right place to put it. The goal of IKVM.NET.Sdk is to be a .NET Project type, which produces exactly one output assembly (like every other .NET project type), and there's nothing wrong with it being able to source the input for that production from multiple different types of files. This can be used by users to convert existing JAR files to Assemblies for the purposes of export/redistribution. IkvmReference isn't appropriate for this, because it's geared towards consuming Java libraries for the purpose of using them in an existing project, not for exporting or publishing them.

wasabii commented 1 year ago

Decisions for now:

Compile item group continues to include things compiled with javac (or Kotlin!)

Convert item group includes things compiled with ikvmc. That includes raw .class files and .jar files. Replaces Class itemgroup.

The _CompileCore stage hands off to CompileJava -> Convert.