Skip to content

Commit

Permalink
Android coupled in README, template up
Browse files Browse the repository at this point in the history
  • Loading branch information
paulvi committed Jun 6, 2014
1 parent a118e44 commit 5aeb01f
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 5 deletions.
21 changes: 16 additions & 5 deletions org.nodeclipse.enide.editors.gradle/docs/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,17 @@
* 2014-04-10 wrapper and runAndroidApplication tasks
* 2014-04-25 rename to run, add <<
* 2014-05-23 defaut plugin version 0.10.x
* 2014-06-06 show "boilerplate part"
* @author Paul Verest
*/
println GradleVersion.current().prettyPrint()
assert gradle.gradleVersion >= "1.10" // android plugin 0.10 requires Gradle 1.10, 1.11, 1.12
// after `gradle wrapper` it is possible to use './gradlew build' with Gradle version specified
task wrapper(type: Wrapper) {
gradleVersion = '1.12'
}

//{ "boilerplate part"
buildscript {
repositories {
mavenCentral()
Expand All @@ -29,16 +36,19 @@ buildscript {
classpath 'com.android.tools.build:gradle:0.10.+'
}
}
assert gradle.gradleVersion >= "1.10" // android plugin 0.10 requires Gradle 1.10, 1.11, 1.12
// after `gradle wrapper` it is possible to use './gradlew build' with Gradle version specified
task wrapper(type: Wrapper) {
gradleVersion = '1.12'
}
apply plugin: 'android'

dependencies {
compile fileTree(dir: 'libs', include: '*.jar')
//androidTestCompile 'com.jayway.android.robotium:robotium-solo:4.3.1'

// http://blog.futurice.com/android_unit_testing_in_ides_and_ci_environments
//androidTestCompile 'org.robolectric:robolectric:2.+'
//androidTestCompile 'junit:junit:4.+'

// for multi-module project build (needs `settings.gradle`):
// reference needed modules or App under test (for Eclipse Android Test project)
//compile project(':Module')
}

android {
Expand Down Expand Up @@ -69,6 +79,7 @@ android {
release.setRoot('build-types/release')
}
}
//} "boilerplate part"

// runAndroidApplication
task run (type: Exec, dependsOn: ':installDebug') << {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ In multi-module project `settting.gradle` is required to specify module location
( While for simple project you can play with build using `gradle -b` option
to specify what `build.gradle` to use, e.g. `gradle -b second.gradle`,
for multi-module project `settings.gradle` is the only way. )

> `-b` allows to pass a different build script for a single-project build.
> It is not meant to be used for multi-project builds, where `settings.gradle` alone determines where build scripts are located.
hierarchical project layout

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ buildscript {
}
}

// using key Gradle features like the allprojects and subprojects keywords automatically cause your projects to be coupled.
/*
allprojects {
repositories {
Expand Down

0 comments on commit 5aeb01f

Please sign in to comment.