breandan / kotlingrad

🧩 Shape-Safe Symbolic Differentiation with Algebraic Data Types
https://breandan.net/public/masters_thesis.pdf#page=49
Apache License 2.0
515 stars 21 forks source link

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

Closed Jason5Lee closed 4 years ago

Jason5Lee commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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

breandan commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

Which version are you using?

Jason5Lee commented 4 years ago

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

breandan commented 4 years ago

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.