From 3353d4704f5f7d6082033421860d811af905d671 Mon Sep 17 00:00:00 2001 From: Alexander Nozik Date: Fri, 4 Oct 2019 19:42:19 +0300 Subject: [PATCH] Fixed build issues --- build.gradle.kts | 15 ++-- dataforge-vis-fx/build.gradle.kts | 2 +- dataforge-vis-spatial-gdml/build.gradle.kts | 4 +- .../kotlin/hep/dataforge/vis/spatial/Proxy.kt | 2 +- gradle/artifactory.gradle | 31 ------- gradle/bintray.gradle | 85 ------------------- spatial-js-demo/build.gradle.kts | 1 - 7 files changed, 9 insertions(+), 131 deletions(-) delete mode 100644 gradle/artifactory.gradle delete mode 100644 gradle/bintray.gradle diff --git a/build.gradle.kts b/build.gradle.kts index c66e5e2e..0dae2b76 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -2,25 +2,20 @@ val dataforgeVersion by extra("0.1.3") plugins{ val kotlinVersion = "1.3.50" + val toolsVersion = "0.2.0" kotlin("jvm") version kotlinVersion apply false id("kotlin-dce-js") version kotlinVersion apply false - id("scientifik.mpp") version "0.1.7" apply false - id("scientifik.jvm") version "0.1.7" apply false - id("scientifik.js") version "0.1.7" apply false - id("scientifik.publish") version "0.1.7" apply false + id("scientifik.mpp") version toolsVersion apply false + id("scientifik.jvm") version toolsVersion apply false + id("scientifik.js") version toolsVersion apply false + id("scientifik.publish") version toolsVersion apply false id("org.openjfx.javafxplugin") version "0.0.8" apply false } allprojects { repositories { - mavenLocal() - jcenter() - maven("https://kotlin.bintray.com/kotlinx") - maven("https://kotlin.bintray.com/js-externals") - maven("https://kotlin.bintray.com/kotlin-js-wrappers") maven("https://dl.bintray.com/pdvrieze/maven") - maven("https://dl.bintray.com/kotlin/kotlin-eap") } group = "hep.dataforge" diff --git a/dataforge-vis-fx/build.gradle.kts b/dataforge-vis-fx/build.gradle.kts index ffb923c1..6408a4ab 100644 --- a/dataforge-vis-fx/build.gradle.kts +++ b/dataforge-vis-fx/build.gradle.kts @@ -2,7 +2,7 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile import org.openjfx.gradle.JavaFXOptions plugins { - kotlin("jvm") + id("scientifik.jvm") id("org.openjfx.javafxplugin") } diff --git a/dataforge-vis-spatial-gdml/build.gradle.kts b/dataforge-vis-spatial-gdml/build.gradle.kts index 7ddafa50..af7f99ad 100644 --- a/dataforge-vis-spatial-gdml/build.gradle.kts +++ b/dataforge-vis-spatial-gdml/build.gradle.kts @@ -11,13 +11,13 @@ kotlin { val commonMain by getting { dependencies { api(project(":dataforge-vis-spatial")) - api("scientifik:gdml:0.1.4-dev-3") + api("scientifik:gdml:0.1.4") } } val jsMain by getting { dependencies { api(project(":dataforge-vis-spatial")) - api("kotlin.js.externals:kotlin-js-jquery:3.2.0-0") + //api("kotlin.js.externals:kotlin-js-jquery:3.2.0-0") } } } diff --git a/dataforge-vis-spatial/src/commonMain/kotlin/hep/dataforge/vis/spatial/Proxy.kt b/dataforge-vis-spatial/src/commonMain/kotlin/hep/dataforge/vis/spatial/Proxy.kt index 60b3b7fb..ef284f22 100644 --- a/dataforge-vis-spatial/src/commonMain/kotlin/hep/dataforge/vis/spatial/Proxy.kt +++ b/dataforge-vis-spatial/src/commonMain/kotlin/hep/dataforge/vis/spatial/Proxy.kt @@ -112,8 +112,8 @@ class Proxy(val templateName: Name) : AbstractVisualObject(), VisualGroup, Visua override fun getProperty(name: Name, inherit: Boolean): MetaItem<*>? { return if (inherit) { properties?.get(name) - ?: parent?.getProperty(name, inherit) ?: actualStyles[name] + ?: parent?.getProperty(name, inherit) ?: prototype.getProperty(name, inherit) } else { properties?.get(name) diff --git a/gradle/artifactory.gradle b/gradle/artifactory.gradle deleted file mode 100644 index 12e59642..00000000 --- a/gradle/artifactory.gradle +++ /dev/null @@ -1,31 +0,0 @@ -apply plugin: "com.jfrog.artifactory" - -artifactory { - def artifactory_user = project.hasProperty('artifactoryUser') ? project.property('artifactoryUser') : "" - def artifactory_password = project.hasProperty('artifactoryPassword') ? project.property('artifactoryPassword') : "" - def artifactory_contextUrl = 'http://npm.mipt.ru:8081/artifactory' - - contextUrl = artifactory_contextUrl //The base Artifactory URL if not overridden by the publisher/resolver - publish { - repository { - repoKey = 'gradle-dev-local' - username = artifactory_user - password = artifactory_password - } - - defaults { - publications('jvm', 'js', 'kotlinMultiplatform', 'metadata') - publishBuildInfo = false - publishArtifacts = true - publishPom = true - publishIvy = false - } - } - resolve { - repository { - repoKey = 'gradle-dev' - username = artifactory_user - password = artifactory_password - } - } -} \ No newline at end of file diff --git a/gradle/bintray.gradle b/gradle/bintray.gradle deleted file mode 100644 index 8da83c86..00000000 --- a/gradle/bintray.gradle +++ /dev/null @@ -1,85 +0,0 @@ -apply plugin: 'com.jfrog.bintray' - -def vcs = "https://github.com/mipt-npm/kmath" - -def pomConfig = { - licenses { - license { - name "The Apache Software License, Version 2.0" - url "http://www.apache.org/licenses/LICENSE-2.0.txt" - distribution "repo" - } - } - developers { - developer { - id "MIPT-NPM" - name "MIPT nuclear physics methods laboratory" - organization "MIPT" - organizationUrl "http://npm.mipt.ru" - } - } - scm { - url vcs - } -} - -project.ext.configureMavenCentralMetadata = { pom -> - def root = asNode() - root.appendNode('name', project.name) - root.appendNode('description', project.description) - root.appendNode('url', vcs) - root.children().last() + pomConfig -} - -project.ext.configurePom = pomConfig - - -// Configure publishing -publishing { - repositories { - maven { - url = "https://bintray.com/mipt-npm/scientifik" - } - } - - // Process each publication we have in this project - publications.all { publication -> - // apply changes to pom.xml files, see pom.gradle - pom.withXml(configureMavenCentralMetadata) - - - } -} - -bintray { - user = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : System.getenv('BINTRAY_USER') - key = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') : System.getenv('BINTRAY_API_KEY') - publish = true - override = true // for multi-platform Kotlin/Native publishing - - pkg { - userOrg = "mipt-npm" - repo = "scientifik" - name = "scientifik.kmath" - issueTrackerUrl = "https://github.com/mipt-npm/kmath/issues" - licenses = ['Apache-2.0'] - vcsUrl = vcs - version { - name = project.version - vcsTag = project.version - released = new Date() - } - } -} - -bintrayUpload.dependsOn publishToMavenLocal - -// This is for easier debugging of bintray uploading problems -bintrayUpload.doFirst { - publications = project.publishing.publications.findAll { - !it.name.contains('-test') && it.name != 'kotlinMultiplatform' - }.collect { - println("Uploading artifact '$it.groupId:$it.artifactId:$it.version' from publication '$it.name'") - it.name//https://github.com/bintray/gradle-bintray-plugin/issues/256 - } -} \ No newline at end of file diff --git a/spatial-js-demo/build.gradle.kts b/spatial-js-demo/build.gradle.kts index d44b204e..e33af149 100644 --- a/spatial-js-demo/build.gradle.kts +++ b/spatial-js-demo/build.gradle.kts @@ -5,7 +5,6 @@ plugins { dependencies { api(project(":dataforge-vis-spatial")) - api("info.laht.threekt:threejs-wrapper:0.106-npm-3") testCompile(kotlin("test-js")) }