Update versions and add Base Plugin

This commit is contained in:
Alexander Nozik 2020-09-10 11:38:57 +03:00
parent 57ca6e57af
commit f5cdad2093
6 changed files with 23 additions and 9 deletions

View File

@ -16,7 +16,7 @@ repositories {
maven("https://dl.bintray.com/kotlin/kotlin-dev")
}
val kotlinVersion = "1.4.0"
val kotlinVersion = "1.4.10"
java {
targetCompatibility = JavaVersion.VERSION_1_8
@ -33,6 +33,11 @@ dependencies {
gradlePlugin {
plugins {
create("kscience.base"){
id = "ru.mipt.npm.bas"
description = "The basic plugin that does not do anything but loading classpath, versions and extensions"
implementationClass = "ru.mipt.npm.gradle.KScienceBasePlugin"
}
create("kscience.publish") {
id = "ru.mipt.npm.publish"
description = "The publication plugin for bintray and github"

View File

@ -0,0 +1,13 @@
package ru.mipt.npm.gradle
import org.gradle.api.Plugin
import org.gradle.api.Project
/**
* Apply extension and repositories
*/
open class KScienceBasePlugin : Plugin<Project> {
override fun apply(target: Project): Unit = target.run{
registerKScienceExtension()
}
}

View File

@ -12,7 +12,7 @@ import org.jetbrains.kotlin.gradle.dsl.KotlinJsProjectExtension
open class KScienceJSPlugin : Plugin<Project> {
override fun apply(project: Project): Unit = project.run {
plugins.apply("org.jetbrains.kotlin.js")
extensions.add("kscience", KScienceExtension(this))
registerKScienceExtension()
repositories.applyRepos()

View File

@ -9,10 +9,8 @@ import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension
open class KScienceMPPlugin : Plugin<Project> {
override fun apply(project: Project): Unit = project.run {
plugins.apply("org.jetbrains.kotlin.multiplatform")
extensions.add("kscience", KScienceExtension(this))
registerKScienceExtension()
repositories.applyRepos()
configure<KotlinMultiplatformExtension> {

View File

@ -12,9 +12,7 @@ import org.gradle.kotlin.dsl.withType
open class KSciencePublishPlugin : Plugin<Project> {
override fun apply(project: Project): Unit = project.run{
plugins.apply("maven-publish")
registerKScienceExtension()
afterEvaluate {

View File

@ -14,7 +14,7 @@ object KScienceVersions {
object Serialization{
const val xmlVersion = "0.80.0-RC"//to be fixed
const val yamlVersion = "0.16.1"
const val bsonVersion = "0.2.1"
const val yamlVersion = "0.21.0"
const val bsonVersion = "0.4.1-rc"
}
}