2020-08-20 10:02:28 +03:00
|
|
|
package ru.mipt.npm.gradle
|
2019-06-28 16:22:11 +03:00
|
|
|
|
|
|
|
import org.gradle.api.Plugin
|
|
|
|
import org.gradle.api.Project
|
2020-11-25 12:16:09 +03:00
|
|
|
import org.gradle.kotlin.dsl.apply
|
2019-06-28 16:22:11 +03:00
|
|
|
|
2020-08-20 10:02:28 +03:00
|
|
|
open class KScienceMPPlugin : Plugin<Project> {
|
2020-07-05 14:39:35 +03:00
|
|
|
override fun apply(project: Project): Unit = project.run {
|
2020-11-25 14:26:08 +03:00
|
|
|
if (plugins.findPlugin("org.jetbrains.kotlin.multiplatform") == null) {
|
2020-11-25 12:16:09 +03:00
|
|
|
logger.info("Kotlin multiplatform plugin is not resolved. Adding it automatically")
|
2020-11-25 14:26:08 +03:00
|
|
|
pluginManager.apply("org.jetbrains.kotlin.multiplatform")
|
2019-06-28 16:22:11 +03:00
|
|
|
}
|
2020-11-25 12:16:09 +03:00
|
|
|
plugins.apply(KScienceCommonPlugin::class)
|
|
|
|
}
|
2020-07-05 14:39:35 +03:00
|
|
|
}
|