[K/N] Enable AndroidProgramType.Standalone by default

^KT-49144 fixed.
This commit is contained in:
Sergey Bogolepov
2022-02-22 12:20:46 +03:00
committed by Space
parent faba9c4272
commit 2ecde3e831
3 changed files with 4 additions and 16 deletions
@@ -26,6 +26,6 @@ enum class AndroidProgramType(
NativeActivity(null, LinkerOutputKind.DYNAMIC_LIBRARY, true);
companion object {
val Default = NativeActivity
val Default = Standalone
}
}
@@ -304,20 +304,8 @@ class KonanConfig(val project: Project, val configuration: CompilerConfiguration
internal val entryPointName: String by lazy {
if (target.family == Family.ANDROID) {
val androidProgramTypeOrNull = configuration.get(BinaryOptions.androidProgramType)
if (androidProgramTypeOrNull == null) {
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
val androidProgramType = configuration.get(BinaryOptions.androidProgramType)
?: AndroidProgramType.Default
if (androidProgramType.konanMainOverride != null) {
return@lazy androidProgramType.konanMainOverride
}
@@ -18,7 +18,7 @@ enum class Family(
WATCHOS("kexe", "lib", "dylib", "lib", "a"),
LINUX("kexe", "lib", "so", "lib", "a"),
MINGW("exe", "", "dll", "lib", "a"),
ANDROID("so", "lib", "so", "lib", "a"),
ANDROID("kexe", "lib", "so", "lib", "a"),
WASM("wasm", "", "wasm", "", "wasm"),
ZEPHYR("o", "lib", "a", "lib", "a");