Fixing build for publish (not yet)

This commit is contained in:
Alexander Nozik 2019-05-09 19:42:39 +03:00
parent 577311ab7f
commit e239a77223
4 changed files with 25 additions and 12 deletions

View File

@ -12,7 +12,7 @@ val kotlinVersion = "1.3.31"
// Add plugins used in buildSrc as dependencies, also we should specify version only here // Add plugins used in buildSrc as dependencies, also we should specify version only here
dependencies { dependencies {
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion") 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("com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4")
implementation("org.jetbrains.dokka:dokka-gradle-plugin:0.9.18") implementation("org.jetbrains.dokka:dokka-gradle-plugin:0.9.18")
implementation("com.moowork.gradle:gradle-node-plugin:1.3.1") implementation("com.moowork.gradle:gradle-node-plugin:1.3.1")

View File

@ -21,11 +21,6 @@ artifactory {
defaults(delegateClosureOf<GroovyObject>{ defaults(delegateClosureOf<GroovyObject>{
invokeMethod("publications", arrayOf("jvm", "js", "kotlinMultiplatform", "metadata")) 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<ResolverConfig> { resolve(delegateClosureOf<ResolverConfig> {

View File

@ -67,9 +67,9 @@ bintray {
// this is a problem of this plugin // this is a problem of this plugin
pkg(delegateClosureOf<PackageConfig> { pkg(delegateClosureOf<PackageConfig> {
userOrg = "mipt-npm" userOrg = "mipt-npm"
repo = "scientifik" repo = "dataforge"
name = "scientifik.kmath" name = project.name
issueTrackerUrl = "https://github.com/mipt-npm/kmath/issues" issueTrackerUrl = "https://github.com/altavir/dataforge-core/issues"
setLicenses("Apache-2.0") setLicenses("Apache-2.0")
vcsUrl = vcs vcsUrl = vcs
version(delegateClosureOf<VersionConfig> { version(delegateClosureOf<VersionConfig> {
@ -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)
} }

View File

@ -2,6 +2,8 @@ package hep.dataforge.workspace
import hep.dataforge.data.first import hep.dataforge.data.first
import hep.dataforge.data.get import hep.dataforge.data.get
import hep.dataforge.meta.boolean
import hep.dataforge.meta.get
import org.junit.Test import org.junit.Test
import kotlin.test.assertEquals import kotlin.test.assertEquals
@ -19,6 +21,9 @@ class SimpleWorkspaceTest {
allData() allData()
} }
pipe<Int, Int> { data -> pipe<Int, Int> { data ->
if (meta["testFlag"].boolean == true) {
println("flag")
}
context.logger.info { "Starting square on $data" } context.logger.info { "Starting square on $data" }
data * data data * data
} }
@ -54,11 +59,11 @@ class SimpleWorkspaceTest {
} }
} }
task("delta"){ task("delta") {
model{ model {
dependsOn("average") dependsOn("average")
} }
join<Double,Double> {data-> join<Double, Double> { data ->
data["even"]!! - data["odd"]!! data["even"]!! - data["odd"]!!
} }
} }
@ -70,4 +75,10 @@ class SimpleWorkspaceTest {
val res = node.first() val res = node.first()
assertEquals(328350, res.get()) assertEquals(328350, res.get())
} }
@Test
fun testMetaPropagation() {
val node = workspace.run("sum"){"testFlag" to true}
val res = node.first().get()
}
} }