jberkel / android-plugin

An sbt plugin for Android development in Scala
https://groups.google.com/forum/#!forum/scala-on-android
Other
476 stars 113 forks source link

~android:aapt-generate doesn't pick up changes #126

Open pimlott opened 12 years ago

pimlott commented 12 years ago

I'm new to scala and sbt, but intuitively, I would expect "sbt ~android:aapt-generate" to regenerate R.java whenever the relevant XML files are changed. This does not happen.

I am motivated to fix this if I have the time. Pointers appreciated. :-)

jberkel commented 12 years ago

Have a look at TypedResources.scala:

layoutResources <<= (mainResPath) map { x=>  (x / "layout" ** "*.xml" get) },
generateTypedResources <<= generateTypedResourcesTask,
sourceGenerators in Compile <+= generateTypedResources,
watchSources in Compile <++= (layoutResources) map (ls => ls)