From 9da3b139db8813b9529106a3c5262fe1fd88ff22 Mon Sep 17 00:00:00 2001 From: Iaroslav Postovalov Date: Tue, 13 Oct 2020 22:00:01 +0700 Subject: [PATCH 1/6] Add space properties --- build.gradle.kts | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 05e2d5979..fa678ac42 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,17 +1,20 @@ +import ru.mipt.npm.gradle.KSciencePublishPlugin + plugins { id("ru.mipt.npm.project") + id("ru.mipt.npm.publish") apply false } -val kmathVersion: String by extra("0.2.0-dev-2") -val bintrayRepo: String by extra("kscience") -val githubProject: String by extra("kmath") +private val kmathVersion: String by extra("0.2.0-dev-2") +private val bintrayRepo: String by extra("kscience") +private val githubProject: String by extra("kmath") allprojects { repositories { jcenter() - maven("https://dl.bintray.com/kotlin/kotlin-eap") - maven("https://dl.bintray.com/kotlin/kotlinx") - maven("https://dl.bintray.com/hotkeytlt/maven") + maven(url = "https://dl.bintray.com/kotlin/kotlin-eap") + maven(url = "https://dl.bintray.com/kotlin/kotlinx") + maven(url = "https://dl.bintray.com/hotkeytlt/maven") } group = "kscience.kmath" @@ -19,7 +22,13 @@ allprojects { } subprojects { - if (name.startsWith("kmath")) apply() + if (name.startsWith("kmath")) apply() + + ksciencePublish { + spaceRepo = "https://maven.pkg.jetbrains.space/mipt-npm/p/sci/maven" + spaceUser = System.getenv("SPACE_USER") + spaceToken = System.getenv("SPACE_TOKEN") + } } readme { -- 2.34.1 From 75b1eb7d3195d32b8c2f738932803cb4a258285f Mon Sep 17 00:00:00 2001 From: Iaroslav Postovalov Date: Tue, 13 Oct 2020 22:14:40 +0700 Subject: [PATCH 2/6] Update .space.kts --- .space.kts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.space.kts b/.space.kts index 9dda0cbf7..a6ee29074 100644 --- a/.space.kts +++ b/.space.kts @@ -1 +1,6 @@ -job("Build") { gradlew("openjdk:11", "build") } +job("Build") { + gradlew("openjdk:11", "build") { + env["SPACE_USER"] = Secrets("space_user") + env["SPACE_TOKEN"] = Secrets("space_token") + } +} -- 2.34.1 From 0766ec628ca84d1318d900bcdf4d91ccc9698de2 Mon Sep 17 00:00:00 2001 From: Iaroslav Postovalov Date: Tue, 13 Oct 2020 22:16:10 +0700 Subject: [PATCH 3/6] Change task from build to publish --- .space.kts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.space.kts b/.space.kts index a6ee29074..b9c4c11d1 100644 --- a/.space.kts +++ b/.space.kts @@ -1,5 +1,5 @@ -job("Build") { - gradlew("openjdk:11", "build") { +job("Publish") { + gradlew("openjdk:11", "publish") { env["SPACE_USER"] = Secrets("space_user") env["SPACE_TOKEN"] = Secrets("space_token") } -- 2.34.1 From 157adaffb7e62f289c92cd3de1e12e98211c35ea Mon Sep 17 00:00:00 2001 From: Iaroslav Postovalov Date: Wed, 14 Oct 2020 23:26:55 +0700 Subject: [PATCH 4/6] Configure kscience plugin publication --- build.gradle.kts | 23 +++++++++++------------ examples/build.gradle.kts | 7 ++++--- gradle.properties | 7 +++---- settings.gradle.kts | 3 +-- 4 files changed, 19 insertions(+), 21 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index fa678ac42..ce42deffb 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -5,9 +5,9 @@ plugins { id("ru.mipt.npm.publish") apply false } -private val kmathVersion: String by extra("0.2.0-dev-2") -private val bintrayRepo: String by extra("kscience") -private val githubProject: String by extra("kmath") +internal val kmathVersion: String by extra("0.2.0-dev-2") +internal val bintrayRepo: String by extra("kscience") +internal val githubProject: String by extra("kmath") allprojects { repositories { @@ -22,15 +22,14 @@ allprojects { } subprojects { - if (name.startsWith("kmath")) apply() - - ksciencePublish { - spaceRepo = "https://maven.pkg.jetbrains.space/mipt-npm/p/sci/maven" - spaceUser = System.getenv("SPACE_USER") - spaceToken = System.getenv("SPACE_TOKEN") - } + if (!name.startsWith("kmath")) return@subprojects + apply() } -readme { - readmeTemplate = file("docs/templates/README-TEMPLATE.md") +ksciencePublish { + spaceRepo = "https://maven.pkg.jetbrains.space/mipt-npm/p/sci/maven" + spaceUser = System.getenv("SPACE_USER") + spaceToken = System.getenv("SPACE_TOKEN") } + +readme.readmeTemplate = file("docs/templates/README-TEMPLATE.md") diff --git a/examples/build.gradle.kts b/examples/build.gradle.kts index 900da966b..24c44aac4 100644 --- a/examples/build.gradle.kts +++ b/examples/build.gradle.kts @@ -10,10 +10,11 @@ plugins { allOpen.annotation("org.openjdk.jmh.annotations.State") repositories { - maven("https://dl.bintray.com/mipt-npm/kscience") + jcenter() + maven("https://dl.bintray.com/kotlin/kotlin-eap/") + maven("https://dl.bintray.com/kotlin/kotlinx") maven("https://dl.bintray.com/mipt-npm/dev") - maven("https://dl.bintray.com/kotlin/kotlin-dev/") - mavenCentral() + maven("https://dl.bintray.com/mipt-npm/kscience") } sourceSets.register("benchmarks") diff --git a/gradle.properties b/gradle.properties index 930bba550..88b90f27b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,9 +1,8 @@ kotlin.code.style=official -kotlin.parallel.tasks.in.project=true kotlin.mpp.enableGranularSourceSetsMetadata=true -kotlin.native.enableDependencyPropagation=false kotlin.mpp.stability.nowarn=true - +kotlin.native.enableDependencyPropagation=false +kotlin.parallel.tasks.in.project=true org.gradle.jvmargs=-XX:MaxMetaspaceSize=512m org.gradle.parallel=true -systemProp.org.gradle.internal.publish.checksums.insecure=true \ No newline at end of file +systemProp.org.gradle.internal.publish.checksums.insecure=true diff --git a/settings.gradle.kts b/settings.gradle.kts index 7ece3f25c..212ac5029 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -7,7 +7,6 @@ pluginManagement { maven("https://dl.bintray.com/mipt-npm/kscience") maven("https://dl.bintray.com/mipt-npm/dev") maven("https://dl.bintray.com/kotlin/kotlinx") - maven("https://dl.bintray.com/kotlin/kotlin-dev/") } val toolsVersion = "0.6.1-dev-1.4.20-M1" @@ -25,11 +24,11 @@ pluginManagement { } rootProject.name = "kmath" + include( ":kmath-memory", ":kmath-core", ":kmath-functions", -// ":kmath-io", ":kmath-coroutines", ":kmath-histograms", ":kmath-commons", -- 2.34.1 From 6fe344068b361e1051ab32fe052e32cb29ca054b Mon Sep 17 00:00:00 2001 From: Iaroslav Postovalov Date: Tue, 22 Dec 2020 21:05:24 +0700 Subject: [PATCH 5/6] Add branch filter --- .space.kts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.space.kts b/.space.kts index b9c4c11d1..db882f8ed 100644 --- a/.space.kts +++ b/.space.kts @@ -1,4 +1,12 @@ job("Publish") { + startOn { + gitPush { + branchFilter { + +"dev" + } + } + } + gradlew("openjdk:11", "publish") { env["SPACE_USER"] = Secrets("space_user") env["SPACE_TOKEN"] = Secrets("space_token") -- 2.34.1 From 6fe31e377b80bb0804e381012d971dbed0d03762 Mon Sep 17 00:00:00 2001 From: Iaroslav Postovalov Date: Tue, 22 Dec 2020 21:10:48 +0700 Subject: [PATCH 6/6] Add plain build task for each branch except dev --- .space.kts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.space.kts b/.space.kts index db882f8ed..abefd8d77 100644 --- a/.space.kts +++ b/.space.kts @@ -12,3 +12,15 @@ job("Publish") { env["SPACE_TOKEN"] = Secrets("space_token") } } + +job("Build"){ + startOn { + gitPush { + branchFilter { + -"dev" + } + } + } + + gradlew("openjdk:11", "build") +} -- 2.34.1