Skip to content

Commit a596fab

Browse files
Add headers to getting started doc to make eye-scanning easier (#94)
* Add headers to getting started doc to make eye-scanning easier * update docs --------- Co-authored-by: Martin Bonnin <martin@mbonnin.net>
1 parent 44a3603 commit a596fab

1 file changed

Lines changed: 25 additions & 31 deletions

File tree

docs/src/content/docs/index.md

Lines changed: 25 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,17 @@ title: Welcome to Librarian
55
Librarian is an opinionated toolkit to build Kotlin libraries.
66

77
:::note
8-
This project is work in progress
8+
This project is work in progress, this documentation itself is work in progress.
9+
If you have questions, please ask in the `#gradleup` channel in the [Gradle community Slack](https://gradle-community.slack.com/).
910

1011
:::
1112

1213
Librarian:
1314

1415
* publishes your KMP/Android/JVM libraries to:
15-
* Maven Central using [default host](https://central.sonatype.org/publish/publish-guide/#releasing-to-central)
16-
* Maven Central using [S01 host](https://central.sonatype.org/publish/publish-guide/#releasing-to-central)
17-
* Maven Central using [the central portal API](https://central.sonatype.com/api-doc)
18-
* OSS Sonatype snapshots using the default host
19-
* OSS Sonatype snapshots using the S01 host
16+
* Maven Central releases
17+
* Maven Central snapshots
2018
* [Google Cloud Storage](https://cloud.google.com/storage?hl=en)
21-
* GitHub pages snapshots
2219
* generates versioned KDoc using [Dokka](https://github.com/Kotlin/dokka)
2320
* automates your workflows using GitHub actions:
2421
* pull requests
@@ -29,67 +26,64 @@ Librarian:
2926
* monitors your binary compatibility using Kotlin Binary Compatibility validator
3027
* configures Java and Kotlin compatibility
3128
* ensure your libs can be consumed with maven
32-
* manages your changelog
3329
* and more!
3430

35-
This is a lot of things for a single tool, and a lot of opinions too!
36-
37-
Because every lib is different and opinions may differ, Librarian is also shipped as low level libraries that you can use on a case by case basis.
38-
39-
Just want the publishing without the GitHub workflows, use `librarian-publishing`. Just want maven sympathy, use `librarian-maven-sympathy`, etc... For more information, read the [libraries page](libraries.md).
4031

4132
## Get started
4233

34+
### 1/4 Add it to your project
35+
4336
Add the Gradle plugin to your root `build.gradle.kts`:
4437

4538
```kotlin
4639
plugins {
47-
id("com.gradleup.librarian")
40+
id("com.gradleup.librarian").apply(false)
4841
}
4942

5043
Librarian.root(project)
5144
```
5245

53-
Add a librarian.root.properties:
46+
### 2/4 Root project configuration
5447

55-
```
56-
# Maven Central backend to use
57-
# Valid values: Default, S01, Portal
58-
sonatype.backend=Default
48+
Add a `librarian.root.properties` file to the root of your repository:
5949

60-
# Common POM (Project Object Model) information for your repository
61-
pom.groupId=com.gradleup.librarian
50+
```
51+
# Common information for your repository
52+
pom.groupId=com.example
6253
pom.version=0.0.7-SNAPSHOT
63-
pom.description=Librarian
64-
pom.vcsUrl=https://github.com/gradleup/librarian
65-
pom.developer=GradleUp authors
66-
pom.license=MIT License
54+
pom.description=Cool library
55+
pom.vcsUrl=https://github.com/example/cool
56+
pom.developer=Cool library authors
57+
pom.license=MIT
6758
6859
# Optional: publish to Google Cloud Storage
6960
gcs.bucket=gradleup
7061
gcs.prefix=m2
7162
72-
# Optional: configure java compatibility
63+
# Optional: configure compatibility
7364
java.compatibility=11
7465
kotlin.compatibility=2.0.0
7566
76-
# Optional: publish several versions of the Kdoc (requires them to be already published)
67+
# Optional: publish older versions of the Kdoc (requires them to be already published)
7768
kdoc.olderVersions=1.0.0,2.0.0
7869
```
7970

80-
Configure librarian in each module:
71+
### 3/4 Project specific configuration
72+
73+
Configure librarian in each subproject:
8174

8275
```kotlin
8376
// module/build.gradle.kts
8477
plugins {
85-
id("org.jetbrains.kotlin.jvm")
8678
// no need to add librarian here, it's already on the classpath
8779
}
8880

8981
// Configure librarian
9082
Librarian.module(project)
9183
```
9284

85+
### 4/4 Add the signing and publishing secrets
86+
9387
Add secrets to your environment:
9488

9589
```
@@ -100,6 +94,8 @@ export LIBRARIAN_SIGNING_PRIVATE_KEY_PASSWORD=...
10094
export LIBRARIAN_GOOGLE_SERVICES_JSON=...
10195
```
10296

97+
### You can now publish the library!
98+
10399
Publish your library:
104100

105101
```
@@ -108,5 +104,3 @@ Publish your library:
108104
./gradlew librarianPublishToGcs
109105
```
110106

111-
Automate your workflows:
112-

0 commit comments

Comments
 (0)