[K/N] Extract :native:cli-native from kotlin-native/backend.native/cli.bc

This commit is contained in:
Alexander Shabalin
2024-03-02 01:51:44 +01:00
committed by Space Team
parent bce550dce4
commit 0542b62430
11 changed files with 29 additions and 42 deletions
+5 -19
View File
@@ -22,9 +22,6 @@ sourceSets {
}
resources.srcDir 'compiler/ir/backend.native/resources/'
}
cli_bc {
kotlin.srcDir 'cli.bc/src'
}
}
compileCompilerKotlin {
@@ -42,10 +39,6 @@ tasks.withType(KotlinCompilationTask.class).configureEach {
compilerOptions.optIn.add("org.jetbrains.kotlin.ir.symbols.UnsafeDuringIrConstructionAPI")
}
compileCli_bcKotlin {
compilerOptions.freeCompilerArgs.add('-Xskip-prerelease-check')
}
configurations {
kotlin_compiler_jar
kotlin_stdlib_jar
@@ -53,11 +46,10 @@ configurations {
kotlin_script_runtime_jar
trove4j_jar
cli_bcApiElements {
extendsFrom cli_bcApi
compilerApiElements {
extendsFrom apiElements
extendsFrom compilerApi
}
cli_bcApi.extendsFrom compilerApi
}
dependencies {
@@ -102,17 +94,12 @@ dependencies {
compilerApi(intellijCore())
compileOnly(jpsModel())
}
cli_bcApi sourceSets.compiler.output
cli_bcApiElements sourceSets.cli_bc.output
}
classes.dependsOn 'compilerClasses', 'cli_bcClasses'
classes.dependsOn 'compilerClasses'
tasks.named("jar") {
from sourceSets.cli_bc.output,
sourceSets.compiler.output
from sourceSets.compiler.output
dependsOn 'external_jars'
}
@@ -158,7 +145,6 @@ tasks.register("debugCompiler", JavaExec) {
}
RepoArtifacts.sourcesJar(project) {
it.from(sourceSets["cli_bc"].allSource)
it.from(sourceSets["compiler"].allSource)
}
@@ -1,18 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="Kotlin" />
<orderEntry type="module" module-name="cli" />
<orderEntry type="module" module-name="frontend" />
<orderEntry type="module" module-name="util" />
<orderEntry type="module" module-name="ir.psi2ir" />
<orderEntry type="module" module-name="ir.tree" />
<orderEntry type="module" module-name="frontend.java" />
</component>
</module>
@@ -26,7 +26,6 @@ apply plugin: 'kotlin.native.build-tools-conventions'
apply plugin: 'native-dependencies'
configurations {
cli_bc
update_tests
nopPluginApi
@@ -1443,7 +1442,7 @@ dependencies {
nopPluginApi project(":kotlin-util-klib-metadata")
nopPluginApi project(":compiler:ir.serialization.common")
api project(path: ':kotlin-native:backend.native', configuration: 'cli_bcApiElements')
api project(':native:cli-native')
api libs.junit4
}
+1 -1
View File
@@ -184,7 +184,7 @@ dependencies {
distPack project(':native:base')
distPack project(':kotlin-native:utilities:cli-runner')
distPack project(':kotlin-native:klib')
distPack project(path: ':kotlin-native:backend.native', configuration: 'cli_bcApiElements')
distPack project(':native:cli-native')
distPack project(path: ':kotlin-native:endorsedLibraries:kotlinx.cli', configuration: "jvmRuntimeElements")
commonSources project(path: ':kotlin-stdlib', configuration: 'metadataSourcesElements')
commonSources project(path: ':kotlin-test', configuration: 'metadataSourcesElements')
@@ -48,12 +48,14 @@ dependencies {
kotlinNativeEmbedded(project(":kotlin-native:backend.native"))
kotlinNativeEmbedded(project(":kotlin-native:utilities:cli-runner"))
kotlinNativeEmbedded(project(":kotlin-native:klib"))
kotlinNativeEmbedded(project(":kotlin-native:backend.native", "cli_bcApiElements"))
kotlinNativeEmbedded(project(":native:cli-native"))
kotlinNativeEmbedded(project(":kotlin-native:endorsedLibraries:kotlinx.cli", "jvmRuntimeElements"))
kotlinNativeEmbedded(project(":kotlin-compiler")) { isTransitive = false }
kotlinNativeSources(project(":kotlin-native:backend.native"))
kotlinNativeSources(project(":native:cli-native"))
kotlinNativeJavadoc(project(":kotlin-native:backend.native"))
kotlinNativeJavadoc(project(":native:cli-native"))
testImplementation(libs.junit4)
testImplementation(kotlinTest("junit"))
@@ -7,6 +7,7 @@ plugins {
dependencies {
implementation(kotlinStdlib())
implementation(project(":kotlin-native:backend.native"))
implementation(project(":native:cli-native"))
implementation(project(":compiler:cli-common"))
implementation(project(":kotlin-native:Interop:StubGenerator"))
implementation(project(":kotlin-native:klib"))
+15
View File
@@ -0,0 +1,15 @@
plugins {
kotlin("jvm")
}
dependencies {
api(project(":kotlin-native:backend.native", "compilerApiElements"))
}
sourceSets {
"main" { projectDefault() }
"test" { none() }
}
sourcesJar()
javadocJar()
@@ -35,8 +35,9 @@ idePluginDependency {
proguardLibraryJars(project(":native:kotlin-native-utils")) { isTransitive = false }
proguardLibraryJars(project(":kotlin-native:backend.native", "kotlin_stdlib_jar"))
proguardLibraryJars(project(":kotlin-native:backend.native", "kotlin_reflect_jar"))
proguardLibraryJars(project(":kotlin-native:backend.native", "cli_bcApiElements"))
proguardLibraryJars(project(":native:cli-native"))
backendNativeSourcesConfiguration(project(":kotlin-native:backend.native"))
backendNativeSourcesConfiguration(project(":native:cli-native"))
}
noDefaultJar()
+1
View File
@@ -899,4 +899,5 @@ if (buildProperties.isKotlinNativeEnabled) {
include ':kotlin-native:backend.native:tests'
include ':kotlin-native:prepare:kotlin-native-compiler-embeddable'
include ':native:kotlin-test-native-xctest'
include ':native:cli-native'
}