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 resolve dependencies even with maven repo added. #6

Closed
Jason5Lee opened this issue Sep 30, 2019 · 7 comments
Closed

Could not resolve dependencies even with maven repo added. #6

Jason5Lee opened this issue Sep 30, 2019 · 7 comments

Comments

@Jason5Lee
Copy link

My build.gradle.kts file is like

import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
    java
    kotlin("jvm") version "1.3.50"
}

group = "..."
version = "..."

repositories {
    maven("https://maven.pkg.github.com/breandan/kotlingrad")
    mavenCentral()
}

dependencies {
    implementation(kotlin("stdlib-jdk8"))
    implementation("edu.umontreal:kotlingrad:0.1")
    testCompile("junit", "junit", "4.12")
}

configure<JavaPluginConvention> {
    sourceCompatibility = JavaVersion.VERSION_1_8
}
tasks.withType<KotlinCompile> {
    kotlinOptions.jvmTarget = "1.8"
}

and it fails to resolve edu.umontreal:kotlingrad:0.1.

@breandan
Copy link
Owner

Hm, thank you for reporting. Do you have access to the GitHub package registry? I was worried about this, maybe we should use a different registry, like Maven central, until it GHPR becomes public. I’ll update the readme.

https://help.github.com/en/articles/configuring-apache-maven-for-use-with-github-package-registry#installing-a-package

@breandan
Copy link
Owner

Alternatively, you can just download the artifact directly: https://github.com/breandan/kotlingrad/packages/19629

@breandan
Copy link
Owner

breandan commented Oct 1, 2019

I have updated the installation instructions with the complete Gradle configuration and tested it on a fresh project. Please feel free to reopen if this does not work for some reason.

@Jason5Lee
Copy link
Author

I follow the new installation instructions. The dependency can be resolved. However, the package seems not to be recognized. I cannot use it in my code. I'm not sure where has gone wrong.

@breandan
Copy link
Owner

breandan commented Oct 1, 2019

Which version are you using?

@Jason5Lee
Copy link
Author

I have tried 0.1 and 0.2, both are not working.

@breandan
Copy link
Owner

breandan commented Oct 2, 2019

Try using version 0.2.2 instead, the previous versions were packaged as a fat JAR, which are valid Gradle dependencies according to Gradle, but the IDE is unable to resolve due a known issue.

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