These are chat archives for scala-android/sbt-android

27th
Jul 2016
Wei Zhao
@fishmacs
Jul 27 2016 04:20
Hi, what if one of dependencied library in my project is jdk 1.8 compiled?
it is not listed in build.sbt, just used by aother library
should I specify an old version explicitly in build.sbt?
Perry
@pfn
Jul 27 2016 04:24
@fishmacs, if the library using java8 isn't using new apis, then you can set retrolambdaEnabled := true
if it uses new apis, then you must use an older library
Wei Zhao
@fishmacs
Jul 27 2016 04:27
@pfn Thanks!
BTW, will sbt-android support Jack?
Perry
@pfn
Jul 27 2016 04:35
there's a pr for it for work in progress submitted by @dant3, but at the moment and for the foreseeable future, there is no reason to run jack
Wei Zhao
@fishmacs
Jul 27 2016 04:42
no reason? really?
Perry
@pfn
Jul 27 2016 04:57
what reason do you think there is to use jack?
Wei Zhao
@fishmacs
Jul 27 2016 04:59
En…I don’t know, but I think it’s official...
Perry
@pfn
Jul 27 2016 05:00
that doesn't mean much
the only reason to consider using it is if google abandons dx
Wei Zhao
@fishmacs
Jul 27 2016 05:04
yeah…seems not very possible
Supporting jack is difficult, right? because there is no tool convert scala to dex directly.
Perry
@pfn
Jul 27 2016 05:10
huh? supporting jack has nothing to do with scala
jack is a java compiler
Wei Zhao
@fishmacs
Jul 27 2016 05:11
Yeah, we need scala->class->dex,but jack is java-dex directly
so maybe scala-java->sex?
Perry
@pfn
Jul 27 2016 05:14
scala cannot be converted to java
java cannot express scala constructs
Wei Zhao
@fishmacs
Jul 27 2016 05:42
So, no obvious way for scala
Perry
@pfn
Jul 27 2016 05:49
obvious way for what?
Rafal Wachol
@charafau
Jul 27 2016 05:49
Jack is not official yet
it's experimental
Wei Zhao
@fishmacs
Jul 27 2016 05:49
@pfn convert scala to dex, no dx, proguard,...
Rafal Wachol
@charafau
Jul 27 2016 05:50
someone should write plugin like scala.js, so compiler would create dx code :D
Perry
@pfn
Jul 27 2016 05:50
@fishmacs, it's impossible for a whole host of reasons
you can't say no dx
Rafal Wachol
@charafau
Jul 27 2016 05:50
yep, that would be difficult
Perry
@pfn
Jul 27 2016 05:50
and you can. never compile scala directly to dex
Rafal Wachol
@charafau
Jul 27 2016 05:51
@pfn you could, if you would write something like scala.js
scala.dx :D
Perry
@pfn
Jul 27 2016 05:51
has nothing to do with difficult, there is no advantage, unlike scalajs, unless you want to throw away all java interop
Rafal Wachol
@charafau
Jul 27 2016 05:51
I know there's no point in doing that
Perry
@pfn
Jul 27 2016 05:51
scalajs has no java interop, which makes it possible
that doesn't work for scala-android
you will always require a dex step no matter what
unless you never use support-v4, appcompat-v7, or any other library
Rafal Wachol
@charafau
Jul 27 2016 05:54
btw coursier works for me with sbt .12
Perry
@pfn
Jul 27 2016 05:54
if you can afford minsdk 21 then it becomes a little more possible, each library would be turned to dex individually
and it can be loaded. natively
Rafal Wachol
@charafau
Jul 27 2016 05:56
yep
I still know companies who support sdk 8
and 14
Wei Zhao
@fishmacs
Jul 27 2016 07:00
is protify another instant run?
Rafal Wachol
@charafau
Jul 27 2016 07:03
but better
Wei Zhao
@fishmacs
Jul 27 2016 07:28
detail?
instant run does not work on scald-android, right?
Rafal Wachol
@charafau
Jul 27 2016 07:29
no, instant run doesnt work in all cases, but protify works in android < 5 and more often
also, you can do ~protify and have instant xml layout refresh like in html :)
Wei Zhao
@fishmacs
Jul 27 2016 07:30
how about android >= 5?
Rafal Wachol
@charafau
Jul 27 2016 07:31
of course it works for >= 5 too
Wei Zhao
@fishmacs
Jul 27 2016 07:32
my fool :smile:
aren't we supposed to use Jill for Scala?
Jack is the compiler for source code, Jill is the compiler from class files
so why the discussion about Jack?
Wei Zhao
@fishmacs
Jul 27 2016 15:06
yes, should be jill
Rafal Wachol
@charafau
Jul 27 2016 16:57
Jack & Jill is an combo, if you use Jack, then you're using Jill automatically
ouch. I missclicked.
again. I wanted to say that without the 'exclude ...' it fails with OOM at kotlin/extension-android when packaging apk. Seems like it tires to pack kotlin-compiler-embedded.jar too.
Perry
@pfn
Jul 27 2016 22:43
you mean the test does?
hmm, it shouldn't that's weird...
Daniil Sivak
@seroperson
Jul 27 2016 22:46
yes