Merge dev into master #59

Merged
altavir merged 37 commits from dev into master 2019-05-31 12:35:58 +03:00
13 changed files with 116 additions and 229 deletions
Showing only changes of commit 56c23109b3 - Show all commits

View File

@ -1,27 +1,26 @@
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinMultiplatformPlugin
val kmathVersion by extra("0.1.2-dev-1")
allprojects {
// apply(plugin = "maven")
// apply(plugin = "maven-publish")
// apply(plugin = "com.jfrog.artifactory")
repositories {
jcenter()
maven("https://kotlin.bintray.com/kotlinx")
}
group = "scientifik"
version = kmathVersion
}
subprojects {
// Actually, probably we should apply it to plugins explicitly
// We also can merge them to single kmath-publish plugin
if (name.startsWith("kmath")) {
// apply bintray configuration
apply(plugin = "bintray-config")
//apply artifactory configuration
apply(plugin = "artifactory-config")
}
plugins.withType<KotlinMultiplatformPlugin> {
apply(plugin = "multiplatform-config")
// dokka {
// outputFormat = "html"
// outputDirectory = javadoc.destinationDir
@ -32,5 +31,3 @@ subprojects {
// classifier = "javadoc"
// }
}
}

View File

@ -4,7 +4,7 @@
object Ver {
val ioVersion = "0.1.5"
val coroutinesVersion = "1.1.1"
val atomicfuVersion = "0.12.1"
val atomicfuVersion = "0.12.4"
// This version is not used and IDEA shows this property as unused
val dokkaVersion = "0.9.17"
}

View File

@ -1,7 +1,6 @@
import com.moowork.gradle.node.NodeExtension
import com.moowork.gradle.node.npm.NpmTask
import com.moowork.gradle.node.task.NodeTask
import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension
import org.gradle.kotlin.dsl.*
import org.jetbrains.kotlin.gradle.tasks.Kotlin2JsCompile
plugins {
@ -9,26 +8,18 @@ plugins {
kotlin("multiplatform")
}
configure<NodeExtension> {
node {
nodeModulesDir = file("$buildDir/node_modules")
}
val compileKotlinJs by tasks.getting(Kotlin2JsCompile::class)
val compileTestKotlinJs by tasks.getting(Kotlin2JsCompile::class)
inline fun <reified T : Task> TaskContainer.registering(
crossinline action: T.() -> Unit
): RegisteringDomainObjectDelegateProviderWithTypeAndAction<TaskContainer, T> =
RegisteringDomainObjectDelegateProviderWithTypeAndAction.of(this, T::class, { action() })
configure<KotlinMultiplatformExtension> {
val populateNodeModules by tasks.registering(Copy::class) {
dependsOn(compileKotlinJs)
from(compileKotlinJs.destinationDir)
js().compilations["test"].runtimeDependencyFiles.forEach {
kotlin.js().compilations["test"].runtimeDependencyFiles.forEach {
if (it.exists() && !it.isDirectory) {
from(zipTree(it.absolutePath).matching { include("*.js") })
}
@ -37,7 +28,7 @@ configure<KotlinMultiplatformExtension> {
into("$buildDir/node_modules")
}
val installMocha by tasks.registering<NpmTask> {
val installMocha by tasks.registering(NpmTask::class) {
setWorkingDir(buildDir)
setArgs(listOf("install", "mocha"))
}
@ -49,5 +40,5 @@ configure<KotlinMultiplatformExtension> {
}
tasks["jsTest"].dependsOn(runMocha)
}

View File

@ -11,6 +11,8 @@ kotlin {
compilations.all {
kotlinOptions {
jvmTarget = "1.8"
// This was used in kmath-koma, but probably if we need it better to apply it for all modules
freeCompilerArgs += "-progressive"
}
}
}
@ -71,7 +73,7 @@ kotlin {
sourceSets.all {
languageSettings.progressiveMode = true
languageSettings.enableLanguageFeature("InlineClasses")
languageSettings.useExperimentalAnnotation("ExperimentalContracts")
//languageSettings.useExperimentalAnnotation("ExperimentalContracts")
//languageSettings.enableLanguageFeature("Contracts")
}
}
@ -116,4 +118,3 @@ kotlin {
}
}

View File

@ -1,23 +1,14 @@
plugins {
kotlin("multiplatform")
`multiplatform-config`
}
val ioVersion: String by rootProject.extra
kotlin {
jvm()
js()
sourceSets {
kotlin.sourceSets {
commonMain {
dependencies {
api(project(":kmath-memory"))
}
}
// mingwMain {
// }
// mingwTest {
// }
}
//mingwMain {}
//mingwTest {}
}

View File

@ -1,44 +1,22 @@
plugins {
kotlin("multiplatform")
`multiplatform-config`
}
kotlin {
jvm()
js()
sourceSets.invoke {
kotlin.sourceSets {
commonMain {
dependencies {
api(project(":kmath-core"))
api("org.jetbrains.kotlinx:kotlinx-coroutines-core-common:${Ver.coroutinesVersion}")
}
}
commonTest {
dependencies {
implementation(kotlin("test-common"))
implementation(kotlin("test-annotations-common"))
}
}
"jvmMain" {
jvmMain {
dependencies {
api("org.jetbrains.kotlinx:kotlinx-coroutines-core:${Ver.coroutinesVersion}")
}
}
"jvmTest" {
dependencies {
implementation(kotlin("test"))
implementation(kotlin("test-junit"))
}
}
"jsMain" {
jsMain {
dependencies {
api("org.jetbrains.kotlinx:kotlinx-coroutines-core-js:${Ver.coroutinesVersion}")
}
}
"jsTest" {
dependencies {
implementation(kotlin("test-js"))
}
}
}
}

View File

@ -1,33 +1,10 @@
plugins {
kotlin("multiplatform")
`multiplatform-config`
}
kotlin {
jvm()
js()
sourceSets.invoke {
commonMain {
// Just an example how we can collapse nested DSL for simple declarations
kotlin.sourceSets.commonMain {
dependencies {
api(project(":kmath-core"))
}
}
commonTest {
dependencies {
implementation(kotlin("test-common"))
implementation(kotlin("test-annotations-common"))
}
}
"jvmTest" {
dependencies {
implementation(kotlin("test"))
implementation(kotlin("test-junit"))
}
}
"jsTest" {
dependencies {
implementation(kotlin("test-js"))
}
}
}
}

View File

@ -1,57 +1,31 @@
plugins {
kotlin("multiplatform")
`multiplatform-config`
}
repositories {
maven("http://dl.bintray.com/kyonifer/maven")
}
kotlin {
jvm {
compilations.all {
kotlinOptions {
jvmTarget = "1.8"
freeCompilerArgs += "-progressive"
}
}
}
js()
sourceSets {
val commonMain by getting {
kotlin.sourceSets {
commonMain {
dependencies {
api(project(":kmath-core"))
api("com.kyonifer:koma-core-api-common:0.12")
}
}
val commonTest by getting {
dependencies {
implementation(kotlin("test-common"))
implementation(kotlin("test-annotations-common"))
}
}
val jvmMain by getting {
jvmMain {
dependencies {
api("com.kyonifer:koma-core-api-jvm:0.12")
}
}
val jvmTest by getting {
jvmTest {
dependencies {
implementation(kotlin("test"))
implementation(kotlin("test-junit"))
implementation("com.kyonifer:koma-core-ejml:0.12")
}
}
val jsMain by getting {
jsMain {
dependencies {
api("com.kyonifer:koma-core-api-js:0.12")
}
}
val jsTest by getting {
dependencies {
implementation(kotlin("test-js"))
}
}
}
}

View File

@ -1,16 +1,3 @@
plugins {
kotlin("multiplatform")
}
val ioVersion: String by rootProject.extra
kotlin {
jvm()
js()
// mingwMain {
// }
// mingwTest {
// }
`multiplatform-config`
}

View File

@ -1,35 +1,28 @@
plugins {
kotlin("multiplatform")
id("kotlinx-atomicfu")
`multiplatform-config`
id("kotlinx-atomicfu") version Ver.atomicfuVersion
}
val atomicfuVersion: String by rootProject.extra
kotlin {
jvm ()
js()
sourceSets {
val commonMain by getting {
kotlin.sourceSets {
commonMain {
dependencies {
api(project(":kmath-core"))
api(project(":kmath-coroutines"))
compileOnly("org.jetbrains.kotlinx:atomicfu-common:${Ver.atomicfuVersion}")
}
}
val jvmMain by getting {
jvmMain {
dependencies {
compileOnly("org.jetbrains.kotlinx:atomicfu:${Ver.atomicfuVersion}")
}
}
val jsMain by getting {
jsMain {
dependencies {
compileOnly("org.jetbrains.kotlinx:atomicfu-js:${Ver.atomicfuVersion}")
}
}
}
}
atomicfu {
variant = "VH"

View File

@ -1,9 +1,9 @@
plugins {
kotlin("multiplatform")
id("kotlinx-atomicfu")
id("kotlinx-atomicfu") version Ver.atomicfuVersion
}
val atomicfuVersion: String by rootProject.extra
kotlin {
jvm ()

View File

@ -8,9 +8,7 @@ pluginManagement {
eachPlugin {
when (requested.id.id) {
"kotlinx-atomicfu" -> {
// Just hardcode version here,
// because anyway different submodules cannot use different versions
useModule("org.jetbrains.kotlinx:atomicfu-gradle-plugin:0.12.1")
useModule("org.jetbrains.kotlinx:atomicfu-gradle-plugin:${requested.version}")
}
}
}