Skip to content

Commit

Permalink
Migrate to version catalogs
Browse files Browse the repository at this point in the history
  • Loading branch information
duncte123 committed Jul 8, 2023
1 parent 4550f53 commit e83e387
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 8 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ Adding support for the following sources:
- PornHub
- soundgasm

## Lavalink version compatibility

| Lavalink Version | Plugin Version |
|------------------|-------------------------|
| 3.x.x | 1.4.x (1.5 is untested) |
| 4.x.x | 1.4.x OR 1.5.x |

# Lavaplayer users
If you need to add the source managers to your lavalink instance as well you can use this library to add them: https://github.com/DuncteBot/skybot-source-managers

Expand Down
3 changes: 2 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ repositories {
}

dependencies {
implementation("com.dunctebot:sourcemanagers:1.8.3")
implementation(libs.sourcemanager)
// implementation(project(":skybot-source-managers"))
}

tasks.getByName<Test>("test") {
Expand Down
6 changes: 0 additions & 6 deletions gradle/libs.versions.toml

This file was deleted.

28 changes: 28 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,2 +1,30 @@
rootProject.name = "lavalink-plugin"
//include(":skybot-source-managers")
//project(":skybot-source-managers").projectDir = File("../skybot-source-managers")

enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")

dependencyResolutionManagement {
versionCatalogs {
create("libs") {
common()
plugins()
}
}
}

fun VersionCatalogBuilder.common() {
library("sourcemanager", "com.dunctebot", "sourcemanagers").version("1.8.3")

version("lavalink-api", "4.0.0-beta.1")
version("lavalink-server", "1c0795bf156fe6559c9c0aed0412bcd8f323a3e0")

}

fun VersionCatalogBuilder.plugins() {
plugin("lavalink", "dev.arbjerg.lavalink.gradle-plugin").version("1.0.7")
}

fun VersionCatalogBuilder.testBot() {
//
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import com.dunctebot.sourcemanagers.tiktok.TikTokAudioSourceManager;
import com.sedmelluq.discord.lavaplayer.player.AudioPlayerManager;
import dev.arbjerg.lavalink.api.AudioPlayerManagerConfiguration;
import org.jetbrains.annotations.NotNull;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
Expand All @@ -27,8 +28,9 @@ public DuncteBotInjector(DuncteBotConfig config, DuncteBotConfig.Sources sources
this.sourcesConfig = sourcesConfig;
}

@NotNull
@Override
public AudioPlayerManager configure(AudioPlayerManager manager) {
public AudioPlayerManager configure(@NotNull AudioPlayerManager manager) {
final Logger logger = LoggerFactory.getLogger(DuncteBotInjector.class);

// register custom source managers
Expand Down

0 comments on commit e83e387

Please sign in to comment.