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,28 +5,16 @@ plugins {
description = "Context and provider definitions" description = "Context and provider definitions"
kscience { kscience {
jvm()
js()
native() native()
useCoroutines() useCoroutines()
} dependencies {
api(project(":dataforge-meta"))
kotlin { }
sourceSets { dependencies(jvmMain){
val commonMain by getting { api(kotlin("reflect"))
dependencies { api("org.slf4j:slf4j-api:1.7.30")
api(project(":dataforge-meta"))
}
}
jvmMain {
dependencies {
api(kotlin("reflect"))
api("org.slf4j:slf4j-api:1.7.30")
}
}
jsMain {
dependencies {
}
}
} }
} }

View File

@ -3,18 +3,13 @@ plugins {
} }
kscience{ kscience{
jvm()
js()
native() native()
useCoroutines() useCoroutines()
} dependencies {
api(project(":dataforge-meta"))
kotlin { api(kotlin("reflect"))
sourceSets {
commonMain{
dependencies {
api(project(":dataforge-meta"))
api(kotlin("reflect"))
}
}
} }
} }

View File

@ -7,22 +7,16 @@ 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()
} }
} dependencies {
api(project(":dataforge-context"))
//val ioVersion by rootProject.extra("0.2.0-npm-dev-11") api("io.ktor:ktor-io:${KScienceVersions.ktorVersion}")
kotlin {
sourceSets {
commonMain {
dependencies {
api(project(":dataforge-context"))
api("io.ktor:ktor-io:${KScienceVersions.ktorVersion}")
}
}
} }
} }

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{ implementation(kotlin("scripting-jvm-host"))
dependencies { implementation(kotlin("scripting-jvm"))
implementation(kotlin("scripting-jvm-host")) }
implementation(kotlin("scripting-jvm")) dependencies(jvmTest){
} implementation(spclibs.logback.classic)
}
jvmTest {
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()
} dependencies {
api(projects.dataforgeContext)
kotlin { api(projects.dataforgeData)
sourceSets { api(projects.dataforgeIo)
commonMain{ }
dependencies { dependencies(jvmTest){
api(project(":dataforge-context")) implementation(spclibs.logback.classic)
api(project(":dataforge-data"))
api(project(":dataforge-io"))
}
}
jvmTest{
dependencies{
implementation("ch.qos.logback:logback-classic:1.4.1")
}
}
} }
} }

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