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

Could not find io.ktor:ktor-io:1.4.0. #38

Closed
real-fluidity opened this issue Jul 23, 2022 · 2 comments
Closed

Could not find io.ktor:ktor-io:1.4.0. #38

real-fluidity opened this issue Jul 23, 2022 · 2 comments

Comments

@real-fluidity
Copy link

real-fluidity commented Jul 23, 2022

I am using the OpenGL sample and I edited it to use a more recent version of kotlin

image

Here is my build.gradle.kts code:

import org.gradle.internal.os.OperatingSystem;
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget

plugins {
    kotlin("multiplatform") version "1.6.21"
}

repositories {
    maven("https://maven.pkg.github.com/Dominaezzz/kgl") {
        credentials {
            username = "USERNAME"
            password = "TOKEN"
        }
    }
}

val kglVersion = "0.1.11"

kotlin {
    val os = OperatingSystem.current()

    if (os.isWindows) mingwX64()
    if (os.isLinux) linuxX64()
    if (os.isMacOsX) macosX64()

    targets.withType<KotlinNativeTarget> {
        binaries {
            executable {
                entryPoint = "main"
            }
        }
        compilations {
            "main" {
                defaultSourceSet {
                    kotlin.srcDir("src/main/kotlin")
                    resources.srcDir("src/main/resources")
                }
                dependencies {
                    implementation("com.kgl:kgl-glfw:$kglVersion")
                    implementation("com.kgl:kgl-glfw-static:$kglVersion")
                    implementation("com.kgl:kgl-opengl:$kglVersion")
                    implementation("com.kgl:kgl-stb:$kglVersion")
                }
            }
            "test" {
                defaultSourceSet {
                    kotlin.srcDir("src/test/kotlin")
                    resources.srcDir("src/test/resources")
                }
            }
        }
    }

    sourceSets {
        // Note: To enable common source sets please comment out "kotlin.import.noCommonSourceSets" property
        // in gradle.properties file and re-import your project in IDE.
    }

    sourceSets.all {
        languageSettings.apply {
            enableLanguageFeature("InlineClasses")
            optIn("kotlin.ExperimentalUnsignedTypes")
        }
    }
}
@Dominaezzz
Copy link
Owner

Looks like you're missing mavenCentral() in your repositories block.

@real-fluidity
Copy link
Author

Oh... my bad.
Do I need to be on a specific OS like Linux to compile for Linux?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants