<commit_before>import sbt._
import Process._
import java.io.File

import org.clapper.sbtplugins.MarkdownPlugin

class SpielProject(info: ProjectInfo) extends AndroidProject(info) with MarkdownPlugin {

  val scanDirectories = mainAssetsPath/"scripts" :: Nil

  override def androidPlatformName = "android-2.1"

  val tts = "google" % "tts" % "2.1_rc01" from "http://eyes-free.googlecode.com/files/TTS_library_stub_2.1_rc01.jar"

  val stacktrace = "com.nullwire" % "trace" % "latest" from "http://android-remote-stacktrace.googlecode.com/files/trace.jar"

  val rhino = "rhino" % "js" % "1.7R2" from "http://spielproject.info/attachments/download/3/js.jar"

  override def proguardOption = """
    -keep class info.spielproject.spiel.scripting.Scripter {
      public void registerHandlerFor(java.lang.String, java.lang.String, java.lang.Object);
    }
    -keep class info.spielproject.spiel.handlers.** { *; }
  """

  val rhinoPath = Path.fromFile("lib_managed/scala_2.8.0.Beta1/compile/js-1.7R2.jar")
  override def proguardExclude = super.proguardExclude+++rhinoPath

  override def dxTask = execTask {<x> {dxPath.absolutePath} --dex --output={classesDexPath.absolutePath} {classesMinJarPath.absolutePath} {rhinoPath.absolutePath}</x> }

  override def aaptPackageTask = task {
    super.aaptPackageTask.run
    FileUtilities.unzip(rhinoPath, outputDirectoryName, GlobFilter("org/mozilla/javascript/resources/*.properties"), log)
    for(p <- (outputDirectoryName/"org"**"*.properties").get) {
      (
        (new java.lang.ProcessBuilder(
          aaptPath.absolutePath,
          "add",
          resourcesApkPath.absolutePath,
          p.toString.replace("./"+outputDirectoryName+"/", "")
        ))
        directory outputDirectoryName.asFile
      ) ! log
    }
    FileUtilities.clean(outputDirectoryName/"org", log)
    None
  }

  override def cleanLibAction = super.cleanAction dependsOn(markdownCleanLibAction)
  override def updateAction = super.updateAction dependsOn(markdownUpdateAction)

  val manualMD = "src" / "doc" / "manual.md"
  val manualHTML = "target" / "doc" / "manual.html"
  lazy val htmlDocs = fileTask(manualMD from manualHTML) {
    markdown(manualMD, manualHTML, log)
    Some("")
  }

}<commit_msg>Place manual directly in target/.<commit_after>import sbt._
import Process._
import java.io.File

import org.clapper.sbtplugins.MarkdownPlugin

class SpielProject(info: ProjectInfo) extends AndroidProject(info) with MarkdownPlugin {

  val scanDirectories = mainAssetsPath/"scripts" :: Nil

  override def androidPlatformName = "android-2.1"

  val tts = "google" % "tts" % "2.1_rc01" from "http://eyes-free.googlecode.com/files/TTS_library_stub_2.1_rc01.jar"

  val stacktrace = "com.nullwire" % "trace" % "latest" from "http://android-remote-stacktrace.googlecode.com/files/trace.jar"

  val rhino = "rhino" % "js" % "1.7R2" from "http://spielproject.info/attachments/download/3/js.jar"

  override def proguardOption = """
    -keep class info.spielproject.spiel.scripting.Scripter {
      public void registerHandlerFor(java.lang.String, java.lang.String, java.lang.Object);
    }
    -keep class info.spielproject.spiel.handlers.** { *; }
  """

  val rhinoPath = Path.fromFile("lib_managed/scala_2.8.0.Beta1/compile/js-1.7R2.jar")
  override def proguardExclude = super.proguardExclude+++rhinoPath

  override def dxTask = execTask {<x> {dxPath.absolutePath} --dex --output={classesDexPath.absolutePath} {classesMinJarPath.absolutePath} {rhinoPath.absolutePath}</x> }

  override def aaptPackageTask = task {
    super.aaptPackageTask.run
    FileUtilities.unzip(rhinoPath, outputDirectoryName, GlobFilter("org/mozilla/javascript/resources/*.properties"), log)
    for(p <- (outputDirectoryName/"org"**"*.properties").get) {
      (
        (new java.lang.ProcessBuilder(
          aaptPath.absolutePath,
          "add",
          resourcesApkPath.absolutePath,
          p.toString.replace("./"+outputDirectoryName+"/", "")
        ))
        directory outputDirectoryName.asFile
      ) ! log
    }
    FileUtilities.clean(outputDirectoryName/"org", log)
    None
  }

  override def cleanLibAction = super.cleanAction dependsOn(markdownCleanLibAction)
  override def updateAction = super.updateAction dependsOn(markdownUpdateAction)

  val manualMD = "src" / "doc" / "manual.md"
  val manualHTML = "target" / "manual.html"
  lazy val htmlDocs = fileTask(manualMD from manualHTML) {
    markdown(manualMD, manualHTML, log)
    Some("")
  }

}
{'fraction_non_alphanumeric': 0.13073496659242761, 'fraction_numerical': 0.009354120267260579, 'mean_word_length': 3.881521739130435, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4418453', 'n_tokens_mistral': 1482, 'n_tokens_neox': 1440, 'n_words': 259}