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>
|
<set>
|
||||||
<option value="$PROJECT_DIR$" />
|
<option value="$PROJECT_DIR$" />
|
||||||
<option value="$PROJECT_DIR$/core-api" />
|
<option value="$PROJECT_DIR$/core-api" />
|
||||||
|
<option value="$PROJECT_DIR$/core-impl" />
|
||||||
</set>
|
</set>
|
||||||
</option>
|
</option>
|
||||||
</GradleProjectSettings>
|
</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 {
|
plugins {
|
||||||
id("java")
|
id("java")
|
||||||
id("java-library")
|
id("io.freefair.lombok") version "9.2.0" apply false
|
||||||
}
|
}
|
||||||
|
|
||||||
group = "de.kentoj.scrow"
|
group = "de.kentoj.scrow"
|
||||||
|
|
@ -10,22 +10,27 @@ repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
subprojects {
|
||||||
testImplementation(platform("org.junit:junit-bom:5.10.0"))
|
apply(plugin = "java")
|
||||||
testImplementation("org.junit.jupiter:junit-jupiter")
|
apply(plugin = "io.freefair.lombok")
|
||||||
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
|
|
||||||
|
|
||||||
// https://mvnrepository.com/artifact/org.jetbrains/annotations
|
repositories {
|
||||||
api("org.jetbrains:annotations:26.0.2-1")
|
mavenCentral()
|
||||||
|
}
|
||||||
|
|
||||||
// https://projectreactor.io/docs/core/release/reference/gettingStarted.html
|
dependencies {
|
||||||
api(platform("io.projectreactor:reactor-bom:2025.0.3"))
|
// https://mvnrepository.com/artifact/org.jetbrains/annotations
|
||||||
api("io.projectreactor:reactor-core")
|
implementation("org.jetbrains:annotations:26.0.2-1")
|
||||||
|
|
||||||
// https://mvnrepository.com/artifact/com.google.guava/guava
|
// https://projectreactor.io/docs/core/release/reference/gettingStarted.html
|
||||||
api("com.google.guava:guava:33.5.0-jre")
|
implementation(platform("io.projectreactor:reactor-bom:2025.0.3"))
|
||||||
}
|
implementation("io.projectreactor:reactor-core")
|
||||||
|
|
||||||
tasks.test {
|
// https://mvnrepository.com/artifact/com.google.guava/guava
|
||||||
useJUnitPlatform()
|
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"
|
rootProject.name = "core"
|
||||||
include("core-api")
|
include("core-api")
|
||||||
|
include("core-impl")
|
||||||
Loading…
Add table
Add a link
Reference in a new issue