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

Compiler warnings in TR.scala #193

Closed jamur2 closed 10 years ago

jamur2 commented 10 years ago

Minor issue, but we've just started paying attention to compiler warnings and came across some generated by android-plugin in the generated TR.scala source:

[info] Compiling 38 Scala sources and 200 Java sources to .../sbt/target/scala-2.10/classes...
[warn] .../TR.scala:164: implicit conversion method layout2int should be enabled
[warn] by making the implicit value scala.language.implicitConversions visible.
[warn] This can be achieved by adding the import clause 'import scala.language.implicitConversions'
[warn] or by setting the compiler option -language:implicitConversions.
[warn] See the Scala docs for value scala.language.implicitConversions for a discussion
[warn] why the feature should be explicitly enabled.
[warn]   implicit def layout2int(l: TypedLayout) = l.id
[warn]                ^
...

It looks like just adding

import scala.language.implicitConversions

to TypedResources.generateTypedResourcesTask's IO.write() template should do the trick.

appamatto commented 10 years ago

Thanks for catching this. Feel free to reopen if your patch doesn't solve this completely.