You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* generates versioned KDoc using [Dokka](https://github.com/Kotlin/dokka)
23
20
* automates your workflows using GitHub actions:
24
21
* pull requests
@@ -29,67 +26,64 @@ Librarian:
29
26
* monitors your binary compatibility using Kotlin Binary Compatibility validator
30
27
* configures Java and Kotlin compatibility
31
28
* ensure your libs can be consumed with maven
32
-
* manages your changelog
33
29
* and more!
34
30
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).
40
31
41
32
## Get started
42
33
34
+
### 1/4 Add it to your project
35
+
43
36
Add the Gradle plugin to your root `build.gradle.kts`:
44
37
45
38
```kotlin
46
39
plugins {
47
-
id("com.gradleup.librarian")
40
+
id("com.gradleup.librarian").apply(false)
48
41
}
49
42
50
43
Librarian.root(project)
51
44
```
52
45
53
-
Add a librarian.root.properties:
46
+
### 2/4 Root project configuration
54
47
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:
59
49
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
62
53
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
67
58
68
59
# Optional: publish to Google Cloud Storage
69
60
gcs.bucket=gradleup
70
61
gcs.prefix=m2
71
62
72
-
# Optional: configure java compatibility
63
+
# Optional: configure compatibility
73
64
java.compatibility=11
74
65
kotlin.compatibility=2.0.0
75
66
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)
77
68
kdoc.olderVersions=1.0.0,2.0.0
78
69
```
79
70
80
-
Configure librarian in each module:
71
+
### 3/4 Project specific configuration
72
+
73
+
Configure librarian in each subproject:
81
74
82
75
```kotlin
83
76
// module/build.gradle.kts
84
77
plugins {
85
-
id("org.jetbrains.kotlin.jvm")
86
78
// no need to add librarian here, it's already on the classpath
0 commit comments