Created
January 20, 2015 12:07
-
-
Save omegasoft7/7638abc380a81223a93e to your computer and use it in GitHub Desktop.
Tweet from Gradle
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
buildscript { | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
classpath group: 'org.twitter4j', name: 'twitter4j-core', version: '3.0.2' | |
} | |
} | |
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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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