https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
b

Big Chungus

01/03/2020, 10:44 AM
Is there a way to obtain platformName in code without manually declaring
expect val platform:String
?
m

Mikołaj Kąkol

01/03/2020, 10:51 AM
maybe from gradle you could get it from target name, and then with https://github.com/yshrsmz/BuildKonfig add it code
b

Big Chungus

01/03/2020, 10:52 AM
I'm looking for runtime-only way
d

Dominaezzz

01/03/2020, 12:06 PM
Yes there's a
Platform
class.
It only works on native though.
a

altavir

01/03/2020, 1:23 PM
You can use expect/actual constant for that
4 Views