This commit is contained in:
Alexander Nozik 2021-06-19 14:09:57 +03:00
parent 000bc1e986
commit 35e01abf93
6 changed files with 29 additions and 30 deletions

View File

@ -7,14 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
### Added
- Lazy readme properties
- BOM for kotlin-wrappers on JS
- Jupyter loader
### Changed
- API validation disabled for dev versions
- Kotlin plugins are propagated downstream
### Deprecated
- bson support
### Removed
- bson support
### Fixed

View File

@ -8,7 +8,7 @@ plugins {
}
group = "ru.mipt.npm"
version = "0.9.10"
version = "0.10.0"
description = "Build tools for DataForge and kscience projects"
@ -25,17 +25,17 @@ repositories {
val kotlinVersion = "1.5.10"
java {
targetCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_11
}
// Add plugins used in buildSrc as dependencies, also we should specify version only here
dependencies {
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
api("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
implementation("org.jetbrains.kotlin:kotlin-jupyter-api-gradle-plugin:0.10.0-53")
implementation("org.jetbrains.kotlin:kotlin-serialization:$kotlinVersion")
implementation("org.jetbrains.kotlinx:atomicfu-gradle-plugin:0.16.1")
implementation("org.jetbrains.dokka:dokka-gradle-plugin:1.4.32")
implementation("org.jetbrains.intellij.plugins:gradle-changelog-plugin:1.1.2")
implementation("org.jetbrains.kotlinx:binary-compatibility-validator:0.5.0")
implementation("org.jetbrains.kotlinx:binary-compatibility-validator:0.6.0")
}
project.extensions.findByType<GradlePluginDevelopmentExtension>()?.apply {

View File

@ -72,6 +72,9 @@ open class KScienceCommonPlugin : Plugin<Project> {
sourceSets["main"].apply {
languageSettings.applySettings()
dependencies {
api(project.dependencies.platform("org.jetbrains.kotlin-wrappers:kotlin-wrappers-bom:${KScienceVersions.jsBom}"))
}
}
sourceSets["test"].apply {
@ -110,7 +113,11 @@ open class KScienceCommonPlugin : Plugin<Project> {
}
sourceSets.invoke {
val commonMain by getting
val commonMain by getting {
dependencies {
api(project.dependencies.platform("org.jetbrains.kotlin-wrappers:kotlin-wrappers-bom:${KScienceVersions.jsBom}"))
}
}
val commonTest by getting {
dependencies {
implementation(kotlin("test-common"))

View File

@ -2,8 +2,6 @@ package ru.mipt.npm.gradle
import org.gradle.api.Project
import org.gradle.api.plugins.ApplicationPlugin
import org.gradle.api.publish.maven.plugins.MavenPublishPlugin
import org.gradle.kotlin.dsl.apply
import org.gradle.kotlin.dsl.findByType
import org.jetbrains.kotlin.gradle.dsl.KotlinJsProjectExtension
import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension
@ -133,6 +131,13 @@ class KScienceExtension(val project: Project) {
)
}
/**
* Apply jupyter plugin
*/
fun useJupyter() {
project.plugins.apply("org.jetbrains.kotlin.jupyter.api")
}
/**
* Mark this module as an application module. JVM application should be enabled separately
*/
@ -160,11 +165,6 @@ class KScienceExtension(val project: Project) {
}
}
}
@Deprecated("Replace by applying maven-publish plugin")
fun publish() {
project.plugins.apply(MavenPublishPlugin::class)
}
}
internal fun Project.registerKScienceExtension() {

View File

@ -6,7 +6,7 @@ import org.gradle.api.JavaVersion
* Build constants
*/
object KScienceVersions {
const val kotlinVersion = "1.5.0"
const val kotlinVersion = "1.5.10"
const val kotlinxNodeVersion = "0.0.7"
const val coroutinesVersion = "1.5.0"
const val serializationVersion = "1.2.1"
@ -14,12 +14,12 @@ object KScienceVersions {
const val ktorVersion = "1.6.0"
const val htmlVersion = "0.7.3"
const val dateTimeVersion = "0.2.1"
const val jsBom = "0.0.1-pre.213-kotlin-1.5.10"
val JVM_TARGET = JavaVersion.VERSION_11
object Serialization{
const val xmlVersion = "0.82.0"
const val bsonVersion = "0.4.4"
const val yamlKtVersion = "0.9.0"
}
}

View File

@ -2,7 +2,6 @@ package ru.mipt.npm.gradle
import org.gradle.api.Project
import ru.mipt.npm.gradle.internal.useCommonDependency
import ru.mipt.npm.gradle.internal.useDependency
class SerializationTargets(
val sourceSet: DependencySourceSet,
@ -58,15 +57,4 @@ class SerializationTargets(
dependencyConfiguration = configuration
)
}
@Deprecated("To be removed")
fun Project.bson(
version: String = KScienceVersions.Serialization.bsonVersion
) {
useDependency(
"jvm" to "com.github.jershell:kbson:$version",
dependencySourceSet = sourceSet,
dependencyConfiguration = configuration
)
}
}