Fix gradle deprecations in Kotlin Native
Merge-request: KT-MR-10267 Merged-by: Cristian Garcia <Cristian.Garcia-Marin@jetbrains.com>
This commit is contained in:
committed by
Space Team
parent
20d8f54ea3
commit
d32d5346a2
@@ -12,7 +12,7 @@ val gsonVersion = rootProject.extra["versions.gson"] as String
|
||||
dependencies {
|
||||
constraints {
|
||||
configurations.all {
|
||||
if (isCanBeResolved) {
|
||||
if (isCanBeResolved && !isCanBeConsumed) {
|
||||
allDependencies.configureEach {
|
||||
if (group == "com.google.code.gson" && name == "gson") {
|
||||
this@constraints.add(this@all.name, "com.google.code.gson:gson") {
|
||||
|
||||
@@ -225,7 +225,7 @@ task external_jars(type: Copy) {
|
||||
|
||||
task debugCompiler(type: JavaExec) {
|
||||
dependsOn ':dist'
|
||||
main = 'org.jetbrains.kotlin.cli.bc.K2NativeKt'
|
||||
mainClass = 'org.jetbrains.kotlin.cli.bc.K2NativeKt'
|
||||
classpath = project.fileTree("${distDir.canonicalPath}/konan/lib/") {
|
||||
include '*.jar'
|
||||
}
|
||||
|
||||
+1
-1
@@ -198,7 +198,7 @@ class NamedNativeInteropConfig implements Named {
|
||||
dependsOn ":kotlin-native:Interop:Indexer:nativelibs"
|
||||
dependsOn ":kotlin-native:Interop:Runtime:nativelibs"
|
||||
classpath = project.configurations.interopStubGenerator
|
||||
main = "org.jetbrains.kotlin.native.interop.gen.jvm.MainKt"
|
||||
mainClass = "org.jetbrains.kotlin.native.interop.gen.jvm.MainKt"
|
||||
jvmArgs '-ea'
|
||||
|
||||
systemProperties "java.library.path" : project.files(
|
||||
|
||||
@@ -28,12 +28,10 @@ bitcode {
|
||||
|
||||
val hostName: String by project
|
||||
|
||||
val build by tasks.registering {
|
||||
tasks.register("build") {
|
||||
dependsOn("${hostName}Common")
|
||||
}
|
||||
|
||||
val clean by tasks.registering {
|
||||
doFirst {
|
||||
delete(buildDir)
|
||||
}
|
||||
tasks.register<Delete>("clean") {
|
||||
delete(buildDir)
|
||||
}
|
||||
|
||||
@@ -72,11 +72,9 @@ configurations[sourceSet.runtimeElementsConfigurationName].artifacts.removeAll {
|
||||
configurations[sourceSet.apiElementsConfigurationName].artifacts.removeAll { true }
|
||||
|
||||
// Adding instead artifact from shadow jar task
|
||||
configurations {
|
||||
artifacts {
|
||||
add(sourceSet.runtimeElementsConfigurationName, shadowJarTask)
|
||||
add(sourceSet.apiElementsConfigurationName, shadowJarTask)
|
||||
}
|
||||
artifacts {
|
||||
add(sourceSet.runtimeElementsConfigurationName, shadowJarTask)
|
||||
add(sourceSet.apiElementsConfigurationName, shadowJarTask)
|
||||
}
|
||||
|
||||
publishing {
|
||||
|
||||
Reference in New Issue
Block a user