Kapt: Remove kapt1 from Kotlin compiler
This commit is contained in:
@@ -37,13 +37,10 @@ dependencies {
|
||||
sourceSets {
|
||||
"main" {
|
||||
projectDefault()
|
||||
java.srcDirs("../../plugins/annotation-collector/src",
|
||||
"../builtins-serializer/src",
|
||||
java.srcDirs("../builtins-serializer/src",
|
||||
"../javac-wrapper/src")
|
||||
}
|
||||
"test" {
|
||||
java.srcDirs("../../plugins/annotation-collector/test")
|
||||
}
|
||||
"test" { }
|
||||
}
|
||||
|
||||
testsJar {}
|
||||
|
||||
@@ -16,17 +16,15 @@
|
||||
|
||||
package org.jetbrains.kotlin.cli.jvm
|
||||
|
||||
import org.jetbrains.kotlin.annotation.AnnotationCollectorCommandLineProcessor
|
||||
import org.jetbrains.kotlin.annotation.AnnotationCollectorComponentRegistrar
|
||||
import org.jetbrains.kotlin.compiler.plugin.CommandLineProcessor
|
||||
import org.jetbrains.kotlin.compiler.plugin.ComponentRegistrar
|
||||
|
||||
object BundledCompilerPlugins {
|
||||
|
||||
val componentRegistrars: List<ComponentRegistrar>
|
||||
get() = listOf(AnnotationCollectorComponentRegistrar())
|
||||
get() = emptyList()
|
||||
|
||||
val commandLineProcessors: List<CommandLineProcessor>
|
||||
get() = listOf(AnnotationCollectorCommandLineProcessor())
|
||||
get() = emptyList()
|
||||
|
||||
}
|
||||
+1
-2
@@ -420,10 +420,9 @@ object KotlinToJVMBytecodeCompiler {
|
||||
sourceFiles: List<KtFile>,
|
||||
module: Module?
|
||||
): GenerationState {
|
||||
val isKapt2Enabled = environment.project.getUserData(IS_KAPT2_ENABLED_KEY) ?: false
|
||||
val generationState = GenerationState.Builder(
|
||||
environment.project,
|
||||
ClassBuilderFactories.binaries(isKapt2Enabled),
|
||||
ClassBuilderFactories.BINARIES,
|
||||
result.moduleDescriptor,
|
||||
result.bindingContext,
|
||||
sourceFiles,
|
||||
|
||||
+1
-2
@@ -422,10 +422,9 @@ object KotlinToJVMBytecodeCompiler {
|
||||
sourceFiles: List<KtFile>,
|
||||
module: Module?
|
||||
): GenerationState {
|
||||
val isKapt2Enabled = environment.project.getUserData(IS_KAPT2_ENABLED_KEY) ?: false
|
||||
val generationState = GenerationState.Builder(
|
||||
environment.project,
|
||||
ClassBuilderFactories.binaries(isKapt2Enabled),
|
||||
ClassBuilderFactories.BINARIES,
|
||||
result.moduleDescriptor,
|
||||
result.bindingContext,
|
||||
sourceFiles,
|
||||
|
||||
+1
-2
@@ -422,10 +422,9 @@ object KotlinToJVMBytecodeCompiler {
|
||||
sourceFiles: List<KtFile>,
|
||||
module: Module?
|
||||
): GenerationState {
|
||||
val isKapt2Enabled = environment.project.getUserData(IS_KAPT2_ENABLED_KEY) ?: false
|
||||
val generationState = GenerationState.Builder(
|
||||
environment.project,
|
||||
ClassBuilderFactories.binaries(isKapt2Enabled),
|
||||
ClassBuilderFactories.BINARIES,
|
||||
result.moduleDescriptor,
|
||||
result.bindingContext,
|
||||
sourceFiles,
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2016 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.cli.jvm.config
|
||||
|
||||
import com.intellij.openapi.util.Key
|
||||
|
||||
val IS_KAPT2_ENABLED_KEY = Key<Boolean>("IsKapt2EnabledKey")
|
||||
@@ -89,7 +89,7 @@ open class GenericReplCompiler(disposable: Disposable,
|
||||
|
||||
val generationState = GenerationState.Builder(
|
||||
psiFile.project,
|
||||
ClassBuilderFactories.binaries(false),
|
||||
ClassBuilderFactories.BINARIES,
|
||||
compilerState.analyzerEngine.module,
|
||||
compilerState.analyzerEngine.trace.bindingContext,
|
||||
listOf(psiFile),
|
||||
|
||||
Reference in New Issue
Block a user