Skip to content

Commit

Permalink
super-preliminary support for building with gradle.
Browse files Browse the repository at this point in the history
  • Loading branch information
mike castleman committed May 24, 2013
1 parent 3a8b71d commit 68ccbc5
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@
# generated files
bin/
gen/
.gradle/
**/build/

# Local configuration file (sdk path, etc)
local.properties

library/.classpath
library/.project
sample/.classpath
sample/.project
sample/.project
10 changes: 10 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
buildscript {
repositories {
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:0.4'
}
}

14 changes: 14 additions & 0 deletions library/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apply plugin: 'android-library'

android {
compileSdkVersion 17
buildToolsVersion '17'

sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
res.srcDirs = ['res']
}
}
}
23 changes: 23 additions & 0 deletions sample/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
apply plugin: 'android'

dependencies {
compile project(':library')
// TODO: we also depend on ActionBarSherlock, which is not in Maven Central as an AAR yet.
}

android {
buildToolsVersion '17.0.0'
compileSdkVersion 17

sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
}
}
2 changes: 2 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include 'library'
include 'sample'

0 comments on commit 68ccbc5

Please sign in to comment.