Skip to content

Commit c0c9ab0

Browse files
committed
#1: Add "Usage" note
1 parent e0d22bd commit c0c9ab0

1 file changed

Lines changed: 36 additions & 3 deletions

File tree

README.md

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,39 @@
1010
[![Semantic Versioning](https://img.shields.io/badge/-semantic%20versioning-333333)](https://semver.org/)
1111
[![Automated Release Notes by gren](https://img.shields.io/badge/%F0%9F%A4%96-release%20notes-00B2EE)](https://github-tools.github.io/github-release-notes/)
1212

13+
## Usage
14+
15+
<details open>
16+
<summary><code>build.gradle.kts</code></summary>
17+
18+
```kotlin
19+
repositories {
20+
mavenCentral()
21+
}
22+
23+
dependencies {
24+
compileOnly(group = "pl.tlinkowski.annotation", name = "basic-annotations", version = "0.1.0")
25+
}
26+
```
27+
28+
</details>
29+
<details>
30+
<summary><code>build.gradle</code></summary>
31+
32+
```groovy
33+
repositories {
34+
mavenCentral()
35+
}
36+
37+
dependencies {
38+
compileOnly group: 'pl.tlinkowski.annotation', name: 'basic-annotations', version: '0.1.0'
39+
}
40+
```
41+
42+
</details>
43+
44+
## Purpose
45+
1346
The purpose of this library is to provide a couple of basic annotations related to the following concepts:
1447

1548
1. [Nullability](#nullability)
@@ -20,7 +53,7 @@ The purpose of this library is to provide a couple of basic annotations related
2053

2154
3. [Miscellaneous](#miscellaneous)
2255

23-
## Nullability
56+
### Nullability
2457

2558
The approach to nullability taken by this library is:
2659

@@ -78,7 +111,7 @@ However, should the state of JSR 305 change in favor of dropping its usage, this
78111
of this library is to provide `@NonNullPackage` and `@NullOr` annotations that work in the best currently
79112
possible way.
80113

81-
## Mutability
114+
### Mutability
82115

83116
The approach to mutability of [`Collection`](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Collection.html)s
84117
(but also [`Iterator`](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Iterator.html)s)
@@ -142,7 +175,7 @@ is done, this library will probably migrate to some
142175
[new annotations](https://github.com/Kotlin/KEEP/blob/jvm-meta-annotations-artifact/proposals/jvm-meta-annotations-artifact.md)
143176
that can be understood by Kotlin.
144177

145-
## Miscellaneous
178+
### Miscellaneous
146179

147180
- [`@VisibleForTesting`](subprojects/basic-annotations/src/main/java/pl/tlinkowski/annotation/basic/VisibleForTesting.java):
148181
Corresponds to Guava's

0 commit comments

Comments
 (0)