Files
kotlin-fork/analysis/low-level-api-fir/build.gradle.kts
T
Marco Pennekamp b805c6e32b [LL FIR] Add Caffeine library dependency
- Our current FIR caches are based on `ConcurrentMap` and thereby do not
  support size and lifetime limits out of the box. For example,
  first-layer caches with a limited size can speed up access of the most
  frequently used elements, while having a small memory footprint.
- Caffeine is a modern and well optimized caching library that allows us
  to create thread-safe and performant caches with various size or
  lifetime limits.
- The cache must support concurrency because session components such as
  symbol providers may be accessed concurrently once parallel resolve in
  the Analysis API has been implemented (see KT-55750). Caffeine caches
  support concurrency.
2023-04-04 12:45:31 +00:00

78 lines
2.7 KiB
Kotlin

plugins {
kotlin("jvm")
id("jps-compatible")
}
dependencies {
api(project(":compiler:psi"))
implementation(project(":analysis:project-structure"))
api(project(":compiler:fir:fir2ir"))
api(project(":compiler:fir:fir2ir:jvm-backend"))
api(project(":compiler:ir.serialization.common"))
api(project(":compiler:fir:resolve"))
api(project(":compiler:fir:providers"))
api(project(":compiler:fir:semantics"))
api(project(":compiler:fir:checkers"))
api(project(":compiler:fir:checkers:checkers.jvm"))
api(project(":compiler:fir:checkers:checkers.js"))
api(project(":compiler:fir:checkers:checkers.native"))
api(project(":compiler:fir:java"))
api(project(":compiler:backend.common.jvm"))
api(project(":analysis:analysis-api-impl-barebone"))
api(project(":js:js.config"))
testApi(project(":analysis:analysis-api-fir"))
implementation(project(":compiler:frontend.common"))
implementation(project(":compiler:fir:entrypoint"))
implementation(project(":analysis:analysis-api-providers"))
implementation(project(":analysis:analysis-internal-utils"))
// We cannot use the latest version `3.1.5` because it doesn't support Java 8.
implementation("com.github.ben-manes.caffeine:caffeine:2.9.3")
api(intellijCore())
testApi(projectTests(":compiler:test-infrastructure-utils"))
testApi(projectTests(":compiler:test-infrastructure"))
testApi(projectTests(":compiler:tests-common-new"))
testImplementation("org.opentest4j:opentest4j:1.2.0")
testApi(toolsJar())
testApi(projectTests(":compiler:tests-common"))
testApi(projectTests(":compiler:fir:analysis-tests:legacy-fir-tests"))
testApi(projectTests(":analysis:analysis-api-impl-barebone"))
testApi(projectTests(":analysis:analysis-test-framework"))
testApi(projectTests(":analysis:analysis-api-impl-base"))
testApi(project(":kotlin-test:kotlin-test-junit"))
testApiJUnit5()
testImplementation(project(":analysis:symbol-light-classes"))
testRuntimeOnly(project(":core:descriptors.runtime"))
// We use 'api' instead of 'implementation' because other modules might be using these jars indirectly
testApi(project(":plugins:fir-plugin-prototype"))
testApi(projectTests(":plugins:fir-plugin-prototype"))
}
sourceSets {
"main" { projectDefault() }
"test" { projectDefault() }
}
projectTest(jUnitMode = JUnitMode.JUnit5) {
dependsOn(":dist")
workingDir = rootDir
useJUnitPlatform()
}
allprojects {
tasks.withType<org.jetbrains.kotlin.gradle.dsl.KotlinCompile<*>> {
kotlinOptions {
freeCompilerArgs += "-opt-in=org.jetbrains.kotlin.fir.symbols.SymbolInternals"
}
}
}
testsJar()