[kotlinp] Split :tools:kotlinp into "common" and "jvm" subprojects

The "common" subproject keeps only backend-neutral logic and depends
only on :kotlinx-metadata library. It takes the name of the former
project - :tools:kotlinp

The "jvm" subproject depends on the "common" one and also depends
on :kotlinx-metadata-jvm. It gets the new name - :tools:kotlinp-jvm

There is a lot of touched files in this commit. The majority of them
is just moved files (tests, test data, etc).

Only the following files were actually modified:
  .space/CODEOWNERS
  build.gradle.kts
  libraries/tools/abi-comparator/build.gradle.kts
  libraries/tools/kotlinp/build.gradle.kts
  libraries/tools/kotlinp/jvm/build.gradle.kts
  plugins/kapt3/kapt3-compiler/build.gradle.kts
  settings.gradle

 ^KT-62340
This commit is contained in:
Dmitriy Dolovov
2024-02-08 21:32:02 +01:00
committed by Space Team
parent eec76865a7
commit d30efdb001
89 changed files with 151 additions and 133 deletions
+2 -1
View File
@@ -343,7 +343,8 @@
/libraries/tools/kotlin-test-js-runner/ "Kotlin JS"
/libraries/tools/kotlin-tooling-core/ "Kotlin Build Tools"
/libraries/tools/kotlin-tooling-metadata/ "Kotlin Build Tools"
/libraries/tools/kotlinp/ "Kotlin JVM"
/libraries/tools/kotlinp/ "Kotlin JVM" "Kotlin Common Backend"
/libraries/tools/kotlinp/jvm/ "Kotlin JVM"
/libraries/tools/maven-archetypes/ "Kotlin Build Tools"
/libraries/tools/mutability-annotations-compat/ "Kotlin Libraries"
/libraries/tools/script-runtime/ "Kotlin Compiler Core"
+1 -1
View File
@@ -901,7 +901,7 @@ tasks {
}
register("toolsTest") {
dependsOn(":tools:kotlinp:test")
dependsOn(":tools:kotlinp-jvm:test")
dependsOn(":native:kotlin-klib-commonizer:test")
dependsOn(":native:kotlin-klib-commonizer-api:test")
dependsOn(":kotlin-tooling-core:check")
@@ -7,7 +7,7 @@ dependencies {
implementation(commonDependency("org.jetbrains.intellij.deps:asm-all"))
implementation(commonDependency("org.apache.commons:commons-text"))
implementation(project(":tools:kotlinp"))
implementation(project(":tools:kotlinp-jvm"))
implementation(project(":kotlinx-metadata-jvm"))
implementation(project(":kotlinx-metadata"))
-49
View File
@@ -1,5 +1,3 @@
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
description = "kotlinp"
plugins {
@@ -7,57 +5,10 @@ plugins {
id("jps-compatible")
}
val kotlinpAsmVersion = "9.0"
val shadows by configurations.creating
dependencies {
compileOnly(project(":kotlinx-metadata"))
compileOnly(project(":kotlinx-metadata-jvm"))
implementation("org.jetbrains.intellij.deps:asm-all:$kotlinpAsmVersion")
testApi(intellijCore())
testCompileOnly(project(":kotlinx-metadata"))
testCompileOnly(project(":kotlinx-metadata-jvm"))
testImplementation(libs.junit4)
testImplementation(projectTests(":compiler:tests-common"))
testImplementation(projectTests(":generators:test-generator"))
testRuntimeOnly(project(":kotlinx-metadata-jvm"))
shadows(project(":kotlinx-metadata-jvm"))
shadows("org.jetbrains.intellij.deps:asm-all:$kotlinpAsmVersion")
}
sourceSets {
"main" { projectDefault() }
"test" { projectDefault() }
}
projectTest {
workingDir = rootDir
}
val generateTests by generator("org.jetbrains.kotlin.kotlinp.test.GenerateKotlinpTestsKt")
val shadowJar by task<ShadowJar> {
archiveClassifier.set("shadow")
archiveVersion.set("")
configurations = listOf(shadows)
from(mainSourceSet.output)
manifest {
attributes["Main-Class"] = "org.jetbrains.kotlin.kotlinp.Main"
}
}
tasks {
"assemble" {
dependsOn(shadowJar)
}
"test" {
// These dependencies are needed because ForTestCompileRuntime loads jars from dist
dependsOn(rootProject.tasks.named("dist"))
}
}
@@ -0,0 +1,64 @@
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
description = "kotlinp-jvm"
plugins {
kotlin("jvm")
id("jps-compatible")
}
val kotlinpAsmVersion = "9.0"
val shadows by configurations.creating
dependencies {
compileOnly(project(":kotlinx-metadata"))
compileOnly(project(":kotlinx-metadata-jvm"))
api(project(":tools:kotlinp"))
implementation("org.jetbrains.intellij.deps:asm-all:$kotlinpAsmVersion")
testApi(intellijCore())
testCompileOnly(project(":kotlinx-metadata"))
testCompileOnly(project(":kotlinx-metadata-jvm"))
testImplementation(libs.junit4)
testImplementation(projectTests(":compiler:tests-common"))
testImplementation(projectTests(":generators:test-generator"))
testRuntimeOnly(project(":kotlinx-metadata-jvm"))
shadows(project(":kotlinx-metadata-jvm"))
shadows("org.jetbrains.intellij.deps:asm-all:$kotlinpAsmVersion")
}
sourceSets {
"main" { projectDefault() }
"test" { projectDefault() }
}
projectTest {
workingDir = rootDir
}
val generateTests by generator("org.jetbrains.kotlin.kotlinp.test.GenerateKotlinpTestsKt")
val shadowJar by task<ShadowJar> {
archiveClassifier.set("shadow")
archiveVersion.set("")
configurations = listOf(shadows)
from(mainSourceSet.output)
manifest {
attributes["Main-Class"] = "org.jetbrains.kotlin.kotlinp.Main"
}
}
tasks {
"assemble" {
dependsOn(shadowJar)
}
"test" {
// These dependencies are needed because ForTestCompileRuntime loads jars from dist
dependsOn(rootProject.tasks.named("dist"))
}
}
@@ -11,7 +11,7 @@ fun main(args: Array<String>) {
System.setProperty("java.awt.headless", "true")
generateTestGroupSuite(args) {
testGroup("libraries/tools/kotlinp/test", "libraries/tools/kotlinp/testData") {
testGroup("libraries/tools/kotlinp/jvm/test", "libraries/tools/kotlinp/jvm/testData") {
testClass<AbstractK1KotlinpTest> {
model("")
}
@@ -15,9 +15,9 @@ import org.junit.runner.RunWith;
import java.io.File;
import java.util.regex.Pattern;
/** This class is generated by {@link org.jetbrains.kotlin.kotlinp.test.GenerateKotlinpTestsKt}. DO NOT MODIFY MANUALLY */
/** This class is generated by {@link org.jetbrains.kotlin.kotlinp.jvm.test.GenerateKotlinpTestsKt}. DO NOT MODIFY MANUALLY */
@SuppressWarnings("all")
@TestMetadata("libraries/tools/kotlinp/testData")
@TestMetadata("libraries/tools/kotlinp/jvm/testData")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public class K1KotlinpTestGenerated extends AbstractK1KotlinpTest {
@@ -26,130 +26,130 @@ public class K1KotlinpTestGenerated extends AbstractK1KotlinpTest {
}
public void testAllFilesPresentInTestData() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("libraries/tools/kotlinp/testData"), Pattern.compile("^(.+)\\.kt$"), null, true);
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("libraries/tools/kotlinp/jvm/testData"), Pattern.compile("^(.+)\\.kt$"), null, true);
}
@TestMetadata("Annotations.kt")
public void testAnnotations() throws Exception {
runTest("libraries/tools/kotlinp/testData/Annotations.kt");
runTest("libraries/tools/kotlinp/jvm/testData/Annotations.kt");
}
@TestMetadata("Constants.kt")
public void testConstants() throws Exception {
runTest("libraries/tools/kotlinp/testData/Constants.kt");
runTest("libraries/tools/kotlinp/jvm/testData/Constants.kt");
}
@TestMetadata("ContextReceivers.kt")
public void testContextReceivers() throws Exception {
runTest("libraries/tools/kotlinp/testData/ContextReceivers.kt");
runTest("libraries/tools/kotlinp/jvm/testData/ContextReceivers.kt");
}
@TestMetadata("Contracts.kt")
public void testContracts() throws Exception {
runTest("libraries/tools/kotlinp/testData/Contracts.kt");
runTest("libraries/tools/kotlinp/jvm/testData/Contracts.kt");
}
@TestMetadata("Delegation.kt")
public void testDelegation() throws Exception {
runTest("libraries/tools/kotlinp/testData/Delegation.kt");
runTest("libraries/tools/kotlinp/jvm/testData/Delegation.kt");
}
@TestMetadata("EnumEntries.kt")
public void testEnumEntries() throws Exception {
runTest("libraries/tools/kotlinp/testData/EnumEntries.kt");
runTest("libraries/tools/kotlinp/jvm/testData/EnumEntries.kt");
}
@TestMetadata("FunInterface.kt")
public void testFunInterface() throws Exception {
runTest("libraries/tools/kotlinp/testData/FunInterface.kt");
runTest("libraries/tools/kotlinp/jvm/testData/FunInterface.kt");
}
@TestMetadata("IntersectionTypeInLambdaLiteralAndDelegatedProperty.kt")
public void testIntersectionTypeInLambdaLiteralAndDelegatedProperty() throws Exception {
runTest("libraries/tools/kotlinp/testData/IntersectionTypeInLambdaLiteralAndDelegatedProperty.kt");
runTest("libraries/tools/kotlinp/jvm/testData/IntersectionTypeInLambdaLiteralAndDelegatedProperty.kt");
}
@TestMetadata("Lambda.kt")
public void testLambda() throws Exception {
runTest("libraries/tools/kotlinp/testData/Lambda.kt");
runTest("libraries/tools/kotlinp/jvm/testData/Lambda.kt");
}
@TestMetadata("LocalDelegatedProperties.kt")
public void testLocalDelegatedProperties() throws Exception {
runTest("libraries/tools/kotlinp/testData/LocalDelegatedProperties.kt");
runTest("libraries/tools/kotlinp/jvm/testData/LocalDelegatedProperties.kt");
}
@TestMetadata("MultiFileClass.kt")
public void testMultiFileClass() throws Exception {
runTest("libraries/tools/kotlinp/testData/MultiFileClass.kt");
runTest("libraries/tools/kotlinp/jvm/testData/MultiFileClass.kt");
}
@TestMetadata("NestedClasses.kt")
public void testNestedClasses() throws Exception {
runTest("libraries/tools/kotlinp/testData/NestedClasses.kt");
runTest("libraries/tools/kotlinp/jvm/testData/NestedClasses.kt");
}
@TestMetadata("NotEnumWithEnumEntriesEnabled.kt")
public void testNotEnumWithEnumEntriesEnabled() throws Exception {
runTest("libraries/tools/kotlinp/testData/NotEnumWithEnumEntriesEnabled.kt");
runTest("libraries/tools/kotlinp/jvm/testData/NotEnumWithEnumEntriesEnabled.kt");
}
@TestMetadata("OptionalAnnotation.kt")
public void testOptionalAnnotation() throws Exception {
runTest("libraries/tools/kotlinp/testData/OptionalAnnotation.kt");
runTest("libraries/tools/kotlinp/jvm/testData/OptionalAnnotation.kt");
}
@TestMetadata("PlatformType.kt")
public void testPlatformType() throws Exception {
runTest("libraries/tools/kotlinp/testData/PlatformType.kt");
runTest("libraries/tools/kotlinp/jvm/testData/PlatformType.kt");
}
@TestMetadata("Properties.kt")
public void testProperties() throws Exception {
runTest("libraries/tools/kotlinp/testData/Properties.kt");
runTest("libraries/tools/kotlinp/jvm/testData/Properties.kt");
}
@TestMetadata("SimpleClass.kt")
public void testSimpleClass() throws Exception {
runTest("libraries/tools/kotlinp/testData/SimpleClass.kt");
runTest("libraries/tools/kotlinp/jvm/testData/SimpleClass.kt");
}
@TestMetadata("SimplePackage.kt")
public void testSimplePackage() throws Exception {
runTest("libraries/tools/kotlinp/testData/SimplePackage.kt");
runTest("libraries/tools/kotlinp/jvm/testData/SimplePackage.kt");
}
@TestMetadata("SyntheticClass.kt")
public void testSyntheticClass() throws Exception {
runTest("libraries/tools/kotlinp/testData/SyntheticClass.kt");
runTest("libraries/tools/kotlinp/jvm/testData/SyntheticClass.kt");
}
@TestMetadata("TypeAlias.kt")
public void testTypeAlias() throws Exception {
runTest("libraries/tools/kotlinp/testData/TypeAlias.kt");
runTest("libraries/tools/kotlinp/jvm/testData/TypeAlias.kt");
}
@TestMetadata("TypeParameters.kt")
public void testTypeParameters() throws Exception {
runTest("libraries/tools/kotlinp/testData/TypeParameters.kt");
runTest("libraries/tools/kotlinp/jvm/testData/TypeParameters.kt");
}
@TestMetadata("ValueClass.kt")
public void testValueClass() throws Exception {
runTest("libraries/tools/kotlinp/testData/ValueClass.kt");
runTest("libraries/tools/kotlinp/jvm/testData/ValueClass.kt");
}
@TestMetadata("VarargInAnnotation.kt")
public void testVarargInAnnotation() throws Exception {
runTest("libraries/tools/kotlinp/testData/VarargInAnnotation.kt");
runTest("libraries/tools/kotlinp/jvm/testData/VarargInAnnotation.kt");
}
@TestMetadata("VersionRequirement.kt")
public void testVersionRequirement() throws Exception {
runTest("libraries/tools/kotlinp/testData/VersionRequirement.kt");
runTest("libraries/tools/kotlinp/jvm/testData/VersionRequirement.kt");
}
@TestMetadata("libraries/tools/kotlinp/testData/jvmDefault")
@TestMetadata("libraries/tools/kotlinp/jvm/testData/jvmDefault")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class JvmDefault extends AbstractK1KotlinpTest {
@@ -159,30 +159,30 @@ public class K1KotlinpTestGenerated extends AbstractK1KotlinpTest {
@TestMetadata("All.kt")
public void testAll() throws Exception {
runTest("libraries/tools/kotlinp/testData/jvmDefault/All.kt");
runTest("libraries/tools/kotlinp/jvm/testData/jvmDefault/All.kt");
}
@TestMetadata("AllCompatibility.kt")
public void testAllCompatibility() throws Exception {
runTest("libraries/tools/kotlinp/testData/jvmDefault/AllCompatibility.kt");
runTest("libraries/tools/kotlinp/jvm/testData/jvmDefault/AllCompatibility.kt");
}
public void testAllFilesPresentInJvmDefault() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("libraries/tools/kotlinp/testData/jvmDefault"), Pattern.compile("^(.+)\\.kt$"), null, true);
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("libraries/tools/kotlinp/jvm/testData/jvmDefault"), Pattern.compile("^(.+)\\.kt$"), null, true);
}
@TestMetadata("withCompatibility.kt")
public void testWithCompatibility() throws Exception {
runTest("libraries/tools/kotlinp/testData/jvmDefault/withCompatibility.kt");
runTest("libraries/tools/kotlinp/jvm/testData/jvmDefault/withCompatibility.kt");
}
@TestMetadata("withoutCompatibility.kt")
public void testWithoutCompatibility() throws Exception {
runTest("libraries/tools/kotlinp/testData/jvmDefault/withoutCompatibility.kt");
runTest("libraries/tools/kotlinp/jvm/testData/jvmDefault/withoutCompatibility.kt");
}
}
@TestMetadata("libraries/tools/kotlinp/testData/localClasses")
@TestMetadata("libraries/tools/kotlinp/jvm/testData/localClasses")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class LocalClasses extends AbstractK1KotlinpTest {
@@ -191,27 +191,27 @@ public class K1KotlinpTestGenerated extends AbstractK1KotlinpTest {
}
public void testAllFilesPresentInLocalClasses() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("libraries/tools/kotlinp/testData/localClasses"), Pattern.compile("^(.+)\\.kt$"), null, true);
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("libraries/tools/kotlinp/jvm/testData/localClasses"), Pattern.compile("^(.+)\\.kt$"), null, true);
}
@TestMetadata("AnonymousObject.kt")
public void testAnonymousObject() throws Exception {
runTest("libraries/tools/kotlinp/testData/localClasses/AnonymousObject.kt");
runTest("libraries/tools/kotlinp/jvm/testData/localClasses/AnonymousObject.kt");
}
@TestMetadata("DeepInnerLocalChain.kt")
public void testDeepInnerLocalChain() throws Exception {
runTest("libraries/tools/kotlinp/testData/localClasses/DeepInnerLocalChain.kt");
runTest("libraries/tools/kotlinp/jvm/testData/localClasses/DeepInnerLocalChain.kt");
}
@TestMetadata("LocalClassInConstructor.kt")
public void testLocalClassInConstructor() throws Exception {
runTest("libraries/tools/kotlinp/testData/localClasses/LocalClassInConstructor.kt");
runTest("libraries/tools/kotlinp/jvm/testData/localClasses/LocalClassInConstructor.kt");
}
@TestMetadata("LocalClassInSignature.kt")
public void testLocalClassInSignature() throws Exception {
runTest("libraries/tools/kotlinp/testData/localClasses/LocalClassInSignature.kt");
runTest("libraries/tools/kotlinp/jvm/testData/localClasses/LocalClassInSignature.kt");
}
}
}
@@ -15,9 +15,9 @@ import org.junit.runner.RunWith;
import java.io.File;
import java.util.regex.Pattern;
/** This class is generated by {@link org.jetbrains.kotlin.kotlinp.test.GenerateKotlinpTestsKt}. DO NOT MODIFY MANUALLY */
/** This class is generated by {@link org.jetbrains.kotlin.kotlinp.jvm.test.GenerateKotlinpTestsKt}. DO NOT MODIFY MANUALLY */
@SuppressWarnings("all")
@TestMetadata("libraries/tools/kotlinp/testData")
@TestMetadata("libraries/tools/kotlinp/jvm/testData")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public class K2KotlinpTestGenerated extends AbstractK2KotlinpTest {
@@ -26,135 +26,135 @@ public class K2KotlinpTestGenerated extends AbstractK2KotlinpTest {
}
public void testAllFilesPresentInTestData() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("libraries/tools/kotlinp/testData"), Pattern.compile("^(.*)\\.kts?$"), null, true);
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("libraries/tools/kotlinp/jvm/testData"), Pattern.compile("^(.*)\\.kts?$"), null, true);
}
@TestMetadata("Annotations.kt")
public void testAnnotations() throws Exception {
runTest("libraries/tools/kotlinp/testData/Annotations.kt");
runTest("libraries/tools/kotlinp/jvm/testData/Annotations.kt");
}
@TestMetadata("Constants.kt")
public void testConstants() throws Exception {
runTest("libraries/tools/kotlinp/testData/Constants.kt");
runTest("libraries/tools/kotlinp/jvm/testData/Constants.kt");
}
@TestMetadata("ContextReceivers.kt")
public void testContextReceivers() throws Exception {
runTest("libraries/tools/kotlinp/testData/ContextReceivers.kt");
runTest("libraries/tools/kotlinp/jvm/testData/ContextReceivers.kt");
}
@TestMetadata("Contracts.kt")
public void testContracts() throws Exception {
runTest("libraries/tools/kotlinp/testData/Contracts.kt");
runTest("libraries/tools/kotlinp/jvm/testData/Contracts.kt");
}
@TestMetadata("Delegation.kt")
public void testDelegation() throws Exception {
runTest("libraries/tools/kotlinp/testData/Delegation.kt");
runTest("libraries/tools/kotlinp/jvm/testData/Delegation.kt");
}
@TestMetadata("EnumEntries.kt")
public void testEnumEntries() throws Exception {
runTest("libraries/tools/kotlinp/testData/EnumEntries.kt");
runTest("libraries/tools/kotlinp/jvm/testData/EnumEntries.kt");
}
@TestMetadata("FunInterface.kt")
public void testFunInterface() throws Exception {
runTest("libraries/tools/kotlinp/testData/FunInterface.kt");
runTest("libraries/tools/kotlinp/jvm/testData/FunInterface.kt");
}
@TestMetadata("IntersectionTypeInLambdaLiteralAndDelegatedProperty.kt")
public void testIntersectionTypeInLambdaLiteralAndDelegatedProperty() throws Exception {
runTest("libraries/tools/kotlinp/testData/IntersectionTypeInLambdaLiteralAndDelegatedProperty.kt");
runTest("libraries/tools/kotlinp/jvm/testData/IntersectionTypeInLambdaLiteralAndDelegatedProperty.kt");
}
@TestMetadata("Lambda.kt")
public void testLambda() throws Exception {
runTest("libraries/tools/kotlinp/testData/Lambda.kt");
runTest("libraries/tools/kotlinp/jvm/testData/Lambda.kt");
}
@TestMetadata("LocalDelegatedProperties.kt")
public void testLocalDelegatedProperties() throws Exception {
runTest("libraries/tools/kotlinp/testData/LocalDelegatedProperties.kt");
runTest("libraries/tools/kotlinp/jvm/testData/LocalDelegatedProperties.kt");
}
@TestMetadata("MultiFileClass.kt")
public void testMultiFileClass() throws Exception {
runTest("libraries/tools/kotlinp/testData/MultiFileClass.kt");
runTest("libraries/tools/kotlinp/jvm/testData/MultiFileClass.kt");
}
@TestMetadata("NestedClasses.kt")
public void testNestedClasses() throws Exception {
runTest("libraries/tools/kotlinp/testData/NestedClasses.kt");
runTest("libraries/tools/kotlinp/jvm/testData/NestedClasses.kt");
}
@TestMetadata("NotEnumWithEnumEntriesEnabled.kt")
public void testNotEnumWithEnumEntriesEnabled() throws Exception {
runTest("libraries/tools/kotlinp/testData/NotEnumWithEnumEntriesEnabled.kt");
runTest("libraries/tools/kotlinp/jvm/testData/NotEnumWithEnumEntriesEnabled.kt");
}
@TestMetadata("OptionalAnnotation.kt")
public void testOptionalAnnotation() throws Exception {
runTest("libraries/tools/kotlinp/testData/OptionalAnnotation.kt");
runTest("libraries/tools/kotlinp/jvm/testData/OptionalAnnotation.kt");
}
@TestMetadata("PlatformType.kt")
public void testPlatformType() throws Exception {
runTest("libraries/tools/kotlinp/testData/PlatformType.kt");
runTest("libraries/tools/kotlinp/jvm/testData/PlatformType.kt");
}
@TestMetadata("Properties.kt")
public void testProperties() throws Exception {
runTest("libraries/tools/kotlinp/testData/Properties.kt");
runTest("libraries/tools/kotlinp/jvm/testData/Properties.kt");
}
@TestMetadata("scriptSimple.kts")
public void testScriptSimple() throws Exception {
runTest("libraries/tools/kotlinp/testData/scriptSimple.kts");
runTest("libraries/tools/kotlinp/jvm/testData/scriptSimple.kts");
}
@TestMetadata("SimpleClass.kt")
public void testSimpleClass() throws Exception {
runTest("libraries/tools/kotlinp/testData/SimpleClass.kt");
runTest("libraries/tools/kotlinp/jvm/testData/SimpleClass.kt");
}
@TestMetadata("SimplePackage.kt")
public void testSimplePackage() throws Exception {
runTest("libraries/tools/kotlinp/testData/SimplePackage.kt");
runTest("libraries/tools/kotlinp/jvm/testData/SimplePackage.kt");
}
@TestMetadata("SyntheticClass.kt")
public void testSyntheticClass() throws Exception {
runTest("libraries/tools/kotlinp/testData/SyntheticClass.kt");
runTest("libraries/tools/kotlinp/jvm/testData/SyntheticClass.kt");
}
@TestMetadata("TypeAlias.kt")
public void testTypeAlias() throws Exception {
runTest("libraries/tools/kotlinp/testData/TypeAlias.kt");
runTest("libraries/tools/kotlinp/jvm/testData/TypeAlias.kt");
}
@TestMetadata("TypeParameters.kt")
public void testTypeParameters() throws Exception {
runTest("libraries/tools/kotlinp/testData/TypeParameters.kt");
runTest("libraries/tools/kotlinp/jvm/testData/TypeParameters.kt");
}
@TestMetadata("ValueClass.kt")
public void testValueClass() throws Exception {
runTest("libraries/tools/kotlinp/testData/ValueClass.kt");
runTest("libraries/tools/kotlinp/jvm/testData/ValueClass.kt");
}
@TestMetadata("VarargInAnnotation.kt")
public void testVarargInAnnotation() throws Exception {
runTest("libraries/tools/kotlinp/testData/VarargInAnnotation.kt");
runTest("libraries/tools/kotlinp/jvm/testData/VarargInAnnotation.kt");
}
@TestMetadata("VersionRequirement.kt")
public void testVersionRequirement() throws Exception {
runTest("libraries/tools/kotlinp/testData/VersionRequirement.kt");
runTest("libraries/tools/kotlinp/jvm/testData/VersionRequirement.kt");
}
@TestMetadata("libraries/tools/kotlinp/testData/jvmDefault")
@TestMetadata("libraries/tools/kotlinp/jvm/testData/jvmDefault")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class JvmDefault extends AbstractK2KotlinpTest {
@@ -164,30 +164,30 @@ public class K2KotlinpTestGenerated extends AbstractK2KotlinpTest {
@TestMetadata("All.kt")
public void testAll() throws Exception {
runTest("libraries/tools/kotlinp/testData/jvmDefault/All.kt");
runTest("libraries/tools/kotlinp/jvm/testData/jvmDefault/All.kt");
}
@TestMetadata("AllCompatibility.kt")
public void testAllCompatibility() throws Exception {
runTest("libraries/tools/kotlinp/testData/jvmDefault/AllCompatibility.kt");
runTest("libraries/tools/kotlinp/jvm/testData/jvmDefault/AllCompatibility.kt");
}
public void testAllFilesPresentInJvmDefault() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("libraries/tools/kotlinp/testData/jvmDefault"), Pattern.compile("^(.*)\\.kts?$"), null, true);
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("libraries/tools/kotlinp/jvm/testData/jvmDefault"), Pattern.compile("^(.*)\\.kts?$"), null, true);
}
@TestMetadata("withCompatibility.kt")
public void testWithCompatibility() throws Exception {
runTest("libraries/tools/kotlinp/testData/jvmDefault/withCompatibility.kt");
runTest("libraries/tools/kotlinp/jvm/testData/jvmDefault/withCompatibility.kt");
}
@TestMetadata("withoutCompatibility.kt")
public void testWithoutCompatibility() throws Exception {
runTest("libraries/tools/kotlinp/testData/jvmDefault/withoutCompatibility.kt");
runTest("libraries/tools/kotlinp/jvm/testData/jvmDefault/withoutCompatibility.kt");
}
}
@TestMetadata("libraries/tools/kotlinp/testData/localClasses")
@TestMetadata("libraries/tools/kotlinp/jvm/testData/localClasses")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class LocalClasses extends AbstractK2KotlinpTest {
@@ -196,27 +196,27 @@ public class K2KotlinpTestGenerated extends AbstractK2KotlinpTest {
}
public void testAllFilesPresentInLocalClasses() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("libraries/tools/kotlinp/testData/localClasses"), Pattern.compile("^(.*)\\.kts?$"), null, true);
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("libraries/tools/kotlinp/jvm/testData/localClasses"), Pattern.compile("^(.*)\\.kts?$"), null, true);
}
@TestMetadata("AnonymousObject.kt")
public void testAnonymousObject() throws Exception {
runTest("libraries/tools/kotlinp/testData/localClasses/AnonymousObject.kt");
runTest("libraries/tools/kotlinp/jvm/testData/localClasses/AnonymousObject.kt");
}
@TestMetadata("DeepInnerLocalChain.kt")
public void testDeepInnerLocalChain() throws Exception {
runTest("libraries/tools/kotlinp/testData/localClasses/DeepInnerLocalChain.kt");
runTest("libraries/tools/kotlinp/jvm/testData/localClasses/DeepInnerLocalChain.kt");
}
@TestMetadata("LocalClassInConstructor.kt")
public void testLocalClassInConstructor() throws Exception {
runTest("libraries/tools/kotlinp/testData/localClasses/LocalClassInConstructor.kt");
runTest("libraries/tools/kotlinp/jvm/testData/localClasses/LocalClassInConstructor.kt");
}
@TestMetadata("LocalClassInSignature.kt")
public void testLocalClassInSignature() throws Exception {
runTest("libraries/tools/kotlinp/testData/localClasses/LocalClassInSignature.kt");
runTest("libraries/tools/kotlinp/jvm/testData/localClasses/LocalClassInSignature.kt");
}
}
}
@@ -45,7 +45,7 @@ dependencies {
embedded(project(":kotlin-annotation-processing-cli")) { isTransitive = false }
embedded(project(":kotlin-annotation-processing-base")) { isTransitive = false }
testApi(project(":tools:kotlinp"))
testApi(project(":tools:kotlinp-jvm"))
testApi(project(":kotlinx-metadata-jvm"))
}
+2
View File
@@ -199,6 +199,7 @@ include ":kotlin-imports-dumper-compiler-plugin",
":generators:test-generator",
":generators:tree-generator-common",
":tools:kotlinp",
":tools:kotlinp-jvm",
":kotlin-build-tools-enum-compat",
":kotlin-gradle-compiler-types",
":kotlin-gradle-plugin-api",
@@ -759,6 +760,7 @@ project(':kotlin-assignment-compiler-plugin.cli').projectDir = "$rootDir/plugins
project(':kotlin-assignment-compiler-plugin.embeddable').projectDir = "$rootDir/plugins/assign-plugin/assign-plugin.embeddable" as File
project(':tools:kotlinp').projectDir = "$rootDir/libraries/tools/kotlinp" as File
project(':tools:kotlinp-jvm').projectDir = "$rootDir/libraries/tools/kotlinp/jvm" as File
project(":kotlin-build-tools-enum-compat").projectDir = "$rootDir/libraries/tools/kotlin-build-tools-enum-compat" as File
project(':kotlin-gradle-compiler-types').projectDir = "$rootDir/libraries/tools/kotlin-gradle-compiler-types" as File
project(':kotlin-gradle-plugin-api').projectDir = "$rootDir/libraries/tools/kotlin-gradle-plugin-api" as File