Skip to content

Commit 062d754

Browse files
committed
Using TOML as configuration file
1 parent 0a08ba3 commit 062d754

11 files changed

Lines changed: 100 additions & 288 deletions

File tree

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
out/
33
target/
44
*iml
5-
conf.json
5+
config.toml
66
/cache/

api/pom.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,5 @@
4747
<artifactId>librespot-core</artifactId>
4848
<version>${project.version}</version>
4949
</dependency>
50-
<dependency>
51-
<groupId>xyz.gianlu.librespot</groupId>
52-
<artifactId>librespot-common</artifactId>
53-
<version>${project.version}</version>
54-
</dependency>
5550
</dependencies>
5651
</project>

api/src/main/java/xyz/gianlu/librespot/api/Main.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import xyz.gianlu.librespot.core.Session;
66
import xyz.gianlu.librespot.spirc.SpotifyIrc;
77

8-
import java.io.File;
98
import java.io.IOException;
109
import java.security.GeneralSecurityException;
1110

@@ -15,7 +14,7 @@
1514
public class Main {
1615

1716
public static void main(String[] args) throws IOException, GeneralSecurityException, SpotifyIrc.IrcException, Session.SpotifyAuthenticationException {
18-
Session session = new Session.Builder(new FileConfiguration(new File("conf.properties"), args)).create();
17+
Session session = new Session.Builder(new FileConfiguration(args)).create();
1918

2019
ApiServer server = new ApiServer(24879);
2120
server.registerHandler(new PlayerHandler(session));

conf.properties

Lines changed: 0 additions & 45 deletions
This file was deleted.

core/pom.xml

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -49,18 +49,6 @@
4949
<version>${project.version}</version>
5050
</dependency>
5151

52-
<!-- Data -->
53-
<dependency>
54-
<groupId>com.google.code.gson</groupId>
55-
<artifactId>gson</artifactId>
56-
<version>${gson.version}</version>
57-
</dependency>
58-
<dependency>
59-
<groupId>com.google.protobuf</groupId>
60-
<artifactId>protobuf-java</artifactId>
61-
<version>${protobuf.version}</version>
62-
</dependency>
63-
6452
<!-- Audio -->
6553
<dependency>
6654
<groupId>org.jcraft</groupId>
@@ -88,5 +76,12 @@
8876
<artifactId>okhttp</artifactId>
8977
<version>3.14.1</version>
9078
</dependency>
79+
80+
<!-- TOML configuration -->
81+
<dependency>
82+
<groupId>com.electronwill.night-config</groupId>
83+
<artifactId>toml</artifactId>
84+
<version>3.6.0</version>
85+
</dependency>
9186
</dependencies>
9287
</project>

core/src/main/java/xyz/gianlu/librespot/DefaultConfiguration.java

Lines changed: 0 additions & 137 deletions
This file was deleted.

0 commit comments

Comments
 (0)