Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #3 from FranklinChen/latest-gradle-version

@FranklinkChen fixed a variety of deprecations and a couple of errors in the examples. Massive thanks to him.
  • Loading branch information...
commit 351f31f1cdede84233b977e67031720177144aab 2 parents 7b91f5e + 70102b2
Tim Berglund authored
View
4 tasks-jar-task/build.gradle
@@ -6,5 +6,5 @@ task customJar(type: Jar) {
}
archiveName = 'hello.jar'
destinationDir = file("${buildDir}/jars")
- from sourceSets.main.classes
-}
+ from sourceSets.main.output
+}
View
2  tasks-jar-task/run-example.bsh
@@ -1,2 +1,2 @@
#!/bin/bash
-gradle build
+gradle customJar
View
2  tasks-javaexec-task/build.gradle
@@ -5,7 +5,7 @@ repositories {
}
dependencies {
- runtime 'commons-codec:commons-codec:1.5'
+ compile 'commons-codec:commons-codec:1.5'
}
task encode(type: JavaExec, dependsOn: classes) {
View
2  tasks-javaexec-task/run-example.bsh
@@ -1,2 +1,2 @@
#!/bin/bash
-gradle build
+gradle encode
View
6 tasks-task-lab/dynamic.gradle
@@ -1,9 +1,9 @@
task copyFiles {
// Find files from wherever, copy them
// (then hardcode a list of files for illustration)
- fileManifest = [ 'data.csv', 'config.json' ]
+ ext.fileManifest = [ 'data.csv', 'config.json' ]
}
task createArtifact(dependsOn: copyFiles) << {
- println "FILES IN MANIFEST: ${copyFiles.fileManifest}"
-}
+ println "FILES IN MANIFEST: ${copyFiles.ext.fileManifest}"
+}
View
1  tasks-task-lab/run-example.bsh
@@ -6,4 +6,5 @@ gradle -b dynamic.gradle createArtifact
gradle -b enabled.gradle sendEmails
gradle -b logging.gradle logLevel
gradle -b onlyIf.gradle loadTestData
+gradle -Dload.data=true -b onlyIf.gradle loadTestData
gradle -b path.gradle echoMyPath
Please sign in to comment.
Something went wrong with that request. Please try again.