Gradle is unable to resolve KVision 3 packages
See original GitHub issueGood 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:
- Created 2 years ago
- Comments:7 (3 by maintainers)
Top GitHub Comments
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.
We have succesfully migrated our projects to KVision 4.4.0, so I’m closing this issue.
Thank you for your help again 😃