[JPS] Fix incremental build after changing Java constant

InlineConstantTracker implemented for tracking changed java static final constants, that used in kotlin.

#KT-46506 Fixed
This commit is contained in:
Aleksei.Cherepanov
2021-09-02 12:32:30 +03:00
committed by TeamCityServer
parent 23420ecf7a
commit cc5382b37e
9 changed files with 126 additions and 1 deletions
@@ -0,0 +1,20 @@
/*
* Copyright 2010-2021 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.
*/
package org.jetbrains.kotlin.incremental
import org.jetbrains.kotlin.incremental.components.InlineConstTracker
import org.jetbrains.kotlin.incremental.components.ConstantRef
class InlineConstTrackerImpl : InlineConstTracker {
private val inlineConst = hashMapOf<String, MutableSet<ConstantRef>>()
val inlineConstMap: Map<String, Collection<ConstantRef>>
get() = inlineConst
override fun report(filePath: String, cRefs: Collection<ConstantRef>) {
inlineConst.getOrPut(filePath) { hashSetOf() }.addAll(cRefs)
}
}