Skip to content

Navigation Menu

Sign inAppearance settings
Appearance settings

Commit 69a4467

Browse filesBrowse the repository at this point in the historyBrowse files
SvyatoslavScherbinaSpace Team
authored andcommitted
[K/N] Remove kotlin-native.jar from the dist
The K/N distribution contains two jars with compiler code: * konan/lib/kotlin-native.jar * konan/lib/kotlin-native-compiler-embeddable.jar The former is basically a legacy version of the latter. It is used only by KGP when `kotlin.native.useEmbeddableCompilerJar=false` is set. Since this flag is no longer supported (KT-51301), it is safe to remove the jar from the distribution. This commit does that. As a nice side effect, it also noticeably reduces the size of the distribution. ^KT-77783 Fixed
1 parent 992e70a commit 69a4467
Copy full SHA for 69a4467

1 file changed

-18Lines changed: 0 additions & 18 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎kotlin-native/build.gradle‎

Copy file name to clipboardExpand all lines: kotlin-native/build.gradle
-18Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ import org.jetbrains.kotlin.nativeDistribution.NativeProtoDistributionKt
2929
import org.jetbrains.kotlin.nativeDistribution.PrepareDistributionFingerprint
3030
import org.jetbrains.kotlin.nativeDistribution.PrepareKonanProperties
3131
import org.jetbrains.kotlin.xcode.XcodeOverridePlugin
32-
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
3332
import org.jetbrains.kotlin.UtilsKt
3433
import plugins.KotlinBuildPublishingPluginKt
3534
import java.security.MessageDigest
@@ -42,10 +41,6 @@ buildscript {
4241
mavenCentral()
4342
gradlePluginPortal()
4443
}
45-
46-
dependencies {
47-
classpath libs.shadow.gradlePlugin
48-
}
4944
}
5045

5146
defaultTasks 'clean', 'dist'
@@ -76,7 +71,6 @@ def cacheableTargetNames = platformManager.hostPlatform.cacheableTargets
7671
def nativeDistribution = NativeDistributionKt.getNativeDistribution(project)
7772

7873
configurations {
79-
distPack
8074
commonSources
8175

8276
runtimeBitcode {
@@ -112,7 +106,6 @@ configurations {
112106
apply plugin: CompilationDatabasePlugin
113107

114108
dependencies {
115-
distPack project(path: ':kotlin-native:utilities:cli-runner', configuration: 'runtimeElements')
116109
commonSources project(path: ':kotlin-stdlib', configuration: 'metadataSourcesElements')
117110
commonSources project(path: ':kotlin-test', configuration: 'metadataSourcesElements')
118111
compilationDatabase project(":kotlin-native:runtime")
@@ -181,16 +174,6 @@ tasks.register("distSources") {
181174
dependsOn(distNativeSources)
182175
}
183176

184-
def shadowJar = tasks.register("shadowJar", ShadowJar) {
185-
mergeServiceFiles()
186-
destinationDirectory.set(layout.buildDirectory)
187-
archiveBaseName.set("kotlin-native")
188-
archiveVersion.set("")
189-
archiveClassifier.set("")
190-
exclude("META-INF/versions/9/module-info.class")
191-
configurations = [project.configurations.distPack]
192-
}
193-
194177
tasks.register("distCompiler") {
195178
// Workaround: make distCompiler no-op if we are using custom dist:
196179
// the dist is already in place and has the compiler, so we don't have to
@@ -253,7 +236,6 @@ tasks.register("distNativeLibs", Sync) {
253236
}
254237

255238
tasks.register("distCompilerJars", Sync) {
256-
from(shadowJar.map { it.archiveFile })
257239
from(configurations.embeddableJar) {
258240
rename {
259241
"kotlin-native-compiler-embeddable.jar"

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.