1 /* 2 * Copyright (C) 2021 Square, Inc. 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * https://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ <lambda>null16plugins { 17 id("com.google.devtools.ksp") 18 kotlin("jvm") 19 } 20 <lambda>null21tasks.compileTestKotlin { 22 compilerOptions { 23 optIn.add("org.jetbrains.kotlin.compiler.plugin.ExperimentalCompilerApi") 24 } 25 } 26 <lambda>null27tasks.test { 28 // KSP2 needs more memory to run 29 minHeapSize = "1g" 30 maxHeapSize = "4g" 31 } 32 <lambda>null33dependencies { 34 implementation(projects.kotlinpoet) 35 implementation(projects.interop.ksp) 36 implementation(libs.autoService) 37 compileOnly(libs.ksp.api) 38 ksp(libs.autoService.ksp) 39 // Always force the latest version of the KSP/kotlin impl in tests to match what we're building against 40 testImplementation(libs.ksp.api) 41 testImplementation(libs.kotlin.compilerEmbeddable) 42 testImplementation(libs.kotlin.annotationProcessingEmbeddable) 43 testImplementation(libs.ksp) 44 testImplementation(libs.kotlinCompileTesting) 45 testImplementation(libs.kotlinCompileTesting.ksp) 46 testImplementation(libs.ksp.aaEmbeddable) 47 testImplementation(libs.kotlin.junit) 48 testImplementation(libs.truth) 49 } 50