android-plugin icon indicating copy to clipboard operation
android-plugin copied to clipboard

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

Open pimlott opened this issue 13 years ago • 1 comments

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. :-)

pimlott avatar Mar 27 '12 20:03 pimlott

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)

jberkel avatar Mar 27 '12 21:03 jberkel