[K/N][build] Remove obsolete kotlin-native-shared project
This project was replaced by the :native:kotlin-native-utils located at native/utils. All sources were already merged. Merge-request: KT-MR-11847 Merged-by: Pavel Punegov <Pavel.Punegov@jetbrains.com>
This commit is contained in:
committed by
Space Team
parent
57294f91fe
commit
ecb6b5dc58
@@ -173,7 +173,6 @@ dependencies {
|
||||
compilerApi project(":compiler:fir:fir-serialization")
|
||||
compilerApi project(":compiler:fir:native")
|
||||
compilerApi project(":compiler:ir.psi2ir")
|
||||
compilerApi project(":kotlin-native-shared")
|
||||
use(IntellijDependenciesKt) {
|
||||
compilerApi(intellijCore())
|
||||
compileOnly(jpsModel())
|
||||
|
||||
@@ -57,8 +57,6 @@ dependencies {
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-metadata-klib:$metadataVersion")
|
||||
|
||||
implementation("org.jetbrains.kotlin:kotlin-util-klib:${project.bootstrapKotlinVersion}")
|
||||
|
||||
implementation(project(":kotlin-native-shared"))
|
||||
implementation(project(":kotlin-native-executors"))
|
||||
}
|
||||
|
||||
|
||||
@@ -2,5 +2,4 @@ cacheRedirectorEnabled=true
|
||||
bootstrap.kotlin.default.version=1.9.0-dev-877
|
||||
kotlin.build.gradlePlugin.version=0.0.39
|
||||
|
||||
kotlin.native.build.composite-bootstrap=true
|
||||
kotlin.native.enabled=true
|
||||
@@ -26,9 +26,6 @@ buildscript {
|
||||
}
|
||||
}
|
||||
|
||||
include(":kotlin-native-shared")
|
||||
project(":kotlin-native-shared").projectDir = File("$rootDir/../shared")
|
||||
|
||||
// This code could potentially remove the need of bootstrapping code that use util-klib and util-io
|
||||
// by building them, but it's not possible right now, because they use buildSrc plugins (like JPS) and methods (like commonDependency).
|
||||
// This could be fixed by replacing the buildSrc with the composite build like build-tools, and splitting it to several parts.
|
||||
|
||||
@@ -1,100 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2017 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
@file:Suppress("UnstableApiUsage")
|
||||
|
||||
import org.jetbrains.kotlin.gradle.plugin.extraProperties
|
||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
import java.util.*
|
||||
|
||||
plugins {
|
||||
id("kotlin")
|
||||
}
|
||||
|
||||
val rootBuildDirectory by extra(file(".."))
|
||||
apply(from = "../gradle/loadRootProperties.gradle")
|
||||
|
||||
group = "org.jetbrains.kotlin"
|
||||
|
||||
repositories {
|
||||
maven("https://cache-redirector.jetbrains.com/maven-central")
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
java {
|
||||
toolchain {
|
||||
languageVersion.set(JavaLanguageVersion.of(8))
|
||||
}
|
||||
}
|
||||
|
||||
kotlin {
|
||||
sourceSets {
|
||||
main {
|
||||
// TODO: All code was moved to utils. Bootstrap should be advanced to make these classes appear
|
||||
// in the bootstrap version of kotlin-native-utils. Only then this project should be removed, all usages
|
||||
// of `:kotlin-native-shared` should be replaced with `:native:kotlin-native-utils`
|
||||
kotlin.srcDir("../../native/utils/src")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType<KotlinCompile>().configureEach {
|
||||
kotlinOptions {
|
||||
languageVersion = "1.4"
|
||||
apiVersion = "1.4"
|
||||
allWarningsAsErrors = false
|
||||
jvmTarget = "1.8"
|
||||
freeCompilerArgs += "-Xskip-prerelease-check"
|
||||
}
|
||||
}
|
||||
|
||||
val isCompositeBootstrap = project.extraProperties.has("kotlin.native.build.composite-bootstrap")
|
||||
|
||||
/**
|
||||
* Depending on the `kotlin.native.build.composite-bootstrap` property returns either coordinates or the project dependency.
|
||||
*
|
||||
* It to use this project in composite build (build-tools) and as a project itself.
|
||||
* Project should depend on a current snapshot builds while build-tools use bootstrap dependencies.
|
||||
* TODO: finalize merge of this project with kotlin-native-utils to get rid of this hack
|
||||
*/
|
||||
fun compositeDependency(coordinates: String, subproject: String = ""): Any {
|
||||
val parts = coordinates.split(':')
|
||||
check(parts.size == 3) {
|
||||
"Full dependency coordinates should be specified group:name:version"
|
||||
}
|
||||
return if (!isCompositeBootstrap) {
|
||||
// returns dependency on the project specified with coordinates
|
||||
dependencies.project("$subproject:${parts[1]}")
|
||||
} else {
|
||||
// returns full coordinates
|
||||
coordinates
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation("org.jetbrains.kotlin:kotlin-stdlib:${project.bootstrapKotlinVersion}")
|
||||
api(compositeDependency("org.jetbrains.kotlin:kotlin-util-klib:${project.bootstrapKotlinVersion}"))
|
||||
api(compositeDependency("org.jetbrains.kotlin:kotlin-util-io:${project.bootstrapKotlinVersion}"))
|
||||
|
||||
if (!isCompositeBootstrap) {
|
||||
val versionProperties = Properties()
|
||||
project.rootProject.projectDir.resolve("gradle/versions.properties").inputStream().use { propInput ->
|
||||
versionProperties.load(propInput)
|
||||
}
|
||||
val platformVersion = versionProperties["versions.junit-bom"]
|
||||
testApi(platform("org.junit:junit-bom:$platformVersion"))
|
||||
testApi("org.junit.jupiter:junit-jupiter")
|
||||
}
|
||||
}
|
||||
@@ -24,5 +24,5 @@ dependencies {
|
||||
implementation project(':kotlin-native:klib')
|
||||
implementation project(":kotlin-native:utilities:basic-utils")
|
||||
implementation project(path: ":kotlin-native:endorsedLibraries:kotlinx.cli", configuration: "jvmRuntimeElements")
|
||||
implementation project(":kotlin-native-shared")
|
||||
implementation project(":native:kotlin-native-utils")
|
||||
}
|
||||
|
||||
@@ -26,11 +26,7 @@ dependencies {
|
||||
}
|
||||
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.0")
|
||||
if (kotlinBuildProperties.isKotlinNativeEnabled) {
|
||||
implementation(project(":kotlin-native-shared"))
|
||||
} else {
|
||||
implementation(project(":native:kotlin-native-utils"))
|
||||
}
|
||||
implementation("org.jetbrains.kotlin:kotlin-native-utils:${project.bootstrapKotlinVersion}")
|
||||
}
|
||||
|
||||
group = "org.jetbrains.kotlin"
|
||||
|
||||
@@ -30,7 +30,7 @@ idePluginDependency {
|
||||
dependencies {
|
||||
embedded(project(":kotlin-native:backend.native")) { isTransitive = false }
|
||||
|
||||
proguardLibraryJars(project(":kotlin-native-shared")) { isTransitive = false }
|
||||
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"))
|
||||
|
||||
@@ -861,6 +861,4 @@ if (buildProperties.isKotlinNativeEnabled) {
|
||||
include ':kotlin-native:backend.native:tests'
|
||||
include ":kotlin-native-compiler-embeddable"
|
||||
project(":kotlin-native-compiler-embeddable").projectDir = "$rootDir/kotlin-native/prepare/kotlin-native-embeddable-compiler" as File
|
||||
include ':kotlin-native-shared'
|
||||
project(":kotlin-native-shared").projectDir = "$rootDir/kotlin-native/shared" as File
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user