Skip to content
This repository
Browse code

Add an option to enforce recompilation

  • Loading branch information...
commit 11d740f28b20933b43e95227da328262fc4b89a1 1 parent 3cb2902
Taro L. Saito authored February 09, 2013

Showing 1 changed file with 5 additions and 3 deletions. Show diff stats Hide diff stats

  1. 8  src/main/scala/GwtPlugin.scala
8  src/main/scala/GwtPlugin.scala
@@ -12,6 +12,7 @@ object GwtPlugin extends Plugin {
12 12
 
13 13
   val gwtModules = TaskKey[Seq[String]]("gwt-modules")
14 14
   val gwtCompile = TaskKey[Unit]("gwt-compile", "Runs the GWT compiler")
  15
+  val gwtForceCompile = TaskKey[Boolean]("gwt-force-compile", "Always recompile gwt modules")
15 16
   val gwtDevMode = TaskKey[Unit]("gwt-devmode", "Runs the GWT devmode shell")
16 17
   val gwtVersion = SettingKey[String]("gwt-version")
17 18
   val gwtTemporaryPath = SettingKey[File]("gwt-temporary-path")
@@ -43,6 +44,7 @@ object GwtPlugin extends Plugin {
43 44
     gwtTemporaryPath <<= (target) { (target) => target / "gwt" },
44 45
     gwtWebappPath <<= (target) { (target) => target / "webapp" },
45 46
     gwtVersion := "2.3.0",
  47
+    gwtForceCompile := false,
46 48
     gaeSdkPath := None,
47 49
     libraryDependencies <++= gwtVersion(gwtVersion => Seq(
48 50
       "com.google.gwt" % "gwt-user" % gwtVersion % "provided",
@@ -77,8 +79,8 @@ object GwtPlugin extends Plugin {
77 79
     },
78 80
 
79 81
     gwtCompile <<= (classDirectory in Compile, dependencyClasspath in Gwt, thisProject in Gwt, state in Gwt, javaSource in Compile, javaOptions in Gwt,
80  
-                    gwtModules, gwtTemporaryPath, streams) map {
81  
-      (classDirectory, dependencyClasspath, thisProject, pstate, javaSource, javaOpts, gwtModules, warPath, s) => {
  82
+                    gwtModules, gwtTemporaryPath, streams, gwtForceCompile) map {
  83
+      (classDirectory, dependencyClasspath, thisProject, pstate, javaSource, javaOpts, gwtModules, warPath, s, force) => {
82 84
 
83 85
         val srcDirs = Seq(javaSource.absolutePath) ++ getDepSources(thisProject.dependencies, pstate)
84 86
         val cp = Seq(classDirectory.absolutePath) ++
@@ -100,7 +102,7 @@ object GwtPlugin extends Plugin {
100 102
           }
101 103
         }
102 104
 
103  
-        if(needToCompile) {
  105
+        if(force || needToCompile) {
104 106
           val command = mkGwtCommand(
105 107
             cp, javaOpts, "com.google.gwt.dev.Compiler", warPath, Nil, gwtModules.mkString(" "))
106 108
           s.log.info("Compiling GWT modules: " + gwtModules.mkString(","))

0 notes on commit 11d740f

Please sign in to comment.
Something went wrong with that request. Please try again.