mirror of
https://github.com/DiscordSRV/Ascension.git
synced 2024-12-26 17:18:29 +01:00
Downgrade okhttp due to kotlin usage
This commit is contained in:
parent
4a492a7392
commit
d78450e291
@ -11,9 +11,13 @@ dependencies {
|
|||||||
exclude group: 'org.jetbrains', module: 'annotations'
|
exclude group: 'org.jetbrains', module: 'annotations'
|
||||||
exclude group: 'com.google.code.findbugs', module: 'jsr305'
|
exclude group: 'com.google.code.findbugs', module: 'jsr305'
|
||||||
|
|
||||||
|
// Downgrade okhttp (due to kotlin)
|
||||||
|
exclude group: 'com.squareup.okhttp3', module: 'okhttp'
|
||||||
|
|
||||||
// We don't use audio
|
// We don't use audio
|
||||||
exclude module: 'opus-java'
|
exclude module: 'opus-java'
|
||||||
}
|
}
|
||||||
|
api(libs.okhttp)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Relocations are in buildscript/api.gradle
|
// Relocations are in buildscript/api.gradle
|
||||||
|
@ -52,7 +52,7 @@ public class BinPasteService implements PasteService {
|
|||||||
|
|
||||||
Request request = new Request.Builder()
|
Request request = new Request.Builder()
|
||||||
.url(binUrl + "/v1/post")
|
.url(binUrl + "/v1/post")
|
||||||
.post(RequestBody.create(json.toString(), MediaType.get("application/json")))
|
.post(RequestBody.create(MediaType.get("application/json"), json.toString()))
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
try (Response response = discordSRV.httpClient().newCall(request).execute()) {
|
try (Response response = discordSRV.httpClient().newCall(request).execute()) {
|
||||||
|
@ -39,7 +39,7 @@ public class BytebinPasteService implements PasteService {
|
|||||||
Request request = new Request.Builder()
|
Request request = new Request.Builder()
|
||||||
.url(bytebinUrl + "/post")
|
.url(bytebinUrl + "/post")
|
||||||
.header("Content-Encoding", "gzip")
|
.header("Content-Encoding", "gzip")
|
||||||
.post(RequestBody.create(fileContent, MediaType.get("application/octet-stream")))
|
.post(RequestBody.create(MediaType.get("application/octet-stream"), fileContent))
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
try (Response response = discordSRV.httpClient().newCall(request).execute()) {
|
try (Response response = discordSRV.httpClient().newCall(request).execute()) {
|
||||||
|
@ -53,6 +53,10 @@ dependencyResolutionManagement {
|
|||||||
|
|
||||||
// JDA
|
// JDA
|
||||||
library('jda', 'net.dv8tion', 'JDA').version('5.0.0-alpha.10')
|
library('jda', 'net.dv8tion', 'JDA').version('5.0.0-alpha.10')
|
||||||
|
library('okhttp', 'com.squareup.okhttp3', 'okhttp').version {
|
||||||
|
prefer '3.12.13'
|
||||||
|
reject '[4,)' // Kotlin
|
||||||
|
}
|
||||||
|
|
||||||
// Discord Webhooks
|
// Discord Webhooks
|
||||||
library('webhooks', 'club.minnced', 'discord-webhooks').version('0.8.0')
|
library('webhooks', 'club.minnced', 'discord-webhooks').version('0.8.0')
|
||||||
|
Loading…
Reference in New Issue
Block a user