[K/N][build] Move Native plugin to build-tools

This is K/N only plugin that shouldn't be
in the buildSrc of the whole Kotlin project
This commit is contained in:
Pavel Punegov
2023-02-01 16:24:45 +01:00
committed by Space Team
parent 8938d5cc79
commit 71eaa43d95
6 changed files with 13 additions and 27 deletions
+1 -10
View File
@@ -140,13 +140,4 @@ tasks.withType<KotlinCompile>().configureEach {
allprojects { allprojects {
tasks.register("checkBuild") tasks.register("checkBuild")
} }
gradlePlugin {
plugins {
create("native") {
id = "native"
implementationClass = "org.jetbrains.gradle.plugins.tools.NativePlugin"
}
}
}
@@ -14,8 +14,8 @@
* limitations under the License. * limitations under the License.
*/ */
import org.jetbrains.gradle.plugins.tools.lib import org.jetbrains.kotlin.tools.lib
import org.jetbrains.gradle.plugins.tools.solib import org.jetbrains.kotlin.tools.solib
import org.jetbrains.kotlin.* import org.jetbrains.kotlin.*
import org.jetbrains.kotlin.konan.target.* import org.jetbrains.kotlin.konan.target.*
import org.jetbrains.kotlin.konan.target.ClangArgs import org.jetbrains.kotlin.konan.target.ClangArgs
@@ -26,7 +26,7 @@ plugins {
`kotlin` `kotlin`
id("kotlin.native.build-tools-conventions") id("kotlin.native.build-tools-conventions")
id("native-interop-plugin") id("native-interop-plugin")
`native` id("native")
} }
@@ -13,19 +13,14 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import org.jetbrains.gradle.plugins.tools.lib import org.jetbrains.kotlin.tools.lib
import org.jetbrains.gradle.plugins.tools.solib import org.jetbrains.kotlin.tools.solib
import org.jetbrains.kotlin.* import org.jetbrains.kotlin.*
val kotlinVersion = project.bootstrapKotlinVersion
plugins { plugins {
`native` kotlin
`kotlin` id("native")
} }
//apply plugin: 'c'
native { native {
val isWindows = PlatformInfo.isWindows() val isWindows = PlatformInfo.isWindows()
+1 -1
View File
@@ -1,7 +1,7 @@
import org.jetbrains.kotlin.cpp.CppConsumerPlugin import org.jetbrains.kotlin.cpp.CppConsumerPlugin
import org.jetbrains.kotlin.cpp.CppUsage import org.jetbrains.kotlin.cpp.CppUsage
import org.jetbrains.kotlin.cpp.DependencyHandlerExKt import org.jetbrains.kotlin.cpp.DependencyHandlerExKt
import org.jetbrains.gradle.plugins.tools.* import org.jetbrains.kotlin.tools.NativePluginKt
/* /*
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license * Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the LICENSE file. * that can be found in the LICENSE file.
@@ -1,9 +1,9 @@
/* /*
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors. * Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
package org.jetbrains.gradle.plugins.tools package org.jetbrains.kotlin.tools
import org.gradle.api.DefaultTask import org.gradle.api.DefaultTask
import org.gradle.api.Plugin import org.gradle.api.Plugin
@@ -14,14 +14,14 @@
* limitations under the License. * limitations under the License.
*/ */
import org.jetbrains.gradle.plugins.tools.lib import org.jetbrains.kotlin.tools.lib
import org.jetbrains.kotlin.* import org.jetbrains.kotlin.*
import org.jetbrains.kotlin.* import org.jetbrains.kotlin.*
import org.jetbrains.kotlin.konan.target.ClangArgs import org.jetbrains.kotlin.konan.target.ClangArgs
import org.jetbrains.kotlin.konan.target.HostManager import org.jetbrains.kotlin.konan.target.HostManager
plugins { plugins {
`native` id("native")
} }
val llvmDir = project.findProperty("llvmDir") val llvmDir = project.findProperty("llvmDir")