optimatika / okAlgo

Idiomatic Kotlin extensions for ojAlgo
MIT License
26 stars 3 forks source link

UnresolvedDependencyVersionException #1

Closed yatsinar closed 6 years ago

yatsinar commented 6 years ago

Hi, any idea why this could happen:

Warning:root project 'ktor': Unable to build Kotlin project configuration Details: java.lang.reflect.InvocationTargetException: null Caused by: org.gradle.api.artifacts.ResolveException: Could not resolve all dependencies for configuration ':compileClasspath'. Caused by: org.gradle.internal.resolve.ModuleVersionResolveException: Could not resolve com.github.optimatika:okAlgo:1eee643d57. Required by: project : Caused by: org.gradle.internal.resolve.ModuleVersionResolveException: Could not resolve com.github.optimatika:okAlgo:1eee643d57. Caused by: org.gradle.api.internal.artifacts.ivyservice.ivyresolve.parser.MetaDataParseException: Could not parse POM https://jitpack.io/com/github/optimatika/okAlgo/1eee643d57/okAlgo-1eee643d57.pom Caused by: org.gradle.api.internal.artifacts.ivyservice.ivyresolve.parser.UnresolvedDependencyVersionException: Unable to resolve version for dependency 'org.jetbrains.kotlin:kotlin-stdlib:jar'

My gradle is like that:

buildscript {
    ext.kotlin_version = '1.2.30'
    ext.ktor_version = '0.9.1'

    repositories {
        mavenCentral()
    }
    dependencies {
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}

apply plugin: 'java'
apply plugin: 'kotlin'

sourceCompatibility = 1.8

repositories {
    mavenCentral()
    maven { url "http://kotlin.bintray.com/ktor" }
    maven { url 'https://jitpack.io' }
    jcenter()
}

dependencies {
    compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
    compile "io.ktor:ktor-server-netty:$ktor_version"
    compile "io.ktor:ktor-gson:$ktor_version"
    compile 'org.ojalgo:ojalgo:45.0.0'
    compile 'com.github.optimatika:okAlgo:1eee643d57'
    testCompile group: 'junit', name: 'junit', version: '4.12'
}

compileKotlin {
    kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
    kotlinOptions.jvmTarget = "1.8"
}
kotlin {
    experimental {
        coroutines "enable"
    }
}

Tried sdlib w/o "-jdk8", removing jvmTargets, actually, making entire gradle the same as library's doesn't help. Gradle wrapper is configured the same way as well

thomasnield commented 6 years ago

We are trying to get this up to Maven Central right now. I'm talking to JitPack folks to see what's going on with the dependency builder.

apete commented 6 years ago

Now you can stop using jitpack.

http://mvnrepository.com/artifact/org.ojalgo/okalgo

yatsinar commented 6 years ago

That's awesome! But issue still persists unfortunately. I highly suspect this particular line inside okAlgo/build.gradle is causing troubles:

compile 'org.jetbrains.kotlin:kotlin-stdlib'

I bet this should be replaced with:

compile 'org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version'

Similar issue described here: https://stackoverflow.com/questions/47105267/errorunable-to-resolve-version-for-dependency-org-jetbrains-kotlinkotlin-stdl

thomasnield commented 6 years ago

I've been having issues with this in Kotlin-statistics today. Ill resolve tomorrow.

thomasnield commented 6 years ago

@apete I made some changes to hopefully fix this dependency issue. Can you do a release for 0.0.2?

apete commented 6 years ago

I have released v0.0.2 (this morning) but still haven't seen it available.

thomasnield commented 6 years ago

I'll check on it later...

apete commented 6 years ago

It's available

http://mvnrepository.com/artifact/org.ojalgo/okalgo/0.0.2

thomasnield commented 6 years ago

Sweet!