Use type safe plugin accessors, collapse some nested DSLs, removed duplicate declarations

This commit is contained in:
Andrey Mischenko 2019-04-23 18:07:36 +08:00
parent f797d7b082
commit bae77b6979
No known key found for this signature in database
GPG Key ID: ACD082FD9E225C4A
8 changed files with 66 additions and 134 deletions

View File

@ -21,7 +21,7 @@ dependencies {
//jmh project(':kmath-core')
}
jmh{
jmh {
warmupIterations = 1
}

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"
}
}
}

View File

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

View File

@ -1,41 +1,22 @@
plugins {
id("multiplatform-config")
`multiplatform-config`
}
kotlin {
sourceSets {
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 {
dependencies {
api("org.jetbrains.kotlinx:kotlinx-coroutines-core:${Ver.coroutinesVersion}")
}
}
jvmTest {
dependencies {
implementation(kotlin("test"))
implementation(kotlin("test-junit"))
}
}
jsMain {
dependencies {
api("org.jetbrains.kotlinx:kotlinx-coroutines-core-js:${Ver.coroutinesVersion}")
}
}
jsTest {
dependencies {
implementation(kotlin("test-js"))
}
}
}
}

View File

@ -1,30 +1,10 @@
plugins {
id("multiplatform-config")
`multiplatform-config`
}
kotlin {
sourceSets {
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,33 +1,18 @@
plugins {
id("multiplatform-config")
`multiplatform-config`
}
repositories {
maven("http://dl.bintray.com/kyonifer/maven")
}
kotlin {
jvm {
compilations.all {
kotlinOptions {
freeCompilerArgs += "-progressive"
}
}
}
sourceSets {
kotlin.sourceSets {
commonMain {
dependencies {
api(project(":kmath-core"))
api("com.kyonifer:koma-core-api-common:0.12")
}
}
commonTest {
dependencies {
implementation(kotlin("test-common"))
implementation(kotlin("test-annotations-common"))
}
}
jvmMain {
dependencies {
api("com.kyonifer:koma-core-api-jvm:0.12")
@ -35,8 +20,6 @@ kotlin {
}
jvmTest {
dependencies {
implementation(kotlin("test"))
implementation(kotlin("test-junit"))
implementation("com.kyonifer:koma-core-ejml:0.12")
}
}
@ -45,10 +28,4 @@ kotlin {
api("com.kyonifer:koma-core-api-js:0.12")
}
}
jsTest {
dependencies {
implementation(kotlin("test-js"))
}
}
}
}

View File

@ -1,3 +1,3 @@
plugins {
id("multiplatform-config")
`multiplatform-config`
}

View File

@ -1,10 +1,9 @@
plugins {
id("multiplatform-config")
`multiplatform-config`
id("kotlinx-atomicfu") version Ver.atomicfuVersion
}
kotlin {
sourceSets {
kotlin.sourceSets {
commonMain {
dependencies {
api(project(":kmath-core"))
@ -23,7 +22,6 @@ kotlin {
}
}
}
}
atomicfu {