Skip to content

Instantly share code, notes, and snippets.

@jugyo
Forked from seratch/build.gradle
Last active August 29, 2015 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jugyo/8799120 to your computer and use it in GitHub Desktop.
Save jugyo/8799120 to your computer and use it in GitHub Desktop.
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath group: 'org.twitter4j', name: 'twitter4j-core', version: '3.0.5'
}
}
import twitter4j.*
import java.io.*
task say << {
Twitter twitter = new TwitterFactory().getInstance()
Status status = twitter.updateStatus(project.tweet)
println("Successfully updated the status to [" + status.getText() + "].")
}
// Usage: gradle say -Ptweet="Hello Gradle! #m3dev"
debug=true
oauth.consumerKey=***
oauth.consumerSecret=***
oauth.accessToken=***
oauth.accessTokenSecret=***
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment