[K/N][publish] Publish kotlin-native-compiler-embeddable.jar

Add an ability to publish kotlin-native-compiler-embeddable.jar and
sources to maven. Adds necessary for that sourcesJar and javadocJar
tasks. Note that Native distribution uses this jar without a version postfix.
Also cleaned up the obsolete backend.native publication and renamed 
project to match its name.


Merge-request: KT-MR-12974
Merged-by: Pavel Punegov <Pavel.Punegov@jetbrains.com>
This commit is contained in:
Pavel Punegov
2023-11-15 14:54:04 +00:00
committed by Space Team
parent 5562c95155
commit 9f9b4d1981
8 changed files with 87 additions and 53 deletions
+11 -2
View File
@@ -149,6 +149,11 @@ configurations {
attribute(Usage.USAGE_ATTRIBUTE, objects.named(Usage, CppUsage.LLVM_BITCODE))
}
}
embeddableJar {
canBeConsumed = false
canBeResolved = true
}
}
apply plugin: CompilationDatabasePlugin
@@ -170,6 +175,7 @@ dependencies {
compilationDatabase project(":kotlin-native:common")
compilationDatabase project(":kotlin-native:runtime")
runtimeBitcode project(":kotlin-native:runtime")
embeddableJar project(path: ':kotlin-native:prepare:kotlin-native-compiler-embeddable', configuration: 'runtimeElements')
}
apply plugin: GitClangFormatPlugin
@@ -246,7 +252,7 @@ tasks.register("distCompiler", Copy) {
enabled = false
} else {
dependsOn ':kotlin-native:shadowJar'
dependsOn ":kotlin-native-compiler-embeddable:kotlin-native-compiler-embeddable"
dependsOn configurations.embeddableJar
}
destinationDir distDir
@@ -259,7 +265,10 @@ tasks.register("distCompiler", Copy) {
into('konan/lib')
}
from(project(":kotlin-native-compiler-embeddable").file("build/libs")) {
from(configurations.embeddableJar) {
rename {
"kotlin-native-compiler-embeddable.jar"
}
into("konan/lib")
}