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

6th
Aug 2016
silvaren
@silvaren
Aug 06 2016 00:23
I meant that I followed your commands for trying the snapshot, then deleted my build.sbt's that had the sourceGenerators, deleted all target directories on my android project, then tried to build again with the snapshot, and got the same error about not finding the script classes
sorry for the lack of information before
maybe it is somehow using the older version, I don't know enough about the build system yet to know for sure
Perry
@pfn
Aug 06 2016 00:45
@silveren did you addSbtPlugin("org.scala-android" % "sbt-android" % "1.6.11-SNAPSHOT") into project/plugins.sbt ?
silvaren
@silvaren
Aug 06 2016 00:46
no, I had the sbt-android-gradle there, so i did not do the swtich
I did though forced the update through replacing the jars
Perry
@pfn
Aug 06 2016 00:47
nothing to switch, you add it
what?
silvaren
@silvaren
Aug 06 2016 00:47
and then it did build
Perry
@pfn
Aug 06 2016 00:47
you don't do anything crazy like that
just addSbtPlugin
silvaren
@silvaren
Aug 06 2016 00:47
yeah ok, I'll just restore the old one and do as you said
Perry
@pfn
Aug 06 2016 00:47
and you don't remove sbt-android-gradle
silvaren
@silvaren
Aug 06 2016 00:47
ok thanks
Perry
@pfn
Aug 06 2016 00:47
that line stays there, you just add sbt-android to there as well
silvaren
@silvaren
Aug 06 2016 00:48
ok
silvaren
@silvaren
Aug 06 2016 00:53
it worked! thanks man
the build completed and I run
I'll debug the resource id thing later
thanks again for all the help
Perry
@pfn
Aug 06 2016 02:17
@silvaren, nothing to debug, the rs bc isn't getting packaged correctly
if you can publish a repro project somewhere, I can look at it on Monday
silvaren
@silvaren
Aug 06 2016 02:21
@pfn thanks for the info! this is the repo: https://github.com/silvaren/rstoolbox
I haven't pushed the sbt-android configs yet though
its just some convenience renderscript tools that I intend to convert to scala to get used with the language
silvaren
@silvaren
Aug 06 2016 02:28
branch sbtbuild should have the necessary sbt configs
do you prefer that I open an issue on sbt-android?
Perry
@pfn
Aug 06 2016 02:44
you don't have any sbt specific things, right? just the sbt-android-gradle and snapshot?
I'll take a look on Monday in any case
silvaren
@silvaren
Aug 06 2016 02:44
yes
no sbt specific things
thanks, I'll be glad to help with any questions you might have
Wei Zhao
@fishmacs
Aug 06 2016 07:45
I don’t understand proguard cache
it is said: "The bigger your cache, the higher the chance that a code change in your project now calls a method that has previously been removed by ProGuard and is therefore not included in the cache."
why not bigger cache, higher hit rate?
Is there any document about proguard cache, other than #200?
Perry
@pfn
Aug 06 2016 13:41
bigger cache = lower hit rate
Thang Le
@Thangiee
Aug 06 2016 22:53

Hey, I just put together this little macro that lets you pass data to activity without boilerplate.
Here is an example:

import com.thangiee.metadroid.Case

case class Person(name: String, age: Int)

@Case class ExampleAct(s: String, person: Person) extends Activity {
  ...
}

class OtherAct extends Activity {
  implicit val ctx: Context = ...
  startActivity(ExampleAct("hello", Person("bob", 20))) // needs an implicit Context
}

Any feedback/idea is welcome. :)
https://github.com/Thangiee/Metadroid

Niklas Klein
@Taig
Aug 06 2016 23:19
Interesting, I always wanted to do something similar for https://github.com/taig/soap/ :thumbsup:
Perry
@pfn
Aug 06 2016 23:29
Interesting, so it rewrites the ctor so that it passes the info in via intent? That's kinda neat
as for implicit context, you can use iota.std.Context._ iirc
ugh
You get an implicit context out of thin air with an import
Thang Le
@Thangiee
Aug 06 2016 23:36
Ah, that's cool. I'll see if i can integrate that in. Thanks for the advice. :)
Perry
@pfn
Aug 06 2016 23:39
nice effort though, good work
especially intellij integration
macro annotations are cool, I wish they were part of 2.11 and not. hidden behind macro paradise
Perry
@pfn
Aug 06 2016 23:47
imma link it to reddit
Thang Le
@Thangiee
Aug 06 2016 23:56
Yea, I'm look forward to Scalameta and for the looks of this (https://youtu.be/IPnd_SZJ1nM?t=1354), we're getting better Intellij support for doing macro annotations.
Perry
@pfn
Aug 06 2016 23:59
thanks for the update, @Taig