Skip to content

Commit d892d62

Browse files
Update ReadMe.md to include build and publishing instructions
1 parent c13baff commit d892d62

File tree

1 file changed

+32
-1
lines changed

1 file changed

+32
-1
lines changed

ReadMe.md

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,35 @@
33
Codesize is a tool for calculating the bytecode size of a Java class file, ZIP/JAR archive.
44
It is being used by Robocode to calculate the code size of robots after having compiled these.
55

6-
Read more about the [Code Size](https://robowiki.net/wiki/Code_Size) on the RoboWiki.
6+
Read more about the [Code Size](https://robowiki.net/wiki/Code_Size) on the RoboWiki.
7+
8+
## Build
9+
10+
To build Codesize, use Gradle:
11+
12+
```sh
13+
./gradlew build
14+
```
15+
16+
This will compile the project and create the JAR file in the `build/libs` directory.
17+
18+
## Publishing
19+
20+
Codesize uses in-memory PGP signing for publishing to OSSRH (Maven Central). You must provide the following properties
21+
in your `gradle.properties`:
22+
23+
```
24+
signing.keyId=YOUR_KEY_ID
25+
signingKey=YOUR_ASCII_ARMOR_PRIVATE_KEY
26+
signingPassword=YOUR_KEY_PASSWORD
27+
ossrhUsername=YOUR_OSSRH_USERNAME
28+
ossrhPassword=YOUR_OSSRH_PASSWORD
29+
```
30+
31+
To publish the artifact:
32+
33+
```sh
34+
./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository
35+
```
36+
37+
This will sign and upload the artifacts to the configured OSSRH repository.

0 commit comments

Comments
 (0)