Wiki

Clone wiki

SpecGine / Platforms

Configuring other platforms

Until now we ignored other platforms. We will now fix configuration. Currently there are only Android related issues.

Fixing Android provided dependencies

Because how Android plugins proguard dependencies, currently it is not possible to build games using provided dependencies with macros. That's why we will change in project/build.scala dependency

#!scala
  "com.specdevs" %% "specgine-macros" % "0.1" % "provided"
to
#!scala
  "com.specdevs" %% "specgine-macros" % "0.1" exclude("org.scala-lang", "scala-reflect")

Adjusting proguard settings

Proguard is used to optimize built application. Because we use older Scala here than in default template, we need to mark Scala parser combinator library mark as ignored (it was split into separate library in 2.11) and mark macros package as ignored. Open core/proguard-project.txt file, and add two lines:

-dontwarn com.specdevs.specgine.macros.**
-dontwarn scala.util.parsing.combinator.**

Setting Android permissions

SpecGine 0.1.1 uses Libgdx 0.9.9, which required WAKE_LOG permission. It isn't set in template, so we need to add it. Open file android/AndroidManifest.xml and just below line:

  <uses-feature android:glEsVersion="0x00020000" />
add
  <uses-permission android:name="android.permission.WAKE_LOCK" />

In next part we will create final archive to release.

Having troubles with this step?

Here you can download project with all above steps completed.

Updated