|
62 | 62 | <!-- Maven plugins --> |
63 | 63 | <spotless-maven-plugin.version>2.43.0</spotless-maven-plugin.version> |
64 | 64 | <ktfmt.version>0.43</ktfmt.version> |
| 65 | + <maven-surefire-plugin.version>3.5.2</maven-surefire-plugin.version> |
65 | 66 | <maven-enforcer.version>3.4.1</maven-enforcer.version> |
| 67 | + <maven-source-plugin.version>3.3.1</maven-source-plugin.version> |
| 68 | + <dokka-maven-plugin.version>1.9.20</dokka-maven-plugin.version> |
| 69 | + <maven-gpg-plugin.version>3.2.7</maven-gpg-plugin.version> |
| 70 | + <central-publishing-maven-plugin.version>0.6.0</central-publishing-maven-plugin.version> |
66 | 71 | </properties> |
67 | 72 |
|
68 | 73 | <dependencyManagement> |
|
129 | 134 | <testSourceDirectory>src/test/kotlin</testSourceDirectory> |
130 | 135 |
|
131 | 136 | <plugins> |
| 137 | + <!-- Kotlin compilation and kotlinx.serialization codegen --> |
132 | 138 | <plugin> |
133 | 139 | <groupId>org.jetbrains.kotlin</groupId> |
134 | 140 | <artifactId>kotlin-maven-plugin</artifactId> |
|
164 | 170 | </executions> |
165 | 171 | </plugin> |
166 | 172 |
|
| 173 | + <!-- Testing --> |
| 174 | + <plugin> |
| 175 | + <groupId>org.apache.maven.plugins</groupId> |
| 176 | + <artifactId>maven-surefire-plugin</artifactId> |
| 177 | + <version>${maven-surefire-plugin.version}</version> |
| 178 | + </plugin> |
| 179 | + |
167 | 180 | <!-- Formatting with ktfmt --> |
168 | 181 | <plugin> |
169 | 182 | <groupId>com.diffplug.spotless</groupId> |
|
210 | 223 | </execution> |
211 | 224 | </executions> |
212 | 225 | </plugin> |
| 226 | + |
| 227 | + <!-- Generates source file JARs, required for publishing to Maven Central --> |
| 228 | + <plugin> |
| 229 | + <groupId>org.apache.maven.plugins</groupId> |
| 230 | + <artifactId>maven-source-plugin</artifactId> |
| 231 | + <version>${maven-source-plugin.version}</version> |
| 232 | + <executions> |
| 233 | + <execution> |
| 234 | + <id>attach-sources</id> |
| 235 | + <goals> |
| 236 | + <goal>jar-no-fork</goal> |
| 237 | + </goals> |
| 238 | + </execution> |
| 239 | + </executions> |
| 240 | + </plugin> |
| 241 | + |
| 242 | + <!-- Generates Javadoc JAR, required for publishing to Maven Central --> |
| 243 | + <plugin> |
| 244 | + <groupId>org.jetbrains.dokka</groupId> |
| 245 | + <artifactId>dokka-maven-plugin</artifactId> |
| 246 | + <version>${dokka-maven-plugin.version}</version> |
| 247 | + <executions> |
| 248 | + <execution> |
| 249 | + <phase>prepare-package</phase> |
| 250 | + <goals> |
| 251 | + <goal>javadocJar</goal> |
| 252 | + </goals> |
| 253 | + </execution> |
| 254 | + </executions> |
| 255 | + </plugin> |
| 256 | + |
| 257 | + <!-- Signs built artifacts with GPG, required for publishing to Maven Central --> |
| 258 | + <plugin> |
| 259 | + <groupId>org.apache.maven.plugins</groupId> |
| 260 | + <artifactId>maven-gpg-plugin</artifactId> |
| 261 | + <version>${maven-gpg-plugin.version}</version> |
| 262 | + <executions> |
| 263 | + <execution> |
| 264 | + <id>sign-artifacts</id> |
| 265 | + <phase>verify</phase> |
| 266 | + <goals> |
| 267 | + <goal>sign</goal> |
| 268 | + </goals> |
| 269 | + <configuration> |
| 270 | + <bestPractices>true</bestPractices> |
| 271 | + <keyname>${gpg.keyname}</keyname> |
| 272 | + </configuration> |
| 273 | + </execution> |
| 274 | + </executions> |
| 275 | + </plugin> |
| 276 | + |
| 277 | + <!-- Publishes to Maven Central --> |
| 278 | + <plugin> |
| 279 | + <groupId>org.sonatype.central</groupId> |
| 280 | + <artifactId>central-publishing-maven-plugin</artifactId> |
| 281 | + <version>${central-publishing-maven-plugin.version}</version> |
| 282 | + <extensions>true</extensions> |
| 283 | + <configuration> |
| 284 | + <publishingServerId>central</publishingServerId> |
| 285 | + <deploymentName>${artifactId} v${version}</deploymentName> |
| 286 | + </configuration> |
| 287 | + </plugin> |
213 | 288 | </plugins> |
214 | 289 | </build> |
215 | 290 | </project> |
0 commit comments