diff --git a/jps-plugin/build.gradle.kts b/jps-plugin/build.gradle.kts index 733b570e002..a0147cf66bd 100644 --- a/jps-plugin/build.gradle.kts +++ b/jps-plugin/build.gradle.kts @@ -4,7 +4,6 @@ apply { plugin("jps-compatible") } val compilerModules: Array by rootProject.extra dependencies { - compileOnly(project(":jps-plugin:jps-services-declarations")) compile(project(":kotlin-build-common")) compile(project(":core:descriptors")) compile(project(":core:descriptors.jvm")) diff --git a/jps-plugin/jps-services-declarations/build.gradle.kts b/jps-plugin/jps-services-declarations/build.gradle.kts deleted file mode 100644 index dcf3d7b0a7e..00000000000 --- a/jps-plugin/jps-services-declarations/build.gradle.kts +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license - * that can be found in the license/LICENSE.txt file. - */ - -/** - * A hacky module to provide Intellij services declarations, - * so Kotlin plugin can be compiled even when service API - * is not present in all Intellij builds we support. - */ - -plugins { java } -apply { plugin("jps-compatible") } - -dependencies { - compileOnly(intellijDep()) { includeJars("annotations", "util") } - compileOnly(intellijDep("jps-standalone")) { includeJars("jps-builders") } -} - -sourceSets { - "main" { projectDefault() } -} diff --git a/jps-plugin/jps-services-declarations/src/org/jetbrains/jps/builders/java/ConstantSearchProvider.java b/jps-plugin/jps-services-declarations/src/org/jetbrains/jps/builders/java/ConstantSearchProvider.java deleted file mode 100644 index f09105ad5cd..00000000000 --- a/jps-plugin/jps-services-declarations/src/org/jetbrains/jps/builders/java/ConstantSearchProvider.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license - * that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.jps.builders.java; - -import org.jetbrains.annotations.NotNull; -import org.jetbrains.jps.builders.java.dependencyView.Callbacks; -import org.jetbrains.jps.incremental.CompileContext; - -/** - * A "copy" of Intellij service unavailable in current builds, - * so our plugin can be compiled against it (API is not yet merged in Intellij, - * even then it would be available only in 182.* builds). - * - * // todo: remove when compatibility layers will be finished - */ -@SuppressWarnings("unused") -public interface ConstantSearchProvider { - @NotNull - Callbacks.ConstantAffectionResolver getConstantSearch(@NotNull CompileContext context); -} diff --git a/jps-plugin/src/META-INF/services/org.jetbrains.jps.builders.java.ConstantSearchProvider b/jps-plugin/src/META-INF/services/org.jetbrains.jps.builders.java.ConstantSearchProvider deleted file mode 100644 index 2c3c50a7060..00000000000 --- a/jps-plugin/src/META-INF/services/org.jetbrains.jps.builders.java.ConstantSearchProvider +++ /dev/null @@ -1 +0,0 @@ -org.jetbrains.kotlin.jps.build.KotlinConstantSearchProvider \ No newline at end of file diff --git a/jps-plugin/src/org/jetbrains/kotlin/jps/build/KotlinConstantSearchProvider.kt b/jps-plugin/src/org/jetbrains/kotlin/jps/build/KotlinConstantSearchProvider.kt deleted file mode 100644 index ddd34a6252e..00000000000 --- a/jps-plugin/src/org/jetbrains/kotlin/jps/build/KotlinConstantSearchProvider.kt +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license - * that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.jps.build - -import com.intellij.util.concurrency.FixedFuture -import org.jetbrains.jps.builders.java.ConstantSearchProvider -import org.jetbrains.jps.builders.java.dependencyView.Callbacks -import org.jetbrains.jps.incremental.CompileContext -import org.jetbrains.kotlin.incremental.LookupSymbol -import org.jetbrains.kotlin.jps.incremental.withLookupStorage -import java.io.File -import java.util.concurrent.Future - -class KotlinConstantSearchProvider : ConstantSearchProvider { - override fun getConstantSearch(context: CompileContext): Callbacks.ConstantAffectionResolver = - KotlinLookupConstantSearch(context) -} - -class KotlinLookupConstantSearch(context: CompileContext) : Callbacks.ConstantAffectionResolver { - private val dataManager = context.projectDescriptor.dataManager - - override fun request( - ownerClassName: String, - fieldName: String, - accessFlags: Int, - fieldRemoved: Boolean, - accessChanged: Boolean - ): Future { - val paths = dataManager.withLookupStorage { storage -> - storage.get(LookupSymbol(name = fieldName, scope = ownerClassName)) - } - return FixedFuture(Callbacks.ConstantAffection(paths.map(::File))) - } -} \ No newline at end of file diff --git a/settings.gradle b/settings.gradle index 9760c79ca5e..59a2bb398ca 100644 --- a/settings.gradle +++ b/settings.gradle @@ -48,7 +48,6 @@ include ":kotlin-build-common", ":js:js.dce", ":js:js.tests", ":jps-plugin", - ":jps-plugin:jps-services-declarations", ":kotlin-jps-plugin", ":core:descriptors", ":core:descriptors.jvm",