refactor: move logic to core module

This commit is contained in:
Cilly Leang 2026-01-23 19:05:25 +11:00
parent f3fca134c7
commit dae42c48f2
Signed by: cilly
GPG key ID: 6500251E087653C9
13 changed files with 75 additions and 24 deletions

View file

@ -0,0 +1,9 @@
package moe.lava.neon.core
import android.os.Build
class AndroidPlatform : Platform {
override val name: String = "Android ${Build.VERSION.SDK_INT}"
}
actual fun getPlatform(): Platform = AndroidPlatform()

View file

@ -0,0 +1,7 @@
package moe.lava.neon.core
interface Platform {
val name: String
}
expect fun getPlatform(): Platform

View file

@ -0,0 +1,7 @@
package moe.lava.neon.core
class JVMPlatform : Platform {
override val name: String = "Java ${System.getProperty("java.version")}"
}
actual fun getPlatform(): Platform = JVMPlatform()