fix gradle dependencies
This commit is contained in:
parent
f0ea9603d5
commit
af296638fd
7 changed files with 84 additions and 16 deletions
1
.idea/gradle.xml
generated
1
.idea/gradle.xml
generated
|
|
@ -9,6 +9,7 @@
|
|||
<set>
|
||||
<option value="$PROJECT_DIR$" />
|
||||
<option value="$PROJECT_DIR$/core-api" />
|
||||
<option value="$PROJECT_DIR$/core-impl" />
|
||||
</set>
|
||||
</option>
|
||||
</GradleProjectSettings>
|
||||
|
|
|
|||
24
README.md
Normal file
24
README.md
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
environment
|
||||
-----------
|
||||
|
||||
```shell
|
||||
docker network create scrow 2>/dev/null || true
|
||||
docker run -d --network scrow -it --rm --name mongo -p 27017:27017 mongo
|
||||
docker run -d --network scrow -e ME_CONFIG_MONGODB_SERVER=mongo -e ME_CONFIG_MONGODB_AUTH_PASSWORD='' -e ME_CONFIG_MONGODB_AUTH_USERNAME='' --name mongo-express -p 8081:8081 mongo-express
|
||||
```
|
||||
|
||||
modules
|
||||
-------
|
||||
|
||||
* APIs
|
||||
----
|
||||
|
||||
* core-api contains api for all java development
|
||||
* core-bukkit-api contains api for bukkit development
|
||||
* depends on core-api
|
||||
|
||||
* implementations
|
||||
---------------
|
||||
the `-impl` suffix indicates that this module implements the API with the same prefix.
|
||||
So `core-impl` implements `core-api`.
|
||||
* core-bukkit-impl is a spigot plugin. It shades core-impl.
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
plugins {
|
||||
id("java")
|
||||
id("java-library")
|
||||
id("io.freefair.lombok") version "9.2.0" apply false
|
||||
}
|
||||
|
||||
group = "de.kentoj.scrow"
|
||||
|
|
@ -10,22 +10,27 @@ repositories {
|
|||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testImplementation(platform("org.junit:junit-bom:5.10.0"))
|
||||
testImplementation("org.junit.jupiter:junit-jupiter")
|
||||
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
|
||||
subprojects {
|
||||
apply(plugin = "java")
|
||||
apply(plugin = "io.freefair.lombok")
|
||||
|
||||
// https://mvnrepository.com/artifact/org.jetbrains/annotations
|
||||
api("org.jetbrains:annotations:26.0.2-1")
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
// https://projectreactor.io/docs/core/release/reference/gettingStarted.html
|
||||
api(platform("io.projectreactor:reactor-bom:2025.0.3"))
|
||||
api("io.projectreactor:reactor-core")
|
||||
dependencies {
|
||||
// https://mvnrepository.com/artifact/org.jetbrains/annotations
|
||||
implementation("org.jetbrains:annotations:26.0.2-1")
|
||||
|
||||
// https://mvnrepository.com/artifact/com.google.guava/guava
|
||||
api("com.google.guava:guava:33.5.0-jre")
|
||||
}
|
||||
// https://projectreactor.io/docs/core/release/reference/gettingStarted.html
|
||||
implementation(platform("io.projectreactor:reactor-bom:2025.0.3"))
|
||||
implementation("io.projectreactor:reactor-core")
|
||||
|
||||
tasks.test {
|
||||
useJUnitPlatform()
|
||||
// https://mvnrepository.com/artifact/com.google.guava/guava
|
||||
implementation("com.google.guava:guava:33.5.0-jre")
|
||||
|
||||
// https://www.mongodb.com/docs/drivers/java/sync/current/get-started/
|
||||
implementation(platform("org.mongodb:mongodb-driver-bom:5.6.3"))
|
||||
implementation("org.mongodb:mongodb-driver-sync")
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
package de.kentoj.scrow.economy;
|
||||
|
||||
public class EconomyServiceImpl {
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
package de.kentoj.scrow.economy;
|
||||
|
||||
public class Main {
|
||||
public static void main(String[] args) {
|
||||
var a = new MongoDbHelper();
|
||||
a.close();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
package de.kentoj.scrow.economy;
|
||||
|
||||
import com.mongodb.client.MongoClient;
|
||||
import com.mongodb.client.MongoClients;
|
||||
import com.mongodb.client.MongoDatabase;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.io.Closeable;
|
||||
|
||||
public class MongoDbHelper implements Closeable {
|
||||
|
||||
private final MongoClient con;
|
||||
@Getter
|
||||
private final MongoDatabase database;
|
||||
|
||||
public MongoDbHelper() {
|
||||
con = MongoClients.create("mongodb://:@localhost:27017/db?ssl=false");
|
||||
database = con.getDatabase("scrow");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void close() {
|
||||
con.close();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,2 +1,3 @@
|
|||
rootProject.name = "core"
|
||||
include("core-api")
|
||||
include("core-impl")
|
||||
Loading…
Add table
Add a link
Reference in a new issue