Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
159 commits
Select commit Hold shift + click to select a range
c4aaa89
feat: add aetheria dimension
tksimeji Feb 17, 2026
5d08c2a
feat: add layer based chunk generator
tksimeji Feb 17, 2026
fb91955
fix: restore accidentally deleted paper-api patches
tksimeji Feb 17, 2026
c89be3a
feat: add feature generation using per-layer heightmaps
tksimeji Feb 17, 2026
05b523b
feat: integrate height context into feature
tksimeji Feb 17, 2026
a2030e9
fix: remove the bedrock layer between the nether and the overworld
tksimeji Feb 19, 2026
1759c9e
feat: experimentally integrate height context into structure
tksimeji Feb 20, 2026
29d618c
Merge pull request #1 from AzisabaNetwork/feature/levelgen
tksimeji Feb 20, 2026
dd4b508
hotfix: revert to a2030e9 to fix server startup failure issue
tksimeji Feb 20, 2026
6080ce9
build: create the gameplay plugin module
tksimeji Feb 20, 2026
5ef7754
build: automatically install module plugin jars on runServer/runDevSe…
tksimeji Feb 20, 2026
0f40775
build: add the jvm version specification to plugins build script
tksimeji Feb 21, 2026
f364822
feat: add the islands level
tksimeji Feb 22, 2026
0ff12b0
feat: add terraced island terrain with varied step heights and noisy …
tksimeji Feb 22, 2026
ae286a4
feat: add island river generation
tksimeji Feb 22, 2026
aaf3090
feat: add the core plugin startup logic
tksimeji Feb 23, 2026
28d9c74
chore: add compose.test.yaml for PostgreSQL test environment
tksimeji Feb 23, 2026
59aaec9
build: switch preparePlugins to sync
tksimeji Feb 23, 2026
4bd733a
refactor: rename aetheria to vanilife
tksimeji Feb 23, 2026
a6c6975
Merge branch 'ver/1.21.11' into feature/islands
tksimeji Feb 23, 2026
9f79120
feat: add basic island mechanics
tksimeji Feb 23, 2026
aeffefa
feat: add the lightweight portal finder
tksimeji Feb 24, 2026
8a8a11e
build: fix the issue where data folders in the plugins folder were de…
tksimeji Feb 24, 2026
3cc4659
feat: add resource portal creation
tksimeji Feb 24, 2026
4ec283a
feat: add animated waves to island's coasts
tksimeji Feb 26, 2026
6168080
chore: create new plugin module for NPC implementation
tksimeji Feb 26, 2026
58cae0a
build: add BetterModel api dependency
tksimeji Feb 26, 2026
22d3604
feat: add flotsam to waves every now and then
tksimeji Feb 27, 2026
216640c
feat: add wrack placement after removing flotsam
tksimeji Feb 27, 2026
d98c122
refactor: add wrack type
tksimeji Feb 27, 2026
27b2d40
feat: add Island#aaddFlotsam api
tksimeji Feb 27, 2026
5b9861f
refactor: separate wave and wrack mechanisms
tksimeji Feb 28, 2026
f092b03
refactor: change islands to kotlinx.coroutines.channels driven for be…
tksimeji Feb 28, 2026
5f9dfb5
refactor: change islands to kotlinx.coroutines.channels driven for be…
tksimeji Feb 28, 2026
e33fb68
fix: make wrack drift path seed non-deterministic per spawn
tksimeji Feb 28, 2026
fca759a
fix: keep drifting debris below sea surface during vertical bob
tksimeji Feb 28, 2026
3bd0796
feat: add Bukkit.getIslandsWorld()
tksimeji Feb 28, 2026
d630793
change: cap drift bobbing height near sea level (+0.05)
tksimeji Feb 28, 2026
854bf2a
build: create new plugin module for cut-all
tksimeji Feb 28, 2026
0072c66
feat: add tree finders
tksimeji Feb 28, 2026
2868a6d
feat: add tree finder router and forestry listener
tksimeji Feb 28, 2026
4db0612
feat: add falling animation to cut down
tksimeji Feb 28, 2026
09bbc57
improve: add delta-xz check to tree finders
tksimeji Mar 1, 2026
bfb1e62
feat: add cut all enchantment
tksimeji Mar 1, 2026
9c3086d
Merge branch 'ver/1.21.11' into feature/npc
tksimeji Mar 1, 2026
15b66e2
feat: add npc-test command to spawn a sample npc
tksimeji Mar 2, 2026
e6c9a79
feat: add sit goal to npc
tksimeji Mar 2, 2026
2a7f785
feat: add trading goal to npc
tksimeji Mar 2, 2026
828bc6b
feat: add server item registry
tksimeji Mar 3, 2026
076dd90
feat: add useful withComponent overloads to ServerItemRegistryEntry.B…
tksimeji Mar 3, 2026
59f7aea
feat: add ItemStack.of(ServerItemType) api
tksimeji Mar 3, 2026
8ff5571
feat: add lore renderer
tksimeji Mar 3, 2026
757c3b3
build: add new plugin module for cooking feature
tksimeji Mar 4, 2026
c862b80
feat: add pack host mechanics
tksimeji Mar 4, 2026
dcd6cd9
feat: add spring foods
tksimeji Mar 10, 2026
809ffdd
feat: add foods
tksimeji Mar 10, 2026
48749d1
feat: add fish behaviors
tksimeji Mar 11, 2026
f22665c
feat: implement fishing system with hookups
tksimeji Mar 12, 2026
14886a1
feat: add 3d fishing bobber
tksimeji Mar 12, 2026
a44f70b
chore: commit for now
tksimeji Mar 12, 2026
a34836e
chore: commit for now
tksimeji Mar 12, 2026
a0dae1a
refactor: prepare domains necessary for implementing future NPC funct…
tksimeji Mar 13, 2026
6c4d684
refactor: improve server item api
tksimeji Mar 13, 2026
8674e7d
feat: add season-aware NPC trade weighting
tksimeji Mar 13, 2026
b00c45a
feat: add prototype of researching goal to NPC AI
tksimeji Mar 13, 2026
1808f62
feat: add npc icon
tksimeji Mar 13, 2026
d65ab2a
feat: replace ServerItemLoreBuilder with ServerItemLoreStyle, which i…
tksimeji Mar 14, 2026
5a70173
refactor: replace MerchantConstructor with NpcOffer
tksimeji Mar 14, 2026
19d9af4
fix: fix seasonal stage calculation to span full season
tksimeji Mar 14, 2026
933e106
feat: make recipes NPC've learned tradable
tksimeji Mar 14, 2026
9e48695
feat: add description about peak season to item tooltip
tksimeji Mar 14, 2026
6a340e0
build: update Packed dependency to 1.0.0-R0.3-SNAPSHOT
tksimeji Mar 15, 2026
87fa7ee
feat: add experience costs to NPC trades that derived from recipe
tksimeji Mar 15, 2026
46e5f11
refactor: integrate UnreadableRecipe trade responsibilities inti exis…
tksimeji Mar 15, 2026
7ee5ac3
chore: create plugin-mining module for mining features
tksimeji Mar 15, 2026
ccb6b70
feat: add frozen ores
tksimeji Mar 15, 2026
ea8970a
feat: make it possible to thaw frozen ores using a campfire, furnace,…
tksimeji Mar 15, 2026
7bbe8dd
feat: add range mining enchantments (3x3x3 and 5x5x5)
tksimeji Mar 15, 2026
b97ae82
chore: add AGENTS.md
sysnote8main Mar 16, 2026
79cecb0
feat: temp commit for implementing portal
sysnote8main Mar 16, 2026
5fb6b4f
chore: add docs for portal
sysnote8main Mar 16, 2026
c58b158
feat: add mining combo system and Hud for it
tksimeji Mar 16, 2026
58293fe
feat: add vertical mining enchantments and miner types
tksimeji Mar 16, 2026
2fbbd41
fix: route resource biome locate through layer-specific samplers
tksimeji Mar 16, 2026
2784c1f
feat(islands): create portals on ignite and teleport on portal entry;…
sysnote8main Mar 16, 2026
414492e
feat(islands): create portals on ignite and teleport on portal entry;…
sysnote8main Mar 16, 2026
9305699
fix(islands): detect portal frame to avoid nether fallback
sysnote8main Mar 16, 2026
e235490
feat: add glacial cave to resource world
tksimeji Mar 16, 2026
97de378
feat: add BlockDropLootEvent and implement frozen ore mining in glaci…
tksimeji Mar 17, 2026
04338e2
feat: add vein mining enchantment
tksimeji Mar 17, 2026
1356f57
feat: add VeinMiner
tksimeji Mar 17, 2026
f7a2ac5
fix: correct registration location of custom registries
tksimeji Mar 18, 2026
c303d10
feat: add auto smelt enchantment
tksimeji Mar 18, 2026
b94faee
Merge remote-tracking branch 'upstream/ver/1.21.11' into ver/1.21.11
tksimeji Mar 18, 2026
c2d7d0b
chore: add .DS_Store to gitignore
tksimeji Mar 18, 2026
ece7277
feat: add translation for timber enchantment
tksimeji Mar 18, 2026
0722f1b
feat: add item drops to timber
tksimeji Mar 18, 2026
849b3d1
refactor: abstract TreeFinder into an interface
tksimeji Mar 18, 2026
48a4941
feat: add auto sapling enchantment
tksimeji Mar 18, 2026
3f1183e
change: divide timber enchantment by type of tree
tksimeji Mar 18, 2026
772b19d
feat: add impact particles to timber fall animation
tksimeji Mar 18, 2026
7b87015
fix: add check to validate starting block in TreeFinder
tksimeji Mar 18, 2026
32f831a
remove: remove small tree stump
tksimeji Mar 18, 2026
e305fa9
chore: add new plugin module to plugins/plugin-tool-swap
tksimeji Mar 18, 2026
ead7cf1
feat: add tool swap enchantment
tksimeji Mar 18, 2026
eed5bef
chore: add new plugin module to plugins/farming
tksimeji Mar 18, 2026
acd8ada
feat: add auto replant enchantment
tksimeji Mar 18, 2026
96ac1df
change: divide auto replant enchantment by type of crop
tksimeji Mar 18, 2026
7889ae0
feat: add particle animation to auto replant
tksimeji Mar 18, 2026
eeab7c7
feat: add no crop trample enchantment
tksimeji Mar 18, 2026
a23d2bd
feat: add baked potato harvest enchantment
tksimeji Mar 18, 2026
d849fca
temp commit
sysnote8main Mar 19, 2026
d4a602f
feat: remove unused module
sysnote8main Mar 19, 2026
b7b9078
temp commit
sysnote8main Mar 19, 2026
0bd968f
feat: implement dialog
sysnote8main Mar 19, 2026
931a479
Merge branch 'ver/1.21.11' into feature/portal
sysnote8main Mar 19, 2026
159183f
feat: extract method to PortalDialog.kt
sysnote8main Mar 19, 2026
35fe063
Merge remote-tracking branch 'origin/feature/portal' into feature/portal
sysnote8main Mar 19, 2026
0dbfdba
fix: no more noisy logging
sysnote8main Mar 19, 2026
e5acd1c
feat: add better farmland
tksimeji Mar 19, 2026
a9df6b9
feat: use correct height map and suppress warnings
sysnote8main Mar 20, 2026
113dc90
temp commit
sysnote8main Mar 20, 2026
570f503
temp commit
sysnote8main Mar 20, 2026
4d96a8d
feat: implement Y provider to solve problem
sysnote8main Mar 20, 2026
3a1b961
fix: some error around computing and add preconmpute system
sysnote8main Mar 20, 2026
c4086c2
fix: use correct world name for cache
sysnote8main Mar 20, 2026
2a5a4ca
chore: add AGENTS.md
sysnote8main Mar 16, 2026
9b51b2a
feat: temp commit for implementing portal
sysnote8main Mar 16, 2026
029ca59
chore: add docs for portal
sysnote8main Mar 16, 2026
852933d
feat(islands): create portals on ignite and teleport on portal entry;…
sysnote8main Mar 16, 2026
8c2aed9
feat(islands): create portals on ignite and teleport on portal entry;…
sysnote8main Mar 16, 2026
f1e28db
fix(islands): detect portal frame to avoid nether fallback
sysnote8main Mar 16, 2026
f01fbd5
temp commit
sysnote8main Mar 19, 2026
ff4d7f2
feat: remove unused module
sysnote8main Mar 19, 2026
c415b38
temp commit
sysnote8main Mar 19, 2026
f888a77
feat: implement dialog
sysnote8main Mar 19, 2026
6ee78d6
feat: extract method to PortalDialog.kt
sysnote8main Mar 19, 2026
8c61d06
fix: no more noisy logging
sysnote8main Mar 19, 2026
515ebc5
feat: use correct height map and suppress warnings
sysnote8main Mar 20, 2026
ca075ee
temp commit
sysnote8main Mar 20, 2026
00eb959
temp commit
sysnote8main Mar 20, 2026
78bfbb4
feat: implement Y provider to solve problem
sysnote8main Mar 20, 2026
a6cc02a
fix: some error around computing and add preconmpute system
sysnote8main Mar 20, 2026
f8513ec
fix: use correct world name for cache
sysnote8main Mar 20, 2026
16acf58
Merge remote-tracking branch 'origin/feature/portal' into feature/portal
tksimeji Mar 20, 2026
4d4af46
fix: persist resource layer heightmaps in full chunks
tksimeji Mar 21, 2026
9ed930e
fix: update resource heightmaps when merging air blocks
tksimeji Mar 21, 2026
2757fdd
chore: add new plugin module to plugins/plugin-portal
tksimeji Mar 21, 2026
e839309
feat: add PortalIgniteListener
tksimeji Mar 21, 2026
6f121f8
feat: add portal forcer for portal teleportation
tksimeji Mar 21, 2026
14d3068
feat: add exit anchor system to portal
tksimeji Mar 21, 2026
681eb5d
remove: remove y provider
tksimeji Mar 21, 2026
5b07f45
feat: add APIs to access islands
tksimeji Mar 21, 2026
ffef12c
feat: add dialog to return island
tksimeji Mar 22, 2026
1557a1c
Merge pull request #4 from AzisabaNetwork/fix/portal
sysnote8main Mar 22, 2026
6d074da
remove: remove old portal implementation
tksimeji Mar 22, 2026
fef07f3
Merge pull request #3 from AzisabaNetwork/feature/portal
sysnote8main Mar 22, 2026
e918b6d
feat: add WorldWiper temp
sysnote8main Mar 20, 2026
888bbf8
feat: add resourcewipe module temp
sysnote8main Mar 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
23 changes: 23 additions & 0 deletions .github/workflows/plugin-resourcewipe-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Plugin ResourceWipe Tests

on:
push:
paths:
- 'plugins/plugin-resourcewipe/**'
pull_request:
paths:
- 'plugins/plugin-resourcewipe/**'

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
- name: Build & test plugin module
run: |
./gradlew :plugins:plugin-resourcewipe:test -x :folia-api:compileJava -x :folia-api:compileKotlin --no-daemon
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ build
/paper-api-generator

.idea/

.DS_Store
130 changes: 130 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
**Agents Guide**
- Purpose: short, actionable instructions for automated coding agents operating in this repo
- Location: run all commands from repository root; use `./gradlew` (wrapper) to ensure the correct Gradle/JDK/tooling

- Important: this repository is a multi-module Kotlin/Java Gradle project (Paper/Folia fork). The build uses Java toolchain 21; tests and run tasks expect JDK 21.

- Quick commands
- Build everything: `./gradlew build` (use `--parallel` for faster builds where appropriate)
- Run checks only: `./gradlew check`
- Run tests for a specific subproject: `./gradlew :plugins:plugin-islands:test`
- Skip tests while building: `./gradlew build -x test`
- Run a development server (Folia): `./gradlew :folia-server:runDevServer`
- Run an assembled server: `./gradlew :folia-server:runServer`
- List available tasks: `./gradlew tasks --all`
- Note: `:folia-server:runServer` and `:folia-server:runDevServer` are configured to depend on plugin shadow JAR tasks (see root `build.gradle.kts` `gradle.projectsEvaluated` block). When run, generated plugin JARs are passed to the server via `--add-plugin` arguments.

- Running a single test (recommended way)
- Run a single test class in a subproject (Gradle + JUnit 5):

```bash
./gradlew :plugins:plugin-islands:test --tests "net.azisaba.vanilife.islands.portal.HologramSpawnerTest"
```

- Run a single test method:

```bash
./gradlew :plugins:plugin-islands:test --tests "net.azisaba.vanilife.islands.portal.HologramSpawnerTest.testSpawnHologram"
```

- Notes:
- Use the fully qualified class name. Surround the `--tests` pattern with quotes to avoid shell expansion.
- Gradle's `--tests` supports patterns/wildcards (e.g. `*Hologram*`).
- Some projects (notably `:folia-server`) configure `useJUnitPlatform { excludeTags("Slow") }` in their `test` task. By default slow tests will be skipped there.
- If a test task adds JVM agents (mockito agent for Java 21) or other `jvmArgumentProviders`, the task configuration will inject them automatically — prefer the Gradle task above over running tests with raw `java`.
- For example, `:folia-server` and `:folia-api` register a `mockitoAgent` configuration and use a `MockitoAgentProvider` added to `tasks.test`'s `jvmArgumentProviders`, so `-javaagent:` arguments are injected automatically (see `folia-server/build.gradle.kts` and `folia-api/build.gradle.kts`).

- Debugging tests
- Run with stacktrace and verbose logging: add `--stacktrace --info` or `--debug` to your Gradle command.
- IDE: use IntelliJ's Run gutter for quick single-test execution and debugging.

- Lint & formatting
- There is no enforced ktlint/detekt/spotless configuration in repository root. The project uses Kotlin and Java; prefer the Kotlin official style and IntelliJ formatter.
- Note: there is no enforced ktlint/detekt/spotless Gradle configuration, but an IDE ktlint configuration file exists at `.idea/ktlint-plugin.xml` (IDE-level only; not enforced by the build).
- Recommended (not yet configured): add `ktlint` and `detekt` and wire them into `./gradlew check`.
- Import rules: avoid wildcard imports (`*`), group and order imports sensibly (standard library -> third party -> project), and keep imports alphabetized inside groups.

- Code Style Guidelines (applies to Kotlin & Java plugin code)
- Language & tooling
- Kotlin is the primary language for plugin code under `plugins/`.
- Java code exists (server/upstream). Keep Java changes idiomatic to the surrounding code style.
- Use the Gradle wrapper `./gradlew` and Java toolchain (Java 21) defined by the build scripts.

- Formatting
- Use 4-space indentation.
- Opening brace on same line (Kotlin default style).
- Keep lines reasonably short (wrap at ~120 chars).
- Use the IDE formatter or a project ktlint configuration if added.

- Imports
- No wildcard imports. Be explicit.
- Group imports with a blank line between standard library (kotlin/java), third-party (org/, com/, io/), and project-local packages (`net.azisaba.*`).
- Keep imports alphabetized within each group.

- Naming
- Packages: lower case dot-separated (already `net.azisaba.vanilife.*`).
- Classes/objects: UpperCamelCase.
- Functions / properties: lowerCamelCase.
- Constants (public `const val`): UPPER_SNAKE_CASE inside companion objects or top-level objects.
- Test class names: `<Thing>Test` for unit tests and `*TestSuite` for suites.

- Types & nullability (Kotlin)
- Prefer `val` over `var`. Use `var` only when mutation is required.
- Prefer explicit return types for public functions and members; internal/private functions may omit when obvious.
- Embrace Kotlin nullability: prefer `?.`, `?:`, `let`, and `requireNotNull` where appropriate; avoid unchecked platform-type assumptions when interacting with Java APIs.

- Error handling & logging
- Do not use `e.printStackTrace()` in plugin code. Instead, log contextual information and the exception.
- Example (preferred): `plugin.logger.log(Level.SEVERE, "Failed to update hologram UUID in repository", e)`
- Catch the most specific exception possible. Avoid catching `Throwable` unless you need to guard a boundary and explicitly document why.
- Do not swallow exceptions silently. Log and either handle or rethrow.
- Avoid leaking secrets into logs.

- Coroutines & concurrency
- This project uses coroutines and Folia region dispatchers in plugin code (see `plugin.launch(plugin.regionDispatcher(loc))`).
- When interacting with Folia/async server internals, schedule actions on the correct dispatcher (region/world thread) rather than running blocking logic on caller threads.
- Prefer structured concurrency: tie coroutine lifecycles to plugin lifecycle where appropriate and close resources explicitly.

- Dependency Injection
- Use Koin for DI as in plugin Main classes. Start/stop the `KoinApplication` in `onEnable`/`onDisable` and keep registrations minimal and explicit.

- Public API & documentation
- Add KDoc to public API surface. Keep comments for non-obvious algorithms only.
- Avoid TODOs without ticket/issue references.

- Tests
- Use JUnit 5 (junit-jupiter); tests are configured with `useJUnitPlatform()` in server modules.
- Tag slow/integration tests with `@Tag("Slow")` and be mindful that `:folia-server:test` excludes that tag by default.
- Keep tests hermetic when possible (mock external services). The build already wires a Mockito javaagent for certain test tasks.

- Git / commits
- Follow existing commit message style in the repo (conventional-ish: `fix(module): short description`).
- Do not rewrite or amend commits unless explicitly required and coordinated with repo owners.

- Files and locations that matter (quick map)
- Root build: `build.gradle.kts`
- Version catalog: `gradle/libs.versions.toml`
- Folia/server project: `:folia-server` (tasks: `runServer`, `runDevServer`, `test`)
- Plugins live under `plugins/` (e.g. `:plugins:plugin-islands`, `:plugins:plugin-npc`)

- Cursor/Copilot rules
- Cursor rules (.cursor/rules/ or .cursorrules): none found in repo.
- Copilot instructions (.github/copilot-instructions.md): none found in repo.

- Troubleshooting hints
- If tests warn `SLF4J(W): Defaulting to no-operation (NOP) logger implementation` add a test logging binding (e.g. `org.slf4j:slf4j-simple`) to the test runtime or configure logger inside tests.
- If Gradle fails with a JDK mismatch, ensure JDK 21 is used or rely on `./gradlew` which uses the configured Java toolchain.
- If a test hangs, run the test class directly from IntelliJ with debugger to inspect threads, or rerun Gradle test with `--debug` and `--stacktrace`.

- If you change formatting or static analysis rules
1. Add the tool (ktlint/detekt/spotless) to the Gradle build and wire into `check`.
2. Update this `AGENTS.md` with the exact commands for CI and local runs.

Appendix: Example single-test invocations (copy/paste)

- Class
`./gradlew :plugins:plugin-islands:test --tests "net.azisaba.vanilife.islands.portal.HologramSpawnerTest"`
- Method
`./gradlew :plugins:plugin-islands:test --tests "net.azisaba.vanilife.islands.portal.HologramSpawnerTest.testSpawnHologram"`

If anything in this document is unclear or you need a change to tooling (add ktlint/detekt, configure CI linting, or add a recommended gradle task), update this file and add a short PR explaining why.
68 changes: 62 additions & 6 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import io.papermc.paperweight.tasks.RebuildGitPatches
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.gradle.api.tasks.testing.logging.TestLogEvent
import io.papermc.paperweight.tasks.RebuildGitPatches

plugins {
java // TODO java launcher tasks
id("io.papermc.paperweight.patcher") version "2.0.0-beta.19"
java // ToDo java launcher tasks
alias(libs.plugins.kotlin)
alias(libs.plugins.paperweight.patcher)
alias(libs.plugins.serialization) apply false
alias(libs.plugins.shadow) apply false
}

repositories {
mavenCentral()
}

paperweight {
Expand All @@ -30,11 +38,15 @@ paperweight {
}
}

val paperMavenPublicUrl = "https://repo.papermc.io/repository/maven-public/"
val kotlinx = libs.kotlinx
val packed = libs.packed
val jnoise = libs.jnoise

subprojects {
apply(plugin = "java-library")
apply(plugin = "maven-publish")
apply(plugin = "org.jetbrains.kotlin.jvm")
apply(plugin = "org.jetbrains.kotlin.plugin.serialization")

extensions.configure<JavaPluginExtension> {
toolchain {
Expand All @@ -44,11 +56,16 @@ subprojects {

repositories {
mavenCentral()
maven(paperMavenPublicUrl)
maven("https://repo.azisaba.net/repository/maven-public/")
maven("https://repo.azisaba.net/repository/maven-snapshots/")
maven("https://repo.papermc.io/repository/maven-public/")
maven("https://repo.codemc.io/repository/maven-releases/")
maven("https://maven.pvphub.me/tofaa")
}

dependencies {
"testRuntimeOnly"("org.junit.platform:junit-platform-launcher")
compileOnly(kotlin("stdlib"))
compileOnly(kotlinx.coroutines.core)
}

tasks.withType<AbstractArchiveTask>().configureEach {
Expand Down Expand Up @@ -90,6 +107,29 @@ allprojects {
}
}

project(":folia-server") {
dependencies {
implementation(kotlin("stdlib"))
implementation(kotlinx.coroutines.core)
implementation(jnoise.pipeline)
implementation(packed.core)
implementation(packed.resource)
implementation(packed.server)
}
}

configure(subprojects.filter { it.path.startsWith(":plugins:") }) {
apply(plugin = "com.gradleup.shadow")

dependencies {
compileOnly(project(":folia-api"))
}

tasks.named<ShadowJar>("shadowJar") {
archiveClassifier.set("")
}
}

tasks.register("printMinecraftVersion") {
doLast {
println(providers.gradleProperty("mcVersion").get().trim())
Expand All @@ -101,3 +141,19 @@ tasks.register("printPaperVersion") {
println(project.version)
}
}

gradle.projectsEvaluated {
val pluginProjects = subprojects.filter { it.path.startsWith(":plugins:") }
val pluginShadowJarTasks = pluginProjects.map { it.tasks.named<ShadowJar>("shadowJar") }

listOf("runServer", "runDevServer").forEach { taskName ->
(findProject(":folia-server")?.tasks?.findByName(taskName) as? JavaExec)?.apply {
dependsOn(pluginShadowJarTasks)
doFirst {
pluginShadowJarTasks.forEach { shadowJarTask ->
args("--add-plugin", shadowJarTask.get().archiveFile.get().asFile.absolutePath)
}
}
}
}
}
30 changes: 30 additions & 0 deletions docker/compose.test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
services:
postgres-test-db:
image: postgres:16-alpine
container_name: aetheria-postgres-test
environment:
POSTGRES_USER: test
POSTGRES_PASSWORD: test
POSTGRES_DB: testdb
TZ: Asia/Tokyo
ports:
- "15432:5432"

command: >
postgres
-c fsync=off
-c synchronous_commit=off
-c full_page_writes=off
-c checkpoint_timeout=30min
-c max_wal_size=2GB

tmpfs:
- /var/lib/postgresql/data

healthcheck:
test: ["CMD-SHELL", "pg_isready -U test -d testdb"]
interval: 2s
timeout: 2s
retries: 30

restart: unless-stopped
Loading