Skip to content

Commit

Permalink
Use doLast instead of deprecated <<
Browse files Browse the repository at this point in the history
  • Loading branch information
GladeDiviney committed Mar 27, 2017
1 parent da2d227 commit 35fb823
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ can't trace back to code, then this plugin is for you!
Add the plugin the top of your `app/build.gradle` (or equivalent):
```groovy
plugins {
id 'com.gladed.androidgitversion' version '0.3.3'
id 'com.gladed.androidgitversion' version '0.3.4'
}
```

Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ task wrapper(type: Wrapper) {
gradleVersion = '2.4'
}

version = '0.3.3' // <-----UPDATE THIS VERSION NUMBER MANUALLY FOR EACH RELEASE
version = '0.3.4' // <-----UPDATE THIS VERSION NUMBER MANUALLY FOR EACH RELEASE
group = 'com.gladed.gradle.androidgitversion'

pluginBundle {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,21 @@ import com.android.build.OutputFile
class AndroidGitVersion implements Plugin<Project> {
void apply(Project project) {
project.extensions.create("androidGitVersion", AndroidGitVersionExtension, project)
project.task('androidGitVersion') << {
println "androidGitVersion.name\t${project.extensions.androidGitVersion.name()}"
println "androidGitVersion.code\t${project.extensions.androidGitVersion.code()}"
project.task('androidGitVersion') {
doLast {
println "androidGitVersion.name\t${project.extensions.androidGitVersion.name()}"
println "androidGitVersion.code\t${project.extensions.androidGitVersion.code()}"
}
}
project.task('androidGitVersionName') << {
println project.extensions.androidGitVersion.name()
project.task('androidGitVersionName') {
doLast {
println project.extensions.androidGitVersion.name()
}
}
project.task('androidGitVersionCode') << {
println project.extensions.androidGitVersion.code()
project.task('androidGitVersionCode') {
doLast {
println project.extensions.androidGitVersion.code()
}
}
}
}
Expand Down

0 comments on commit 35fb823

Please sign in to comment.