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

Bundled lwjgl methods don't have javadoc comments #75

Closed
T3sT3ro opened this issue Aug 18, 2021 · 1 comment
Closed

Bundled lwjgl methods don't have javadoc comments #75

T3sT3ro opened this issue Aug 18, 2021 · 1 comment
Labels
docs Improvements or additions to documentation feat New feature or request

Comments

@T3sT3ro
Copy link

T3sT3ro commented Aug 18, 2021

Whenever I try to use some of the functions from lwjgl that are exposed with an api dependency from the imgui-java-app I can't get any IDE help in method descriptions or params from the lwjgl package. This hinders development significantly. I tried adding lwjgl dependencies to the project myself to force the IDE to switch, but IDE still points to your shaded lwjgl and I don't know how to make it resolve the other way.

I'm no gradle ninja so I don't know how to make the project "rewire" to another lwjgl. If I understand correctly what shading and everything is, then the imgui-java-app shades the lwjgl inside but skips the javadoc comments, right?

I like what you did with the Application and Window classes, so I wanted to use them, but I can't resolve the conflict with my current knowledge.

Maybe it would be better to create 2 versions of imgui-java-app - one with shaded lwjgl and another one with runtimeOnly or implementation dependency?

As a sidenote - It would be good to give some basic descriptions in the README.md about what do packages do - I had to analyze subproject build.gradle files to understand them.

@T3sT3ro
Copy link
Author

T3sT3ro commented Aug 18, 2021

Ok so I found a way to sidestep this problem but I am too much of a newbie in gradle to know if what I'm doing is right and won't introduce some unwanted side effects.

I added lwjgl dependencies myself but I also added the exclude rule to imgui-java-app for org.lwjgl.

dependencies {
    implementation(project(":magma"))

    implementation(kotlin("stdlib"))
    implementation("io.github.microutils", "kotlin-logging-jvm","2.0.10")
    implementation("ch.qos.logback", "logback-classic", "1.2.5")

    testImplementation("org.junit.jupiter:junit-jupiter:5.7.0")

    // lwjgl - as external dependency because bundled in imgui has no javadoc nor intellisense
    val lwjglNatives = when (OperatingSystem.current()) {
        OperatingSystem.LINUX   -> "natives-linux"
        OperatingSystem.WINDOWS -> "natives-windows"
        else                    -> throw Error("Unrecognized or unsupported Operating system. Please set \"lwjglNatives\" manually")
    }
    val lwjglVersion = "3.2.3"

    implementation(platform("org.lwjgl:lwjgl-bom:$lwjglVersion"))
    implementation("org.lwjgl", "lwjgl")
    implementation("org.lwjgl", "lwjgl-glfw")
    implementation("org.lwjgl", "lwjgl-opengl")

    // It works without the 3 below, but I don't know why, so I left it here. Can I safely delete this?
    runtimeOnly("org.lwjgl", "lwjgl", classifier = lwjglNatives)
    runtimeOnly("org.lwjgl", "lwjgl-glfw", classifier = lwjglNatives)
    runtimeOnly("org.lwjgl", "lwjgl-opengl", classifier = lwjglNatives)

    // imgui
    val imguiVersion = "1.83.3"

    implementation("io.github.spair", "imgui-java-app", version = imguiVersion) {
        exclude("org.lwjgl") // <- this in combination with manual lwjgl deps. gives javadocs and IntelliSense
    }
}

@SpaiR SpaiR added the feat New feature or request label Aug 22, 2021
@SpaiR SpaiR added the docs Improvements or additions to documentation label Feb 23, 2022
@SpaiR SpaiR closed this as completed in 8a560ca Dec 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to documentation feat New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants