Skip to content

Commit a559027

Browse files
committed
Document annotation module changes
1 parent ba2a8e9 commit a559027

File tree

2 files changed

+92
-15
lines changed

2 files changed

+92
-15
lines changed

docs/en/dev-setup/annotations.md

Lines changed: 88 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
order: 3
3-
preferences: ["build-system"]
3+
preferences: ["build-system", "paper-spigot"]
44
authors:
55
- DerEchtePilz
66
- willkroboth
@@ -14,14 +14,15 @@ The annotation system is a separate part of the CommandAPI, and as a result it n
1414
The annotation system effectively needs to be added twice: Once for compilation and again to invoke the annotation processor itself.
1515

1616
<div class="maven">
17+
<div class="paper">
1718

1819
- Add the annotation dependency to your `pom.xml`:
1920

2021
```xml
2122
<dependencies>
2223
<dependency>
2324
<groupId>dev.jorel</groupId>
24-
<artifactId>commandapi-annotations</artifactId>
25+
<artifactId>commandapi-paper-annotations</artifactId>
2526
<version>11.0.0</version>
2627
<scope>provided</scope>
2728
</dependency>
@@ -41,7 +42,7 @@ The annotation system effectively needs to be added twice: Once for compilation
4142
<annotationProcessorPaths>
4243
<path>
4344
<groupId>dev.jorel</groupId>
44-
<artifactId>commandapi-annotations</artifactId>
45+
<artifactId>commandapi-paper-annotations</artifactId>
4546
<version>11.0.0</version>
4647
</path>
4748
</annotationProcessorPaths>
@@ -51,49 +52,121 @@ The annotation system effectively needs to be added twice: Once for compilation
5152
</build>
5253
```
5354

55+
</div>
56+
<div class="spigot">
57+
58+
- Add the annotation dependency to your `pom.xml`:
59+
60+
```xml
61+
<dependencies>
62+
<dependency>
63+
<groupId>dev.jorel</groupId>
64+
<artifactId>commandapi-spigot-annotations</artifactId>
65+
<version>11.0.0</version>
66+
<scope>provided</scope>
67+
</dependency>
68+
</dependencies>
69+
```
70+
71+
- Add the annotation processor as an annotation process to the compile task in the `pom.xml`:
72+
73+
```xml
74+
<build>
75+
<plugins>
76+
<plugin>
77+
<groupId>org.apache.maven.plugins</groupId>
78+
<artifactId>maven-compiler-plugin</artifactId>
79+
<version>3.8.1</version>
80+
<configuration>
81+
<annotationProcessorPaths>
82+
<path>
83+
<groupId>dev.jorel</groupId>
84+
<artifactId>commandapi-spigot-annotations</artifactId>
85+
<version>11.0.0</version>
86+
</path>
87+
</annotationProcessorPaths>
88+
</configuration>
89+
</plugin>
90+
</plugins>
91+
</build>
92+
```
93+
94+
</div>
5495
</div>
5596
<div class="gradle">
5697

57-
- If you haven't already done so, add the maven central repository to your `build.gradle` file:
98+
<div class="groovy">
5899

59-
<div class="groovy">
100+
- If you haven't already done so, add the maven central repository to your `build.gradle` file:
60101

61102
```groovy
62103
repositories {
63104
mavenCentral()
64105
maven { url = "https://repo.codemc.org/repository/maven-public/" }
65106
}
66107
```
67-
</div>
68-
<div class="kts">
108+
</div>
109+
<div class="kts">
110+
111+
- If you haven't already done so, add the maven central repository to your `build.gradle.kts` file:
69112

70113
```kotlin
71114
repositories {
72115
mavenCentral()
73116
maven(url = "https://repo.codemc.org/repository/maven-public/")
74117
}
75118
```
76-
</div>
119+
</div>
77120

78-
- Add the dependency and annotation processor to your list of dependencies in your `build.gradle` file:
121+
<div class="groovy">
79122

80-
<div class="groovy">
123+
- Add the dependency and annotation processor to your list of dependencies in your `build.gradle` file:
81124

125+
<div class="paper">
126+
82127
```groovy
83128
dependencies {
84-
compileOnly "dev.jorel:commandapi-annotations:11.0.0"
85-
annotationProcessor "dev.jorel:commandapi-annotations:11.0.0"
129+
compileOnly "dev.jorel:commandapi-paper-annotations:11.0.0"
130+
annotationProcessor "dev.jorel:commandapi-paper-annotations:11.0.0"
86131
}
87132
```
133+
88134
</div>
89-
<div class="kts">
135+
<div class="spigot">
136+
137+
```groovy
138+
dependencies {
139+
compileOnly "dev.jorel:commandapi-spigot-annotations:11.0.0"
140+
annotationProcessor "dev.jorel:commandapi-spigot-annotations:11.0.0"
141+
}
142+
```
143+
144+
</div>
145+
</div>
146+
<div class="kts">
147+
148+
- Add the dependency and annotation processor to your list of dependencies in your `build.gradle.kts` file:
149+
150+
<div class="paper">
151+
152+
```kotlin
153+
dependencies {
154+
compileOnly("dev.jorel:commandapi-paper-annotations:11.0.0")
155+
annotationProcessor("dev.jorel:commandapi-paper-annotations:11.0.0")
156+
}
157+
```
90158

159+
</div>
160+
<div class="spigot">
161+
91162
```kotlin
92163
dependencies {
93-
compileOnly("dev.jorel:commandapi-annotations:11.0.0")
94-
annotationProcessor("dev.jorel:commandapi-annotations:11.0.0")
164+
compileOnly("dev.jorel:commandapi-spigot-annotations:11.0.0")
165+
annotationProcessor("dev.jorel:commandapi-spigot-annotations:11.0.0")
95166
}
96167
```
168+
97169
</div>
170+
</div>
98171

99172
</div>

docs/en/upgrading-parts/10.1.2-to-11.0.0.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ More dependency-related changes have taken place, here they all are listed:
2626
- commandapi-bukkit-test-toolkit
2727
+ commandapi-paper-test-toolkit
2828
+ commandapi-spigot-test-toolkit
29+
30+
- commandapi-annotations
31+
+ commandapi-paper-annotations
32+
+ commandapi-spigot-annotations
2933
```
3034

3135
:::danger **Developer's Note:**

0 commit comments

Comments
 (0)