Skip to content

Commit 3bdab81

Browse files
committed
Make unified README and CONTRIBUTING files
1 parent 1f88f6c commit 3bdab81

File tree

7 files changed

+108
-35
lines changed

7 files changed

+108
-35
lines changed

CONTRIBUTING.md

Lines changed: 79 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,79 @@
1-
# Contributing to the Kotlin Notebook IntelliJ Platform Integration
2-
3-
The current local development process involves a few manual steps:
4-
5-
1. Create a `Local.json` file with the following content:
6-
```json
7-
{
8-
"description": "IntelliJ Platform that can be used in embedded mode of Kotlin Notebook",
9-
"properties": [
10-
{ "name": "v", "value": "0.0.2-%VERSION%-SNAPSHOT" },
11-
{ "name": "v-renovate-hint", "value": "update: package=org.jetbrains.kotlinx:kotlin-jupyter-intellij-platform" }
12-
],
13-
"link": "https://plugins.jetbrains.com/docs/intellij/welcome.html",
14-
"repositories": [
15-
"https://packages.jetbrains.team/maven/p/kds/kotlin-ds-maven"
16-
],
17-
"dependencies": [
18-
"org.jetbrains.kotlinx:kotlin-jupyter-intellij-platform:$v"
19-
]
20-
}
21-
```
22-
2. Edit `gradle.properties` and increase the `devAddition` property from `1` to `2`.
23-
3. Update the `Local.json` file to replace `%VERSION%` with the same version number used in the previous step, for example changing `2` to get "0.0.2-2-SNAPSHOT".
24-
4. Run the `publishToMavenLocal` task to publish the integration locally.
25-
5. Load the local integration artifact using `%use /path/to/Local.json` instead of `%use intellij-platform`.
26-
6. Reload the Kotlin Notebook Kernel.
27-
28-
To publish a newer version of the local artifact, repeat steps 2-6.
29-
Note that updating the version number is necessary to invalidate the dependency cache.
1+
# Contributing to kotlin-notebook-integrations
2+
3+
This is a single, common contributing guide for all integrations in this repository
4+
(database, http-util, intellij-platform, etc.).
5+
6+
## Local development flow (for any integration)
7+
8+
1. Create a local JSON descriptor file (example name: `Local.json`).
9+
Put into it only what you plan to use (see the dependencies note below).
10+
A minimal template looks like this:
11+
12+
```json
13+
{
14+
"description": "Local snapshot of a Kotlin Notebook integration",
15+
"properties": [
16+
{ "name": "v", "value": "0.1.0-%VERSION%-SNAPSHOT" }
17+
],
18+
"repositories": [
19+
"*mavenLocal"
20+
],
21+
"dependencies": [
22+
"org.jetbrains.kotlinx:ARTIFACT_ID:$v"
23+
]
24+
}
25+
```
26+
27+
Replace `ARTIFACT_ID` with the integration you work on, for example:
28+
- `kotlin-jupyter-database`
29+
- `kotlin-jupyter-serialization`
30+
- `kotlin-jupyter-ktor-client`
31+
- `kotlin-jupyter-intellij-platform`
32+
33+
2. In the repository root, open `gradle.properties` and increase `devAddition` by 1 (e.g., `1 → 2`).
34+
35+
3. In your JSON file, replace `%VERSION%` with the same number from the previous step, so the property `v`
36+
becomes something like `0.1.0-2-SNAPSHOT`.
37+
38+
4. Publish the module you are working on to your local Maven repository:
39+
- Database API: `./gradlew :integrations:database:database-api:publishToMavenLocal`
40+
- HTTP util – Serialization: `./gradlew :integrations:http-util:serialization:publishToMavenLocal`
41+
- HTTP util – Ktor Client: `./gradlew :integrations:http-util:ktor-client:publishToMavenLocal`
42+
- IntelliJ Platform: `./gradlew :integrations:intellij-platform:publishToMavenLocal`
43+
44+
Alternatively, just run `./gradlew publishToMavenLocal` from the repository root to publish all modules.
45+
46+
5. In a Kotlin Notebook, load your local snapshot using the absolute path to your JSON file
47+
(instead of a `%use <integration>` alias):
48+
49+
```
50+
%use /absolute/path/to/Local.json
51+
```
52+
53+
6. Reload the Kotlin Notebook Kernel if needed.
54+
55+
To publish a newer snapshot, repeat steps 2–6. Bumping the version is required to invalidate the dependency cache.
56+
57+
## Important: the "dependencies" field in JSON
58+
59+
In the `dependencies` array, list exactly the artifacts you want to load in the notebook — no more, no less.
60+
There is no implicit or “magical” expansion.
61+
62+
Examples:
63+
64+
```json
65+
{
66+
"dependencies": [
67+
"org.jetbrains.kotlinx:kotlin-jupyter-database:$v"
68+
]
69+
}
70+
```
71+
72+
```json
73+
{
74+
"dependencies": [
75+
"org.jetbrains.kotlinx:kotlin-jupyter-serialization:$v",
76+
"org.jetbrains.kotlinx:kotlin-jupyter-ktor-client:$v"
77+
]
78+
}
79+
```

README.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,24 @@
1-
TODO: Implement README content with redirect to subprojects
1+
[![JetBrains official project](https://jb.gg/badges/official.svg)](https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub)
2+
[![Kotlin experimental stability](https://img.shields.io/badge/project-experimental-kotlin.svg?colorA=555555&colorB=AC29EC&label=&logo=kotlin&logoColor=ffffff&logoWidth=10)](https://kotlinlang.org/docs/components-stability.html)
3+
![GitHub](https://img.shields.io/github/license/Kotlin/kotlin-notebook-integrations?color=blue&label=License)
4+
5+
# Kotlin Notebook Integrations
6+
7+
This monorepo contains official JetBrains integrations for Kotlin Notebooks.
8+
Each integration lives in the `integrations/` directory and has its own README and Contributing guide.
9+
10+
## Integrations
11+
12+
- [IntelliJ Platform](integrations/intellij-platform/README.md) — interactive access to IntelliJ Platform APIs from a running IDE process.
13+
- [HTTP Utilities](integrations/http-util/README.md) — JSON/serialization helpers and Ktor HTTP client wrappers for notebooks.
14+
- [Database](integrations/database/README.md) — helpers for configuring JDBC DataSources and working with common DBs.
15+
16+
Tip: If you are looking for a specific integration, jump straight into the corresponding folder above.
17+
18+
## Contributing
19+
20+
See [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to contribute to this project.
21+
22+
## License
23+
24+
This project is licensed under the Apache License, Version 2.0. See LICENSE for details.

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ kotlinPublications {
4444
sonatypeSettings(
4545
sonatypeUsername,
4646
sonatypePassword,
47-
"kotlin-notebook-libraries project, v. ${project.version}",
47+
"kotlin-notebook-integrations project, v. ${project.version}",
4848
)
4949

5050
signingCredentials(

integrations/database/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ subprojects {
2626

2727
kotlinPublications {
2828
pom {
29-
githubRepo("Kotlin", "kotlin-notebook-libraries")
29+
githubRepo("Kotlin", "kotlin-notebook-integrations")
3030
inceptionYear.set("2025")
3131
licenses {
3232
apache2()

integrations/http-util/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ plugins {
77

88
kotlinPublications {
99
pom {
10-
githubRepo("Kotlin", "kotlin-notebook-libraries")
10+
githubRepo("Kotlin", "kotlin-notebook-integrations")
1111
inceptionYear = "2024"
1212
licenses {
1313
apache2()

integrations/intellij-platform/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ kotlin {
6060

6161
kotlinPublications {
6262
pom {
63-
githubRepo("Kotlin", "kotlin-notebook-libraries")
63+
githubRepo("Kotlin", "kotlin-notebook-integrations")
6464

6565
inceptionYear.set("2024")
6666
licenses {

settings.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
rootProject.name = "kotlin-notebook-libraries"
1+
rootProject.name = "kotlin-notebook-integrations"
22

33
plugins {
44
id("org.gradle.toolchains.foojay-resolver-convention") version "1.0.0"

0 commit comments

Comments
 (0)