[K/N] Enable AndroidProgramType.Standalone by default
^KT-49144 fixed.
This commit is contained in:
+1
-1
@@ -26,6 +26,6 @@ enum class AndroidProgramType(
|
|||||||
NativeActivity(null, LinkerOutputKind.DYNAMIC_LIBRARY, true);
|
NativeActivity(null, LinkerOutputKind.DYNAMIC_LIBRARY, true);
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
val Default = NativeActivity
|
val Default = Standalone
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+2
-14
@@ -304,20 +304,8 @@ class KonanConfig(val project: Project, val configuration: CompilerConfiguration
|
|||||||
|
|
||||||
internal val entryPointName: String by lazy {
|
internal val entryPointName: String by lazy {
|
||||||
if (target.family == Family.ANDROID) {
|
if (target.family == Family.ANDROID) {
|
||||||
val androidProgramTypeOrNull = configuration.get(BinaryOptions.androidProgramType)
|
val androidProgramType = configuration.get(BinaryOptions.androidProgramType)
|
||||||
if (androidProgramTypeOrNull == null) {
|
?: AndroidProgramType.Default
|
||||||
configuration.report(CompilerMessageSeverity.WARNING, """
|
|
||||||
Android Native executables are currently built as shared libraries with NativeActivity support, but the default behavior is going to change in 1.7.0 to build regular executables instead.
|
|
||||||
To keep using NativeActivity support, add binaryOptions["androidProgramType"] = "nativeActivity" to your androidNative executable configuration block in Gradle script:
|
|
||||||
binaries {
|
|
||||||
executable {
|
|
||||||
binaryOptions["androidProgramType"] = "nativeActivity"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
See https://youtrack.jetbrains.com/issue/KT-49406 for more details.
|
|
||||||
""".trimIndent())
|
|
||||||
}
|
|
||||||
val androidProgramType = androidProgramTypeOrNull ?: AndroidProgramType.Default
|
|
||||||
if (androidProgramType.konanMainOverride != null) {
|
if (androidProgramType.konanMainOverride != null) {
|
||||||
return@lazy androidProgramType.konanMainOverride
|
return@lazy androidProgramType.konanMainOverride
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ enum class Family(
|
|||||||
WATCHOS("kexe", "lib", "dylib", "lib", "a"),
|
WATCHOS("kexe", "lib", "dylib", "lib", "a"),
|
||||||
LINUX("kexe", "lib", "so", "lib", "a"),
|
LINUX("kexe", "lib", "so", "lib", "a"),
|
||||||
MINGW("exe", "", "dll", "lib", "a"),
|
MINGW("exe", "", "dll", "lib", "a"),
|
||||||
ANDROID("so", "lib", "so", "lib", "a"),
|
ANDROID("kexe", "lib", "so", "lib", "a"),
|
||||||
WASM("wasm", "", "wasm", "", "wasm"),
|
WASM("wasm", "", "wasm", "", "wasm"),
|
||||||
ZEPHYR("o", "lib", "a", "lib", "a");
|
ZEPHYR("o", "lib", "a", "lib", "a");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user