question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Gradle is unable to resolve KVision 3 packages

See original GitHub issue

Good morning.

After the shutdown of Bintray, we are experiencing problems while configuring our gradle builds which use KVision 3. They were working until May 1st, but I suppose that after the shutdown of Bintray and JCenter, repositories were migrated somewhere and they are no longer hosted on those platforms.

Here below you can find our build.gradle which declare all the dependencies.

`version ‘1.15.0’

buildscript { repositories { mavenCentral() maven { url “https://plugins.gradle.org/m2/” } } dependencies { classpath “jp.classmethod.aws:gradle-aws-plugin:0.40” } }

apply plugin: ‘kotlin-platform-js’ if (production) { apply plugin: ‘kotlin-dce-js’ }

apply plugin: ‘org.jetbrains.kotlin.frontend’ apply plugin: ‘kotlinx-serialization’ apply plugin: ‘jp.classmethod.aws.s3’

aws { profileName = ‘default’ }

dependencies { expectedBy project(‘:common’)

compile "org.jetbrains.kotlin:kotlin-stdlib-js:${kotlinVersion}"
compile "pl.treksoft:kvision:${kvisionVersion}"
compile "pl.treksoft:kvision-bootstrap:${kvisionVersion}"

// compile “pl.treksoft:kvision-bootstrap-css:${kvisionVersion}” compile “pl.treksoft:kvision-bootstrap-select:${kvisionVersion}” compile “pl.treksoft:kvision-bootstrap-datetime:${kvisionVersion}” compile “pl.treksoft:kvision-bootstrap-spinner:${kvisionVersion}” compile “pl.treksoft:kvision-fontawesome:${kvisionVersion}” compile “pl.treksoft:kvision-bootstrap-dialog:${kvisionVersion}” compile “pl.treksoft:kvision-remote:${kvisionVersion}” compile “pl.treksoft:kvision-bootstrap-upload:${kvisionVersion}”

compile "pl.treksoft:kvision-datacontainer:${kvisionVersion}"

kotlinFrontend {
    npm {
        devDependency("webpack", "4.44.1")
        devDependency("webpack-cli", "3.3.12")
        devDependency("karma", "5.1.1")
        devDependency("karma-junit-reporter", "2.0.1")
        devDependency("karma-sourcemap-loader", "0.3.7")
        devDependency("karma-phantomjs-launcher", "1.0.4")
        devDependency("phantomjs-prebuilt", "2.1.16")
        devDependency("karma-webpack", "4.0.2")
    }
}

}

ext { webpackBundleName = production ? “main-” + new Date().format(‘yyyyMMddHHmmssSSS’) : “main” environmentAvailables = [“PRO”, “PRE”, “DEVELOP”] }

kotlinFrontend {

webpackBundle {
    bundleName = webpackBundleName
    contentPath = file('src/main/resources')
    proxyUrl = "http://localhost:8080"
    mode = production ? "production" : "development"
}

define "PRODUCTION", production

}

compileKotlin2Js { kotlinOptions.metaInfo = true kotlinOptions.outputFile = “$project.buildDir.path/js/${project.name}.js” kotlinOptions.sourceMap = !production kotlinOptions.moduleKind = ‘umd’ }

compileTestKotlin2Js { kotlinOptions.metaInfo = true kotlinOptions.outputFile = “$project.buildDir.path/js-tests/${project.name}-tests.js” kotlinOptions.sourceMap = !production kotlinOptions.moduleKind = ‘umd’ }

task copyResources(type: Copy) { from “src/main/resources” into file(buildDir.path + “/bundle”) filter { line -> line.replace(‘main.bundle.js’, webpackBundleName.toString() + “.bundle.js”) } filter { line -> line.replace(‘[version]’, version.toString())} }

task copyResourcesForDce { doLast { copy { from “src/main/resources” ext.modulesDir = new File(“${buildDir.path}/node_modules_imported/”) if (modulesDir.exists()) { modulesDir.eachDir { if (it.name.startsWith(“kvision”)) { from(it) { include “css/" include "img/” include “js/**” } } } } into file(buildDir.path + “/kotlin-js-min/main”) } } }

task dist(type: Copy, dependsOn: ‘webpack-bundle’) { from “${buildDir.path}/bundle” into file(buildDir.path + “/distributions/” + project.name) }

task distZip(type: Zip, dependsOn: ‘dist’) { from (buildDir.path + “/distributions/” + project.name) }

afterEvaluate { if (production) { tasks.getByName(“copyResourcesForDce”) { dependsOn(runDceKotlinJs) } } tasks.getByName(“webpack-bundle”) { dependsOn(copyResources, copyResourcesForDce) } tasks.getByName(“webpack-run”) { dependsOn(copyResources) } tasks.getByName(“karma-start”) { dependsOn(copyResources) } } `

Please, can you help out?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
rjaroscommented, May 6, 2021

I would take a new clean template project and copy all Kotlin sources into it. Than make all the changes described in the migration guide. After you will manage to compile the project make final adjustments to your buildfile (like adding additional plugins). If you have any problems let me know and I’ll try to help.

1reaction
rmartineztcommented, May 7, 2021

We have succesfully migrated our projects to KVision 4.4.0, so I’m closing this issue.

Thank you for your help again 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

build.gradle: How to solve "Unable to resolve dependency for ...
I am getting this gradle error when i build my app: Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve ...
Read more >
Troubleshooting builds - Gradle User Manual
If gradle --version works, but all of your builds fail with the same error, it is possible there is a problem with one...
Read more >
Understanding dependency resolution - Gradle User Manual
Dependency resolution will fail if the required artifacts are not available in any repository specified by the build, even if the local cache...
Read more >
Customizing resolution of a dependency directly
Module replacement is an information that Gradle uses for resolving conflicts. If there is no conflict (e.g. only google-collections or only guava in...
Read more >
Learning the Basics - Gradle User Manual
Dependency management is a technique for declaring, resolving and using dependencies ... on GitHub a 404 is returned) causing dependency resolution to fail....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found