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

22nd
Mar 2017
Rafal Wachol
@charafau
Mar 22 2017 05:23
anyone tried scala 2.12 yet with preview ?
Rafal Wachol
@charafau
Mar 22 2017 08:18
image doesnt work for me ;(
Niklas Klein
@Taig
Mar 22 2017 15:18
What is the best way to add the android.jar to the test classpath (for mockito)?
Perry
@pfn
Mar 22 2017 15:20
@Taig, search mockable in closed issues
then add that result to unmanagedJars in Test
oh, iota rc2 is out and fixes some good stuff @Taig
Niklas Klein
@Taig
Mar 22 2017 15:23
Oh, I assumed it would be enough to have $ANDROID_HOME/platforms/android-25/android.jar on the classpath. I'll take a look at the JarGenerator.
I'm following the iota development closely, but still didn't have an opportunity to try it :/
Perry
@pfn
Mar 22 2017 15:25
much of android.jar can't be mocked because of final, mockable-android.jar fixes that (removes all final) so that mocking frameworks can do their thing
but yeah, unmanagedJars in Test += generateMockableJar.value (from #171) should work
@taig how have the typedviewholders been working out? there's a lot of overlap there and viewtree (both provide strongly-typed view tree navigation)
Niklas Klein
@Taig
Mar 22 2017 15:30
I'm still using them a lot. I especially like how it knows how to handle includes.
Perry
@pfn
Mar 22 2017 15:31
yeah, hard to find a reason to use viewtree if one is already using typed view holders (xml layouts have their advantages--faster protify is one)
Niklas Klein
@Taig
Mar 22 2017 15:33
When defining widgets (which I do a lot), I almost always define the root element as <merge> and wrap the xml file with a custom View class. That's a lot of annoying boilerplate and I really want to ditch that with viewtree.
For common screen/layout definitions however, typed view holders are super convenient
Niklas Klein
@Taig
Mar 22 2017 15:44
The mocking jar generation works perfectly by the way :thumbsup:
Perry
@pfn
Mar 22 2017 15:45
I forget if MockableJarGenerator does dirty detection, so you might want to wrap that in FileFunctions.cached
Perry
@pfn
Mar 22 2017 16:35
@charafau build-tools preview isn't out yet, so you can't try
Rafal Wachol
@charafau
Mar 22 2017 16:53
@pfn isnt it for android studio preview ?
let me check i jsut installed it
Perry
@pfn
Mar 22 2017 16:53
no, it's build tools
android studio is irrelevant
unless they're not shipping build-tools preview via sdk manager
Rafal Wachol
@charafau
Mar 22 2017 16:55
I have 26.0.0-rc1
not sure what's inside since emulator for O doesnt work for me
Perry
@pfn
Mar 22 2017 16:58
shouldn't need emulator to try out the java 8 support
Rafal Wachol
@charafau
Mar 22 2017 16:58
hmm from what I know, new methods are added in O
Perry
@pfn
Mar 22 2017 16:58
new methods are, but the dx support is what's interesting
huh, 26 rc1 shows in sdk manager, but not under android-install ... why
Rafal Wachol
@charafau
Mar 22 2017 17:00
maybe you need to specify that you want preview ?
Perry
@pfn
Mar 22 2017 17:01
val newpkgs = repomanager.getPackages.getNewPkgs.asScala.filterNot(_.obsolete).toList.sorted(platformOrder)
nope, there's none of that...
meh, preview is default false... or something
Perry
@pfn
Mar 22 2017 17:08
26.0.0-preview $ ./dx --dex ~/.ivy2/cache/org.scala-lang/scala-library/jars/scala-library-2.12.1.jar out

PARSE ERROR:
MethodHandle not supported
...while preparsing cst 0045 at offset 000007cd
...while parsing scala/App.class
1 error; aborting
Rafal Wachol
@charafau
Mar 22 2017 17:08
ah you were faster than me
Perry
@pfn
Mar 22 2017 17:13
oh well, too lazy to figure out why preview doesn't show up, it should....
Rafal Wachol
@charafau
Mar 22 2017 17:14
Warning: scala.util.hashing.MurmurHash3: can't find referenced class java.lang.invoke.LambdaMetafactory
Warning: scala.util.hashing.MurmurHash3: can't find referenced class java.lang.invoke.LambdaMetafactory
Warning: scala.util.hashing.MurmurHash3: can't find referenced class java.lang.invoke.SerializedLambda
Warning: scala.util.hashing.MurmurHash3: can't find referenced class java.lang.invoke.SerializedLambda
Warning: scala.util.matching.Regex: can't find referenced class java.lang.invoke.LambdaMetafactory
Warning: scala.util.matching.Regex: can't find referenced class java.lang.invoke.LambdaMetafactory
Warning: scala.util.matching.Regex: can't find referenced class java.lang.invoke.SerializedLambda
Warning: scala.util.matching.Regex: can't find referenced class java.lang.invoke.SerializedLambda
Warning: scala.util.matching.Regex$Groups$: can't find referenced class java.lang.invoke.LambdaMetafactory
Warning: scala.util.matching.Regex$Groups$: can't find referenced class java.lang.invoke.LambdaMetafactory
Warning: scala.util.matching.Regex$Groups$: can't find referenced class java.lang.invoke.SerializedLambda
Warning: scala.util.matching.Regex$Groups$: can't find referenced class java.lang.invoke.SerializedLambda
Warning: scala.util.matching.Regex$Match: can't find referenced class java.lang.invoke.LambdaMetafactory
Warning: scala.util.matching.Regex$Match: can't find referenced class java.lang.invoke.LambdaMetafactory
Warning: scala.util.matching.Regex$Match: can't find referenced class java.lang.invoke.SerializedLambda
Warning: scala.util.matching.Regex$Match: can't find referenced class java.lang.invoke.SerializedLambda
Warning: scala.util.matching.Regex$MatchData: can't find referenced class java.lang.invoke.LambdaMetafactory
Warning: scala.util.matching.Regex$MatchData: can't find referenced class java.lang.invoke.LambdaMetafactory
Warning: scala.util.matching.Regex$MatchData: can't find referenced class java.lang.invoke.SerializedLambda
Warning: scala.util.matching.Regex$MatchData: can't find referenced class java.lang.invoke.SerializedLambda
ok, so let's issue :D
Perry
@pfn
Mar 22 2017 17:14
well, not gonna bother testing it in sbt-android until dx works
once dx works, then we can proceed
Rafal Wachol
@charafau
Mar 22 2017 17:15
dont know who I can ping to ask about this issue
Perry
@pfn
Mar 22 2017 17:16
about what?
Rafal Wachol
@charafau
Mar 22 2017 17:16
java.lang.invoke support
Perry
@pfn
Mar 22 2017 17:16
it'll be in android-O
Rafal Wachol
@charafau
Mar 22 2017 17:16
you think so?
Perry
@pfn
Mar 22 2017 17:16
O preview announcement said so
Rafal Wachol
@charafau
Mar 22 2017 17:17
ok...
hope you're not mistaken ;)
I dont see LambdaMetafactory and SerializedLambda
pfn @pfn shrugs
Perry
@pfn
Mar 22 2017 17:21
dontwarn it and let dx handle it
Rafal Wachol
@charafau
Mar 22 2017 17:22
I really hope that it will work
Perry
@pfn
Mar 22 2017 17:25
file a bug for missing lm and sl on preview issue site
https://issuetracker.google.com/issues/36510778 for dx inability to handle scala.jar
Rafal Wachol
@charafau
Mar 22 2017 17:45
great, thank you. was thinking about doing it myself
is issue tracker official thing now ?
Perry
@pfn
Mar 22 2017 17:46
looks like it