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 {
|
dependencies {
|
||||||
constraints {
|
constraints {
|
||||||
configurations.all {
|
configurations.all {
|
||||||
if (isCanBeResolved) {
|
if (isCanBeResolved && !isCanBeConsumed) {
|
||||||
allDependencies.configureEach {
|
allDependencies.configureEach {
|
||||||
if (group == "com.google.code.gson" && name == "gson") {
|
if (group == "com.google.code.gson" && name == "gson") {
|
||||||
this@constraints.add(this@all.name, "com.google.code.gson: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) {
|
task debugCompiler(type: JavaExec) {
|
||||||
dependsOn ':dist'
|
dependsOn ':dist'
|
||||||
main = 'org.jetbrains.kotlin.cli.bc.K2NativeKt'
|
mainClass = 'org.jetbrains.kotlin.cli.bc.K2NativeKt'
|
||||||
classpath = project.fileTree("${distDir.canonicalPath}/konan/lib/") {
|
classpath = project.fileTree("${distDir.canonicalPath}/konan/lib/") {
|
||||||
include '*.jar'
|
include '*.jar'
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -198,7 +198,7 @@ class NamedNativeInteropConfig implements Named {
|
|||||||
dependsOn ":kotlin-native:Interop:Indexer:nativelibs"
|
dependsOn ":kotlin-native:Interop:Indexer:nativelibs"
|
||||||
dependsOn ":kotlin-native:Interop:Runtime:nativelibs"
|
dependsOn ":kotlin-native:Interop:Runtime:nativelibs"
|
||||||
classpath = project.configurations.interopStubGenerator
|
classpath = project.configurations.interopStubGenerator
|
||||||
main = "org.jetbrains.kotlin.native.interop.gen.jvm.MainKt"
|
mainClass = "org.jetbrains.kotlin.native.interop.gen.jvm.MainKt"
|
||||||
jvmArgs '-ea'
|
jvmArgs '-ea'
|
||||||
|
|
||||||
systemProperties "java.library.path" : project.files(
|
systemProperties "java.library.path" : project.files(
|
||||||
|
|||||||
@@ -28,12 +28,10 @@ bitcode {
|
|||||||
|
|
||||||
val hostName: String by project
|
val hostName: String by project
|
||||||
|
|
||||||
val build by tasks.registering {
|
tasks.register("build") {
|
||||||
dependsOn("${hostName}Common")
|
dependsOn("${hostName}Common")
|
||||||
}
|
}
|
||||||
|
|
||||||
val clean by tasks.registering {
|
tasks.register<Delete>("clean") {
|
||||||
doFirst {
|
delete(buildDir)
|
||||||
delete(buildDir)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -72,11 +72,9 @@ configurations[sourceSet.runtimeElementsConfigurationName].artifacts.removeAll {
|
|||||||
configurations[sourceSet.apiElementsConfigurationName].artifacts.removeAll { true }
|
configurations[sourceSet.apiElementsConfigurationName].artifacts.removeAll { true }
|
||||||
|
|
||||||
// Adding instead artifact from shadow jar task
|
// Adding instead artifact from shadow jar task
|
||||||
configurations {
|
artifacts {
|
||||||
artifacts {
|
add(sourceSet.runtimeElementsConfigurationName, shadowJarTask)
|
||||||
add(sourceSet.runtimeElementsConfigurationName, shadowJarTask)
|
add(sourceSet.apiElementsConfigurationName, shadowJarTask)
|
||||||
add(sourceSet.apiElementsConfigurationName, shadowJarTask)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
publishing {
|
publishing {
|
||||||
|
|||||||
Reference in New Issue
Block a user