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") maven("https://dl.bintray.com/kotlin/kotlin-dev")
} }
val kotlinVersion = "1.4.0" val kotlinVersion = "1.4.10"
java { java {
targetCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8
@ -33,6 +33,11 @@ dependencies {
gradlePlugin { gradlePlugin {
plugins { 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") { create("kscience.publish") {
id = "ru.mipt.npm.publish" id = "ru.mipt.npm.publish"
description = "The publication plugin for bintray and github" 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> { open class KScienceJSPlugin : Plugin<Project> {
override fun apply(project: Project): Unit = project.run { override fun apply(project: Project): Unit = project.run {
plugins.apply("org.jetbrains.kotlin.js") plugins.apply("org.jetbrains.kotlin.js")
extensions.add("kscience", KScienceExtension(this)) registerKScienceExtension()
repositories.applyRepos() repositories.applyRepos()

View File

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

View File

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

View File

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