[Gradle, K/N] Move NativeBinaryTypes from kotlin-gradle-plugin to kotlin-gradle-plugin-api
This commit is contained in:
@@ -11,7 +11,8 @@ publish()
|
||||
standardPublicJars()
|
||||
|
||||
dependencies {
|
||||
compile(kotlinStdlib())
|
||||
implementation(kotlinStdlib())
|
||||
implementation(project(":native:kotlin-native-utils"))
|
||||
|
||||
compileOnly(gradleApi())
|
||||
compileOnly("com.android.tools.build:gradle:0.4.2")
|
||||
|
||||
+16
-1
@@ -1,8 +1,12 @@
|
||||
/*
|
||||
* Copyright 2010-2021 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.
|
||||
*/
|
||||
|
||||
@file:Suppress("PackageDirectoryMismatch") // Old package for compatibility
|
||||
package org.jetbrains.kotlin.gradle.plugin.mpp
|
||||
|
||||
import org.gradle.api.Named
|
||||
import org.jetbrains.kotlin.gradle.plugin.mpp.Framework.BitcodeEmbeddingMode
|
||||
import org.jetbrains.kotlin.konan.target.Architecture.ARM32
|
||||
import org.jetbrains.kotlin.konan.target.Architecture.ARM64
|
||||
import org.jetbrains.kotlin.konan.target.CompilerOutputKind
|
||||
@@ -71,4 +75,15 @@ enum class NativeOutputKind(
|
||||
};
|
||||
|
||||
open fun availableFor(target: KonanTarget) = true
|
||||
}
|
||||
|
||||
enum class BitcodeEmbeddingMode {
|
||||
/** Don't embed LLVM IR bitcode. */
|
||||
DISABLE,
|
||||
|
||||
/** Embed LLVM IR bitcode as data. */
|
||||
BITCODE,
|
||||
|
||||
/** Embed placeholder LLVM IR data as a marker. */
|
||||
MARKER,
|
||||
}
|
||||
@@ -42,7 +42,6 @@ dependencies {
|
||||
|
||||
compile(kotlinStdlib())
|
||||
compile(project(":kotlin-util-klib"))
|
||||
compileOnly(project(":native:kotlin-native-utils"))
|
||||
compileOnly(project(":kotlin-reflect-api"))
|
||||
compileOnly(project(":kotlin-android-extensions"))
|
||||
compileOnly(project(":kotlin-build-common"))
|
||||
|
||||
-11
@@ -270,17 +270,6 @@ class Framework(
|
||||
*/
|
||||
var isStatic = false
|
||||
|
||||
enum class BitcodeEmbeddingMode {
|
||||
/** Don't embed LLVM IR bitcode. */
|
||||
DISABLE,
|
||||
|
||||
/** Embed LLVM IR bitcode as data. */
|
||||
BITCODE,
|
||||
|
||||
/** Embed placeholder LLVM IR data as a marker. */
|
||||
MARKER,
|
||||
}
|
||||
|
||||
companion object {
|
||||
val frameworkTargets = Attribute.of(
|
||||
"org.jetbrains.kotlin.native.framework.targets",
|
||||
|
||||
+4
-4
@@ -578,8 +578,8 @@ open class KotlinNativeLink : AbstractKotlinNativeCompile<KotlinCommonToolOption
|
||||
}
|
||||
|
||||
@get:Input
|
||||
val embedBitcode: Framework.BitcodeEmbeddingMode by project.provider {
|
||||
(binary as? Framework)?.embedBitcode ?: Framework.BitcodeEmbeddingMode.DISABLE
|
||||
val embedBitcode: BitcodeEmbeddingMode by project.provider {
|
||||
(binary as? Framework)?.embedBitcode ?: BitcodeEmbeddingMode.DISABLE
|
||||
}
|
||||
|
||||
override fun buildCompilerArgs(): List<String> = mutableListOf<String>().apply {
|
||||
@@ -590,8 +590,8 @@ open class KotlinNativeLink : AbstractKotlinNativeCompile<KotlinCommonToolOption
|
||||
addKey("-tr", processTests)
|
||||
addArgIfNotNull("-entry", entryPoint)
|
||||
when (embedBitcode) {
|
||||
Framework.BitcodeEmbeddingMode.MARKER -> add("-Xembed-bitcode-marker")
|
||||
Framework.BitcodeEmbeddingMode.BITCODE -> add("-Xembed-bitcode")
|
||||
BitcodeEmbeddingMode.MARKER -> add("-Xembed-bitcode-marker")
|
||||
BitcodeEmbeddingMode.BITCODE -> add("-Xembed-bitcode")
|
||||
else -> { /* Do nothing. */
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user