From e239a77223382d1290b2fd7c301a4b304da3eff3 Mon Sep 17 00:00:00 2001 From: Alexander Nozik Date: Thu, 9 May 2019 19:42:39 +0300 Subject: [PATCH] Fixing build for publish (not yet) --- buildSrc/build.gradle.kts | 2 +- .../src/main/kotlin/npm-artifactory.gradle.kts | 5 ----- buildSrc/src/main/kotlin/npm-bintray.gradle.kts | 13 ++++++++++--- .../dataforge/workspace/SimpleWorkspaceTest.kt | 17 ++++++++++++++--- 4 files changed, 25 insertions(+), 12 deletions(-) diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index 1ebbdf4d..31818916 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -12,7 +12,7 @@ val kotlinVersion = "1.3.31" // Add plugins used in buildSrc as dependencies, also we should specify version only here dependencies { implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion") - implementation("org.jfrog.buildinfo:build-info-extractor-gradle:4.9.5") + implementation("org.jfrog.buildinfo:build-info-extractor-gradle:4.9.6") implementation("com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4") implementation("org.jetbrains.dokka:dokka-gradle-plugin:0.9.18") implementation("com.moowork.gradle:gradle-node-plugin:1.3.1") diff --git a/buildSrc/src/main/kotlin/npm-artifactory.gradle.kts b/buildSrc/src/main/kotlin/npm-artifactory.gradle.kts index d792dffb..27e5ebce 100644 --- a/buildSrc/src/main/kotlin/npm-artifactory.gradle.kts +++ b/buildSrc/src/main/kotlin/npm-artifactory.gradle.kts @@ -21,11 +21,6 @@ artifactory { defaults(delegateClosureOf{ invokeMethod("publications", arrayOf("jvm", "js", "kotlinMultiplatform", "metadata")) - //TODO: This property is not available for ArtifactoryTask - //setProperty("publishBuildInfo", false) - setProperty("publishArtifacts", true) - setProperty("publishPom", true) - setProperty("publishIvy", false) }) }) resolve(delegateClosureOf { diff --git a/buildSrc/src/main/kotlin/npm-bintray.gradle.kts b/buildSrc/src/main/kotlin/npm-bintray.gradle.kts index b152d163..a8987279 100644 --- a/buildSrc/src/main/kotlin/npm-bintray.gradle.kts +++ b/buildSrc/src/main/kotlin/npm-bintray.gradle.kts @@ -67,9 +67,9 @@ bintray { // this is a problem of this plugin pkg(delegateClosureOf { userOrg = "mipt-npm" - repo = "scientifik" - name = "scientifik.kmath" - issueTrackerUrl = "https://github.com/mipt-npm/kmath/issues" + repo = "dataforge" + name = project.name + issueTrackerUrl = "https://github.com/altavir/dataforge-core/issues" setLicenses("Apache-2.0") vcsUrl = vcs version(delegateClosureOf { @@ -94,4 +94,11 @@ bintray { } } + + val publications = project.publishing.publications.filter { !it.name.contains("-test") }.map { + println("Uploading artifact '$it.groupId:$it.artifactId:$it.version' from publication '$it.name'") + it.name.toString() + }.toTypedArray() + + setPublications(*publications) } diff --git a/dataforge-workspace/src/jvmTest/kotlin/hep/dataforge/workspace/SimpleWorkspaceTest.kt b/dataforge-workspace/src/jvmTest/kotlin/hep/dataforge/workspace/SimpleWorkspaceTest.kt index 52ba85b5..82bb2eb7 100644 --- a/dataforge-workspace/src/jvmTest/kotlin/hep/dataforge/workspace/SimpleWorkspaceTest.kt +++ b/dataforge-workspace/src/jvmTest/kotlin/hep/dataforge/workspace/SimpleWorkspaceTest.kt @@ -2,6 +2,8 @@ package hep.dataforge.workspace import hep.dataforge.data.first import hep.dataforge.data.get +import hep.dataforge.meta.boolean +import hep.dataforge.meta.get import org.junit.Test import kotlin.test.assertEquals @@ -19,6 +21,9 @@ class SimpleWorkspaceTest { allData() } pipe { data -> + if (meta["testFlag"].boolean == true) { + println("flag") + } context.logger.info { "Starting square on $data" } data * data } @@ -54,11 +59,11 @@ class SimpleWorkspaceTest { } } - task("delta"){ - model{ + task("delta") { + model { dependsOn("average") } - join {data-> + join { data -> data["even"]!! - data["odd"]!! } } @@ -70,4 +75,10 @@ class SimpleWorkspaceTest { val res = node.first() assertEquals(328350, res.get()) } + + @Test + fun testMetaPropagation() { + val node = workspace.run("sum"){"testFlag" to true} + val res = node.first().get() + } } \ No newline at end of file