scala-android / sbt-android

An easy-to-use sbt plugin for working with all Android projects
Other
741 stars 94 forks source link

Scala 3 support? #345

Open Sintrastes opened 3 years ago

Sintrastes commented 3 years ago

Is there any chance that someone could look into supporting scala 3 projects with sbt-android?

Starting with the sbt-android example projects, and adding addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.5.0") and scalaVersion := "3.0.0-M3" I haven't been able to get this to work yet.

Has anyone been able to do this successfully yet? Is there more migration work that needs to be done to make this plugin support scala 3?

bohonghuang commented 3 years ago

I've tried out for some similar stuffs. I compiled some scala 3 code into a jar file, and involved it into an android project, but only to find segment fault always occurring in ART when executing scala code. It seems like android runtime doesn't fully support some features of java 8, even with d8 dexer. 😥

Sintrastes commented 3 years ago

@HuangBoHong Is this the case even on devices with api version 24 and above?

bohonghuang commented 3 years ago

@Sintrastes Yes. Tested on Android 9.0.

doofin commented 6 months ago

some references: https://developer.android.com/studio/write/java8-support https://github.com/scala-android/sbt-android/issues/334

doofin commented 6 months ago

Seems someone made it work https://github.com/chenakam/scalroid