diff --git a/buildSrc/src/main/kotlin/common-configuration.gradle.kts b/buildSrc/src/main/kotlin/common-configuration.gradle.kts index 835416d9a1b..b04270c8bda 100644 --- a/buildSrc/src/main/kotlin/common-configuration.gradle.kts +++ b/buildSrc/src/main/kotlin/common-configuration.gradle.kts @@ -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") { diff --git a/kotlin-native/backend.native/build.gradle b/kotlin-native/backend.native/build.gradle index d8c1a94d528..ebdc6f01a18 100644 --- a/kotlin-native/backend.native/build.gradle +++ b/kotlin-native/backend.native/build.gradle @@ -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' } diff --git a/kotlin-native/build-tools/src/main/groovy/org/jetbrains/kotlin/NativeInteropPlugin.groovy b/kotlin-native/build-tools/src/main/groovy/org/jetbrains/kotlin/NativeInteropPlugin.groovy index e12f7d97938..d5237305e5d 100644 --- a/kotlin-native/build-tools/src/main/groovy/org/jetbrains/kotlin/NativeInteropPlugin.groovy +++ b/kotlin-native/build-tools/src/main/groovy/org/jetbrains/kotlin/NativeInteropPlugin.groovy @@ -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( diff --git a/kotlin-native/common/build.gradle.kts b/kotlin-native/common/build.gradle.kts index a20286126a7..1c04fbe687e 100644 --- a/kotlin-native/common/build.gradle.kts +++ b/kotlin-native/common/build.gradle.kts @@ -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("clean") { + delete(buildDir) } diff --git a/libraries/examples/kotlin-gradle-subplugin-example/build.gradle b/libraries/examples/kotlin-gradle-subplugin-example/build.gradle index 3f41b5e5fdc..057e41b1ef8 100644 --- a/libraries/examples/kotlin-gradle-subplugin-example/build.gradle +++ b/libraries/examples/kotlin-gradle-subplugin-example/build.gradle @@ -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 {