Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 35c5384
Showing
15 changed files
with
123 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
project/plugins/project/build.properties | ||
target | ||
project/plugins/target | ||
project/boot | ||
project/plugins/boot | ||
lib_managed | ||
project/plugins/lib_managed | ||
.DS_Store | ||
src_managed | ||
project/plugins/src_managed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
project.organization=com.example | ||
project.name=android-sbt-project | ||
sbt.version=0.7.4 | ||
project.version=0.1.0 | ||
build.scala.versions=2.7.7 | ||
project.initialize=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import sbt._ | ||
|
||
class TemplateProject(info: ProjectInfo) extends DefaultProject(info) with giter8.Template { | ||
|
||
override def templateSources = super.templateSources --- (descendents(templateSourcePath, "*.png")) | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import sbt._ | ||
|
||
class Plugins(info: ProjectInfo) extends PluginDefinition(info) { | ||
val giter8 = "net.databinder" % "giter8-plugin" % "0.1.0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
name=My Android Project | ||
platform=4 | ||
description=Creates an Android SBT project. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
project.name=$name$ | ||
sbt.version=0.7.4 | ||
project.version=0.1 | ||
def.scala.version=2.7.7 | ||
build.scala.versions=2.8.0 | ||
project.initialize=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import sbt._ | ||
|
||
trait Defaults { | ||
def androidPlatformName = "android-$platform$" | ||
} | ||
class Parent(info: ProjectInfo) extends ParentProject(info) with IdeaProject { | ||
override def shouldCheckOutputDirectories = false | ||
override def updateAction = task { None } | ||
|
||
lazy val main = project(".", "$name$", new MainProject(_)) | ||
lazy val tests = project("tests", "tests", new TestProject(_), main) | ||
|
||
class MainProject(info: ProjectInfo) extends AndroidProject(info) with Defaults with MarketPublish with TypedResources | ||
with IdeaProject { | ||
val keyalias = "change-me" | ||
val scalatest = "org.scalatest" % "scalatest" % "1.0" % "test" | ||
} | ||
|
||
class TestProject(info: ProjectInfo) extends AndroidTestProject(info) with Defaults with IdeaProject | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import sbt._ | ||
|
||
class Plugins(info: ProjectInfo) extends PluginDefinition(info) { | ||
val android = "org.scala-tools.sbt" % "sbt-android-plugin" % "0.5.0" | ||
|
||
val sbtIdeaRepo = "sbt-idea-repo" at "http://mpeltonen.github.com/maven/" | ||
val sbtIdea = "com.github.mpeltonen" % "sbt-idea-plugin" % "0.1-SNAPSHOT" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<manifest | ||
android:versionName="0.1" android:versionCode="1" package="my.package" xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<uses-sdk android:minSdkVersion="7"></uses-sdk> | ||
<application android:icon="@drawable/app_icon" android:label="@string/app_name"> | ||
<activity android:label="@string/app_name" android:name=".MainActivity"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN"></action> | ||
<category android:name="android.intent.category.LAUNCHER"></category> | ||
</intent-filter> | ||
</activity> | ||
</application> | ||
</manifest> |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<resources> | ||
<string name="app_name">Myproject</string> | ||
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package my.package | ||
|
||
import _root_.android.app.Activity | ||
import _root_.android.os.Bundle | ||
import _root_.android.widget.TextView | ||
|
||
class MainActivity extends Activity { | ||
override def onCreate(savedInstanceState: Bundle) { | ||
super.onCreate(savedInstanceState) | ||
setContentView(new TextView(this) { | ||
setText("hello, world") | ||
}) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import my.package | ||
import org.scalatest.matchers.ShouldMatchers | ||
import org.scalatest.Spec | ||
|
||
class Specs extends Spec with ShouldMatchers { | ||
describe("a spec") { | ||
it("should do something") { | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<manifest package="my.package.tests" xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<uses-sdk android:minSdkVersion="7"></uses-sdk> | ||
<application> | ||
<uses-library android:name="android.test.runner"></uses-library> | ||
</application> | ||
<instrumentation | ||
android:label="Tests" android:targetPackage="my.package" android:name="android.test.InstrumentationTestRunner"> | ||
</instrumentation> | ||
</manifest> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package my.package.tests | ||
|
||
import junit.framework.Assert._ | ||
import _root_.android.test.AndroidTestCase | ||
|
||
class UnitTests extends AndroidTestCase { | ||
def testPackageIsCorrect { | ||
assertEquals("my.package", getContext.getPackageName) | ||
} | ||
} |