Move to gradle plugin 0.14

This commit is contained in:
Alexander Nozik 2023-02-18 19:49:41 +03:00
parent 5d7ddb4e00
commit 7d88f828d7
12 changed files with 61 additions and 95 deletions

View File

@ -9,7 +9,7 @@ plugins {
allprojects { allprojects {
group = "space.kscience" group = "space.kscience"
version = "0.6.1-dev-1" version = "0.6.1-dev-2"
} }
subprojects { subprojects {

View File

@ -5,30 +5,18 @@ plugins {
description = "Context and provider definitions" description = "Context and provider definitions"
kscience { kscience {
jvm()
js()
native() native()
useCoroutines() useCoroutines()
}
kotlin {
sourceSets {
val commonMain by getting {
dependencies { dependencies {
api(project(":dataforge-meta")) api(project(":dataforge-meta"))
} }
} dependencies(jvmMain){
jvmMain {
dependencies {
api(kotlin("reflect")) api(kotlin("reflect"))
api("org.slf4j:slf4j-api:1.7.30") api("org.slf4j:slf4j-api:1.7.30")
} }
} }
jsMain {
dependencies {
}
}
}
}
readme { readme {
maturity = space.kscience.gradle.Maturity.DEVELOPMENT maturity = space.kscience.gradle.Maturity.DEVELOPMENT

View File

@ -3,20 +3,15 @@ plugins {
} }
kscience{ kscience{
jvm()
js()
native() native()
useCoroutines() useCoroutines()
}
kotlin {
sourceSets {
commonMain{
dependencies { dependencies {
api(project(":dataforge-meta")) api(project(":dataforge-meta"))
api(kotlin("reflect")) api(kotlin("reflect"))
} }
} }
}
}
readme{ readme{
maturity = space.kscience.gradle.Maturity.EXPERIMENTAL maturity = space.kscience.gradle.Maturity.EXPERIMENTAL

View File

@ -7,24 +7,18 @@ plugins {
description = "IO module" description = "IO module"
kscience { kscience {
jvm()
js()
native() native()
useSerialization(sourceSet = space.kscience.gradle.DependencySourceSet.TEST) { useSerialization("1.4.1")
useSerialization("1.4.1", sourceSet = space.kscience.gradle.DependencySourceSet.TEST) {
cbor() cbor()
} }
}
//val ioVersion by rootProject.extra("0.2.0-npm-dev-11")
kotlin {
sourceSets {
commonMain {
dependencies { dependencies {
api(project(":dataforge-context")) api(project(":dataforge-context"))
api("io.ktor:ktor-io:${KScienceVersions.ktorVersion}") api("io.ktor:ktor-io:${KScienceVersions.ktorVersion}")
} }
} }
}
}
readme{ readme{
maturity = space.kscience.gradle.Maturity.PROTOTYPE maturity = space.kscience.gradle.Maturity.PROTOTYPE

View File

@ -4,9 +4,18 @@ plugins {
description = "YAML meta IO" description = "YAML meta IO"
repositories {
mavenCentral()
}
kscience { kscience {
jvm()
js()
native() native()
useSerialization{ dependencies {
api(projects.dataforgeIo)
}
useSerialization("1.4.1"){
yamlKt() yamlKt()
} }
} }
@ -15,16 +24,6 @@ repositories{
maven("https://dl.bintray.com/mamoe/yamlkt") maven("https://dl.bintray.com/mamoe/yamlkt")
} }
kotlin {
sourceSets {
commonMain{
dependencies {
api(project(":dataforge-io"))
}
}
}
}
readme{ readme{
maturity = space.kscience.gradle.Maturity.PROTOTYPE maturity = space.kscience.gradle.Maturity.PROTOTYPE
description =""" description ="""

View File

@ -3,8 +3,10 @@ plugins {
} }
kscience { kscience {
jvm()
js()
native() native()
useSerialization{ useSerialization("1.4.1"){
json() json()
} }
} }

View File

@ -2,28 +2,23 @@ plugins {
id("space.kscience.gradle.mpp") id("space.kscience.gradle.mpp")
} }
kotlin { kscience{
sourceSets { jvm()
commonMain { js()
dependencies { dependencies {
api(project(":dataforge-workspace")) api(projects.dataforgeWorkspace)
implementation(kotlin("scripting-common")) implementation(kotlin("scripting-common"))
} }
} dependencies(jvmMain){
jvmMain{
dependencies {
implementation(kotlin("scripting-jvm-host")) implementation(kotlin("scripting-jvm-host"))
implementation(kotlin("scripting-jvm")) implementation(kotlin("scripting-jvm"))
} }
} dependencies(jvmTest){
jvmTest { implementation(spclibs.logback.classic)
dependencies {
implementation("ch.qos.logback:logback-classic:1.2.3")
}
}
} }
} }
readme{ readme{
maturity = space.kscience.gradle.Maturity.PROTOTYPE maturity = space.kscience.gradle.Maturity.PROTOTYPE
} }

View File

@ -3,24 +3,17 @@ plugins {
} }
kscience{ kscience{
jvm()
js()
native() native()
useCoroutines() useCoroutines()
}
kotlin {
sourceSets {
commonMain{
dependencies { dependencies {
api(project(":dataforge-context")) api(projects.dataforgeContext)
api(project(":dataforge-data")) api(projects.dataforgeData)
api(project(":dataforge-io")) api(projects.dataforgeIo)
}
}
jvmTest{
dependencies{
implementation("ch.qos.logback:logback-classic:1.4.1")
}
} }
dependencies(jvmTest){
implementation(spclibs.logback.classic)
} }
} }

View File

@ -82,7 +82,7 @@ public fun <T : Any> IOPlugin.readDataFile(
context(IOPlugin) @DFExperimental context(IOPlugin) @DFExperimental
private fun <T : Any> DataSetBuilder<T>.directory(path: Path, formatResolver: FileFormatResolver<T>) { private fun <T : Any> DataSetBuilder<T>.directory(path: Path, formatResolver: FileFormatResolver<T>) {
Files.list(path).toList().forEach { childPath -> Files.list(path).forEach { childPath ->
val fileName = childPath.fileName.toString() val fileName = childPath.fileName.toString()
if (fileName.startsWith(IOPlugin.META_FILE_NAME)) { if (fileName.startsWith(IOPlugin.META_FILE_NAME)) {
meta(readMetaFile(childPath)) meta(readMetaFile(childPath))

View File

@ -6,4 +6,4 @@ kotlin.mpp.stability.nowarn=true
kotlin.incremental.js.ir=true kotlin.incremental.js.ir=true
kotlin.native.ignoreDisabledTargets=true kotlin.native.ignoreDisabledTargets=true
toolsVersion=0.13.3-kotlin-1.7.20 toolsVersion=0.14.2-kotlin-1.8.10

View File

@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists

View File

@ -33,7 +33,7 @@ dependencyResolutionManagement {
} }
versionCatalogs { versionCatalogs {
create("npmlibs") { create("spclibs") {
from("space.kscience:version-catalog:$toolsVersion") from("space.kscience:version-catalog:$toolsVersion")
} }
} }