diff --git a/build.gradle.kts b/build.gradle.kts index a1e5186..729760e 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -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" diff --git a/src/main/kotlin/ru/mipt/npm/gradle/KScienceBasePlugin.kt b/src/main/kotlin/ru/mipt/npm/gradle/KScienceBasePlugin.kt new file mode 100644 index 0000000..341be36 --- /dev/null +++ b/src/main/kotlin/ru/mipt/npm/gradle/KScienceBasePlugin.kt @@ -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 { + override fun apply(target: Project): Unit = target.run{ + registerKScienceExtension() + } +} \ No newline at end of file diff --git a/src/main/kotlin/ru/mipt/npm/gradle/KScienceJSPlugin.kt b/src/main/kotlin/ru/mipt/npm/gradle/KScienceJSPlugin.kt index 3b000e8..aa1a822 100644 --- a/src/main/kotlin/ru/mipt/npm/gradle/KScienceJSPlugin.kt +++ b/src/main/kotlin/ru/mipt/npm/gradle/KScienceJSPlugin.kt @@ -12,7 +12,7 @@ import org.jetbrains.kotlin.gradle.dsl.KotlinJsProjectExtension open class KScienceJSPlugin : Plugin { override fun apply(project: Project): Unit = project.run { plugins.apply("org.jetbrains.kotlin.js") - extensions.add("kscience", KScienceExtension(this)) + registerKScienceExtension() repositories.applyRepos() diff --git a/src/main/kotlin/ru/mipt/npm/gradle/KScienceMPPlugin.kt b/src/main/kotlin/ru/mipt/npm/gradle/KScienceMPPlugin.kt index deb6bfd..85baece 100644 --- a/src/main/kotlin/ru/mipt/npm/gradle/KScienceMPPlugin.kt +++ b/src/main/kotlin/ru/mipt/npm/gradle/KScienceMPPlugin.kt @@ -9,10 +9,8 @@ import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension open class KScienceMPPlugin : Plugin { override fun apply(project: Project): Unit = project.run { - plugins.apply("org.jetbrains.kotlin.multiplatform") - extensions.add("kscience", KScienceExtension(this)) - + registerKScienceExtension() repositories.applyRepos() configure { diff --git a/src/main/kotlin/ru/mipt/npm/gradle/KSciencePublishPlugin.kt b/src/main/kotlin/ru/mipt/npm/gradle/KSciencePublishPlugin.kt index 13db04a..aca2739 100644 --- a/src/main/kotlin/ru/mipt/npm/gradle/KSciencePublishPlugin.kt +++ b/src/main/kotlin/ru/mipt/npm/gradle/KSciencePublishPlugin.kt @@ -12,9 +12,7 @@ import org.gradle.kotlin.dsl.withType open class KSciencePublishPlugin : Plugin { override fun apply(project: Project): Unit = project.run{ - plugins.apply("maven-publish") - registerKScienceExtension() afterEvaluate { diff --git a/src/main/kotlin/ru/mipt/npm/gradle/KScienceVersions.kt b/src/main/kotlin/ru/mipt/npm/gradle/KScienceVersions.kt index 40fe4df..5016871 100644 --- a/src/main/kotlin/ru/mipt/npm/gradle/KScienceVersions.kt +++ b/src/main/kotlin/ru/mipt/npm/gradle/KScienceVersions.kt @@ -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" } }