46d113605b
Before this change `./gradlew help` (with native enabled) Created immediately: 1322 Created during configuration: 1541 after this change: Created immediately: 596 Created during configuration: 1509 To know more about configuration avoidance: https://docs.gradle.org/current/userguide/task_configuration_avoidance.html
36 lines
1.2 KiB
Kotlin
36 lines
1.2 KiB
Kotlin
/*
|
|
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
|
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
|
*/
|
|
|
|
@file:Suppress("PackageDirectoryMismatch")
|
|
package org.jetbrains.kotlin.pill
|
|
|
|
import org.gradle.api.Plugin
|
|
import org.gradle.api.Project
|
|
|
|
@Suppress("unused")
|
|
class JpsCompatiblePlugin : Plugin<Project> {
|
|
override fun apply(project: Project) {
|
|
project.configurations.maybeCreate(EmbeddedComponents.CONFIGURATION_NAME)
|
|
project.extensions.create("pill", PillExtension::class.java)
|
|
|
|
// 'jpsTest' does not require the 'tests-jar' artifact
|
|
project.configurations.create("jpsTest")
|
|
|
|
if (project == project.rootProject) {
|
|
project.tasks.register("pill") {
|
|
dependsOn(":pill:pill-importer:pill")
|
|
|
|
if (System.getProperty("pill.android.tests", "false") == "true") {
|
|
TaskUtils.useAndroidSdk(this)
|
|
TaskUtils.useAndroidJar(this)
|
|
}
|
|
}
|
|
|
|
project.tasks.register("unpill") {
|
|
dependsOn(":pill:pill-importer:unpill")
|
|
}
|
|
}
|
|
}
|
|
} |