Skip to content

Commit d2373b5

Browse files
authored
Merge pull request #7 from ChafficPlugins/release/v0.0.1
release: prepare version 0.0.1
2 parents f234bef + 3a8b48b commit d2373b5

File tree

27 files changed

+665
-49
lines changed

27 files changed

+665
-49
lines changed

.gitbook.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root: ./docs
2+
3+
structure:
4+
readme: README.md
5+
summary: SUMMARY.md
6+
7+
redirects:
8+
guide/getting-started: ./guide/getting-started.md
9+
api/overview: ./api/overview.md

.github/workflows/build.yml

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,15 @@ permissions:
1010
contents: read
1111
checks: write
1212
pull-requests: write
13+
pages: write
14+
id-token: write
1315

1416
jobs:
1517
build:
1618
runs-on: ubuntu-latest
19+
environment:
20+
name: github-pages
21+
url: ${{ steps.deployment.outputs.page_url }}
1722
steps:
1823
- uses: actions/checkout@v4
1924

@@ -45,18 +50,4 @@ jobs:
4550
fail_ci_if_error: false
4651

4752
- name: Generate Documentation
48-
run: ./gradlew dokkaHtml --no-daemon
49-
50-
- name: Archive documentation
51-
uses: actions/upload-artifact@v4
52-
with:
53-
name: documentation
54-
path: build/dokka/html/
55-
retention-days: 14
56-
57-
- name: Check Code Coverage
58-
run: |
59-
./gradlew jacocoTestCoverageVerification --no-daemon || {
60-
echo "Code coverage is below 80%"
61-
exit 1
62-
}
53+
run: ./gradlew dokkaHtml --no-daemon

.github/workflows/release.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,8 @@ jobs:
5454
draft: false
5555
prerelease: false
5656
files: |
57-
build/libs/ChafficLib-${{ github.ref_name }}.jar
58-
build/libs/ChafficLib-${{ github.ref_name }}-sources.jar
59-
build/libs/ChafficLib-${{ github.ref_name }}-javadoc.jar
57+
build/libs/ChafficLib-*.jar
58+
!build/libs/ChafficLib-*-all.jar
6059
body_path: ${{ github.workspace }}/CHANGELOG.md
6160
generate_release_notes: true
6261

CHANGELOG.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [0.0.1] - 2024-11-19
11+
1012
### Added
1113
- Initial project setup
1214
- CI/CD pipeline with GitHub Actions
1315
- Code coverage requirements (80% minimum)
1416
- Documentation generation with Dokka
17+
- Initial documentation structure with GitBook configuration
18+
- Getting started guide and installation instructions
19+
- API documentation placeholders for future content
1520
- Contribution guidelines
1621
- Version support documentation
17-
18-
## [0.0.1] - 2024-01-17
19-
20-
### Added
21-
- Basic project structure
22-
- Gradle build configuration
23-
- Testing framework setup
24-
- Initial documentation
22+
- Testing framework setup with JUnit 5 and MockBukkit
23+
- Test utilities for common testing scenarios
24+
- Example tests verifying framework functionality
25+
- Comprehensive test logging configuration
2526

2627
[Unreleased]: https://github.com/chafficui/ChafficLib/compare/v0.0.1...HEAD
2728
[0.0.1]: https://github.com/chafficui/ChafficLib/releases/tag/v0.0.1

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ Format: `should_expectedBehavior_when_condition`
218218
Example: `should_throwException_when_inventoryIsFull`
219219

220220
### Coverage Requirements
221-
- Minimum 80% code coverage
221+
- Minimum 70% code coverage
222222
- 100% coverage for critical components
223223
- Test all edge cases
224224
- Include both positive and negative tests

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ We follow [Semantic Versioning](https://semver.org/). Check [VERSIONS.md](VERSIO
7878
5. Open a Pull Request
7979

8080
### Requirements for Pull Requests
81-
- 80% code coverage minimum
81+
- 70% code coverage minimum
8282
- Complete documentation for public APIs
8383
- Passing CI checks
8484
- Following our [coding standards](CONTRIBUTING.md)
@@ -91,5 +91,5 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
9191

9292
- 🌐 [Website](https://felixbeinssen.net)
9393
- 📚 [Documentation](https://chafficplugins.gitbook.io/chafficlib/)
94-
- 💬 [Discord](https://discord.gg/XXXXX)
94+
- 💬 [Discord](https://discord.gg/RPZBhB4rna)
9595
- 🐛 [Issue Tracker](https://github.com/chafficplugins/ChafficLib/issues)

VERSIONS.md

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ ChafficLib follows semantic versioning (MAJOR.MINOR.PATCH) and provides Long Ter
66

77
| Version | Release Date | Support Status | Minecraft Versions | End of Life |
88
|---------|--------------|----------------|-------------------|-------------|
9-
| 1.0.x | 2025-Q2 | LTS | 1.20.x - 1.21.x | 2026-Q1 |
10-
| 0.0.x | 2025-Q1 | Development | 1.20.x - 1.21.x | N/A |
9+
| 0.0.x | 2024-11-19 | Development | 1.20.x - 1.21.x | N/A |
1110

1211
## Release Types
1312

@@ -62,10 +61,8 @@ ChafficLib follows semantic versioning (MAJOR.MINOR.PATCH) and provides Long Ter
6261

6362
## Release Schedule 2024
6463

65-
| Version | Type | Release Date | EOL Date |
66-
|---------|----------|--------------|------------|
67-
| 1.0.0 | LTS | 2024-Q1 | 2025-Q1 |
68-
| 1.1.0 | Regular | 2024-Q2 | 2024-Q3 |
69-
| 1.2.0 | Regular | 2024-Q3 | 2024-Q4 |
70-
| 1.3.0 | Regular | 2024-Q4 | 2025-Q1 |
71-
| 2.0.0 | LTS | 2025-Q1 | 2026-Q1 |
64+
| Version | Type | Release Date | EOL Date |
65+
|---------|----------|--------------|----------|
66+
| 0.1.0 | Regular | 2024-Q4 | 2025-Q1 |
67+
| 0.2.0 | Regular | 2025-Q1 | 2025-Q2 |
68+
| 1.0.0 | LTS | 2025-Q2 | 2026-Q2 |

build.gradle.kts

Lines changed: 86 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ repositories {
1616
maven("https://oss.sonatype.org/content/groups/public/") {
1717
name = "sonatype"
1818
}
19+
maven("https://repo.papermc.io/repository/maven-public/") {
20+
name = "papermc"
21+
}
1922
}
2023

2124
dependencies {
@@ -28,6 +31,7 @@ dependencies {
2831
testImplementation("com.github.seeseemelk:MockBukkit-v1.21:3.133.2")
2932
testImplementation("org.mockito.kotlin:mockito-kotlin:5.4.0")
3033
testImplementation("org.jetbrains.kotlin:kotlin-test-junit5")
34+
testImplementation("io.papermc.paper:paper-api:1.21.3-R0.1-SNAPSHOT")
3135
}
3236

3337
val targetJavaVersion = 21
@@ -36,9 +40,68 @@ kotlin {
3640
}
3741

3842
tasks {
43+
shadowJar {
44+
archiveClassifier.set("")
45+
archiveBaseName.set("ChafficLib")
46+
archiveVersion.set(version.toString())
47+
}
48+
49+
jar {
50+
archiveBaseName.set("ChafficLib")
51+
archiveVersion.set(version.toString())
52+
}
53+
54+
javadoc {
55+
options.encoding = "UTF-8"
56+
}
57+
58+
register<Jar>("sourcesJar") {
59+
archiveClassifier.set("sources")
60+
from(sourceSets.main.get().allSource)
61+
}
62+
63+
register<Jar>("javadocJar") {
64+
dependsOn(javadoc)
65+
archiveClassifier.set("javadoc")
66+
from(javadoc.get().destinationDir)
67+
}
68+
69+
build {
70+
dependsOn(shadowJar)
71+
dependsOn("sourcesJar")
72+
dependsOn("javadocJar")
73+
dependsOn(jacocoTestCoverageVerification)
74+
}
75+
3976
test {
4077
useJUnitPlatform()
4178
finalizedBy(jacocoTestReport)
79+
80+
testLogging {
81+
events("PASSED", "SKIPPED", "FAILED", "STANDARD_OUT", "STANDARD_ERROR")
82+
83+
showExceptions = true
84+
showCauses = true
85+
showStackTraces = true
86+
87+
showStandardStreams = true
88+
89+
displayGranularity = 2
90+
91+
afterSuite(
92+
KotlinClosure2({ desc: TestDescriptor, result: TestResult ->
93+
if (desc.parent == null) {
94+
println("\nTest result: ${result.resultType}")
95+
println(
96+
"Test summary: ${result.testCount} tests, " +
97+
"${result.successfulTestCount} succeeded, " +
98+
"${result.failedTestCount} failed, " +
99+
"${result.skippedTestCount} skipped",
100+
)
101+
}
102+
}),
103+
)
104+
}
42105
}
43106

44107
jacocoTestReport {
@@ -47,21 +110,38 @@ tasks {
47110
xml.required.set(true)
48111
html.required.set(true)
49112
}
113+
114+
classDirectories.setFrom(
115+
files(
116+
classDirectories.files.map {
117+
fileTree(it) {
118+
exclude("**/*\$Companion\$*.*")
119+
}
120+
},
121+
),
122+
)
50123
}
51124

52125
jacocoTestCoverageVerification {
53126
violationRules {
54127
rule {
55128
limit {
56-
minimum = "0.8".toBigDecimal()
129+
minimum = "0.7".toBigDecimal()
57130
}
131+
element = "CLASS"
132+
excludes = listOf("*.Companion")
58133
}
59-
}
60-
}
61134

62-
build {
63-
dependsOn(shadowJar)
64-
dependsOn(jacocoTestCoverageVerification)
135+
rule {
136+
element = "METHOD"
137+
excludes = listOf("@javax.annotation.Generated")
138+
}
139+
140+
rule {
141+
element = "METHOD"
142+
excludes = listOf("*\$\$inlined*", "*\$Companion\$*")
143+
}
144+
}
65145
}
66146

67147
dokkaHtml {

codecov.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ coverage:
22
status:
33
project:
44
default:
5-
target: 80%
5+
target: 70%
66
threshold: 1%
77
patch:
88
default:
9-
target: 80%
9+
target: 70%
1010
threshold: 1%
1111

1212
comment:

docs/README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# ChafficLib Documentation
2+
3+
Welcome to the ChafficLib documentation! This guide will help you get started with using ChafficLib in your Spigot plugins.
4+
5+
## Quick Links
6+
7+
- [Getting Started](guide/getting-started.md)
8+
- [API Reference](api/overview.md)
9+
- [GitHub Repository](https://github.com/chafficplugins/ChafficLib)
10+
11+
## Features
12+
13+
- 🎮 GUI System - Create intuitive inventory interfaces
14+
- ⚙️ Configuration System - Type-safe configuration handling
15+
- 💾 Database System - Easy database integration
16+
- 🛠️ Item System - Streamlined item creation
17+
- ✨ Effects System - Particle and sound effects
18+
- 📝 Event System - Simplified event handling
19+
- 🎯 Command System - Annotation-based commands
20+
21+
## Support
22+
23+
Need help? Check our:
24+
- [Discord Server](https://discord.gg/RPZBhB4rna)
25+
- [Issue Tracker](https://github.com/chafficplugins/ChafficLib/issues)
26+
- [API Documentation](api/overview.md)

0 commit comments

Comments
 (0)