Skip to content

Commit

Permalink
Removing deprecated funtions
Browse files Browse the repository at this point in the history
  • Loading branch information
ltamaster committed Oct 30, 2018
1 parent 973743c commit 5b8e8d1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
9 changes: 1 addition & 8 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ plugins {
apply plugin: 'java'
apply plugin: 'pl.allegro.tech.build.axion-release'

sourceCompatibility = 1.6
sourceCompatibility = 1.8
defaultTasks 'clean', 'build'

configurations{
Expand All @@ -28,21 +28,14 @@ scmVersion {

//apend .0 to satisfy semver if the tag version is only X.Y
deserialize = { config, position, tagName ->
println("config:" + config)
println("position:" + position)
println("tagName:" + tagName)
def orig = origDeserialize(config, position, tagName)
println("orig:" + orig)
if (orig.split('\\.').length < 3) {
orig += ".0"
}
println("orig2:" + orig)
orig
}
}
}

println("scmVersion.version:" + scmVersion.version)
project.version = scmVersion.version

repositories {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public boolean postNotification(String trigger, Map executionData, Map config) {

String message = generateMessage(trigger, executionData, config, this.slack_channel);
String slackResponse = invokeSlackAPIMethod(webhook_url, message);
String ms = "payload=" + URLEncoder.encode(message);
String ms = "payload=" + this.urlEncode(message);

if ("ok".equals(slackResponse)) {
return true;
Expand Down Expand Up @@ -174,7 +174,7 @@ private String invokeSlackAPIMethod(String webhook_url, String message) {

HttpURLConnection connection = null;
InputStream responseStream = null;
String body = "payload=" + URLEncoder.encode(message);
String body = "payload=" + this.urlEncode(message);
try {
connection = openConnection(requestUrl);
putRequestStream(connection, body);
Expand Down

0 comments on commit 5b8e8d1

Please sign in to comment.