[TMP] Remove :kotlin-coroutines-experimental-compat module

This commit is contained in:
Dmitriy Novozhilov
2021-01-26 17:21:44 +03:00
parent 1300ec3e45
commit bc3b791cd8
35 changed files with 6 additions and 1826 deletions
@@ -93,10 +93,7 @@ public abstract class AbstractCompileKotlinAgainstKotlinTest extends CodegenTest
@NotNull
private URLClassLoader createGeneratedClassLoader() throws Exception {
return new URLClassLoader(
new URL[]{
bDir.toURI().toURL(), aDir.toURI().toURL(),
ForTestCompileRuntime.coroutinesCompatForTests().toURI().toURL()
},
new URL[]{bDir.toURI().toURL(), aDir.toURI().toURL()},
ForTestCompileRuntime.runtimeAndReflectJarClassLoader()
);
}
@@ -235,7 +235,6 @@ public abstract class CodegenTestCase extends KotlinBaseTest<KotlinBaseTest.Test
if (additionalDependencies != null) {
files.addAll(additionalDependencies);
}
files.addAll(getExtraDependenciesFromKotlinCompileClasspath());
ScriptDependenciesProvider externalImportsProvider =
ScriptDependenciesProvider.Companion.getInstance(myEnvironment.getProject());
@@ -262,20 +261,6 @@ public abstract class CodegenTestCase extends KotlinBaseTest<KotlinBaseTest.Test
}
}
private Set<File> getExtraDependenciesFromKotlinCompileClasspath() {
List<File> includeFromCompileClasspath = CollectionsKt.listOf(
ForTestCompileRuntime.coroutinesCompatForTests()
);
List<File> compileClasspath =
CollectionsKt.map(
CollectionsKt.filterIsInstance(
myEnvironment.getConfiguration().get(CLIConfigurationKeys.CONTENT_ROOTS),
JvmClasspathRoot.class),
JvmClasspathRoot::getFile);
return CollectionsKt.intersect(compileClasspath, includeFromCompileClasspath);
}
@NotNull
protected String generateToText() {
return generateToText(null);
@@ -483,7 +468,6 @@ public abstract class CodegenTestCase extends KotlinBaseTest<KotlinBaseTest.Test
if (loadAndroidAnnotations) {
javaClasspath.add(ForTestCompileRuntime.androidAnnotationsForTests().getPath());
}
javaClasspath.addAll(CollectionsKt.map(getExtraDependenciesFromKotlinCompileClasspath(), File::getPath));
updateJavaClasspath(javaClasspath);
javaClassesOutputDirectory = getJavaClassesOutputDirectory();
@@ -139,7 +139,6 @@ abstract class KotlinBaseTest<F : KotlinBaseTest.TestFile> : KtUsefulTestCase()
usePreparsedDirectives: Boolean
) {
var explicitLanguageVersionSettings: LanguageVersionSettings? = null
var includeCompatExperimentalCoroutines = false
val kotlinConfigurationFlags: MutableList<String> = ArrayList(0)
for (testFile in testFilesWithConfigurationDirectives) {
val content = testFile.content
@@ -171,18 +170,12 @@ abstract class KotlinBaseTest<F : KotlinBaseTest.TestFile> : KtUsefulTestCase()
""".trimIndent()
)
}
if (content.contains(StandardNames.COROUTINES_PACKAGE_FQ_NAME_EXPERIMENTAL.asString())) {
includeCompatExperimentalCoroutines = true
}
val fileLanguageVersionSettings: LanguageVersionSettings? = parseLanguageVersionSettings(directives)
if (fileLanguageVersionSettings != null) {
assert(explicitLanguageVersionSettings == null) { "Should not specify !LANGUAGE directive twice" }
explicitLanguageVersionSettings = fileLanguageVersionSettings
}
}
if (includeCompatExperimentalCoroutines) {
configuration.addJvmClasspathRoot(ForTestCompileRuntime.coroutinesCompatForTests())
}
if (explicitLanguageVersionSettings != null) {
configuration.languageVersionSettings = explicitLanguageVersionSettings
}