@@ -68,20 +68,38 @@ plugins {
68
68
}
69
69
```
70
70
71
- This plugin adds dependencies to api and annotations ("scanner") artifacts to your project. You may turn off
72
- the auto-including of these artifacts by specifying following Gradle properties:
73
- - ` kotlin.jupyter.add.api ` to ` false ` .
74
- - ` kotlin.jupyter.add.scanner ` to ` false ` .
71
+ This plugin adds following dependencies to your project:
72
+
73
+ | Artifact | Gradle option to exclude/include | Enabled by default | Dependency scope | Method for adding dependency manually |
74
+ | :------------------------------- | :------------------------------- | :----------------- | :------------------- | :--------------------------------------- |
75
+ | ` kotlin-jupyter-api ` | ` kotlin.jupyter.add.api ` | yes | ` compileOnly ` | ` addApiDependency(version: String?) ` |
76
+ | ` kotlin-jupyter-api-annotations ` | ` kotlin.jupyter.add.scanner ` | no | ` implementation ` | ` addScannerDependency(version: String?) ` |
77
+ | ` kotlin-jupyter-test-kit ` | ` kotlin.jupyter.add.testkit ` | yes | ` testImplementation ` | ` addTestKitDependency(version: String?) ` |
78
+
79
+ You may turn on / turn off the dependency with its default version (version of the plugin)
80
+ by setting corresponding Gradle option to ` true ` or ` false ` .
81
+ If the corresponding option is set to ` false ` (by default or in your setup), you still
82
+ can add it manually using the method from the table inside ` kotlinJupyter ` extension like that:
75
83
76
- Add these dependencies manually using ` kotlinJupyter ` extension:
77
84
``` groovy
78
85
kotlinJupyter {
79
- addApiDependency("<version>")
80
- addScannerDependency("<version>")
86
+ addApiDependency() // Use default version
87
+ addApiDependency("0.10.0.1") // Use custom artifact version
81
88
}
82
89
```
83
90
84
- Finally, implement ` org.jetbrains.kotlinx.jupyter.api.libraries.LibraryDefinitionProducer ` or
91
+ ### Adding library integration using annotation processor
92
+
93
+ If you don't have problems with kapt (i.e. you use JDK version under 16), you can use annotations to
94
+ mark integration classes.
95
+
96
+ First, enable ` kotlin-jupyter-api-annotations ` dependency by adding following line to your ` gradle.properties ` :
97
+
98
+ ```
99
+ kotlin.jupyter.add.scanner = true
100
+ ```
101
+
102
+ Then, implement ` org.jetbrains.kotlinx.jupyter.api.libraries.LibraryDefinitionProducer ` or
85
103
` org.jetbrains.kotlinx.jupyter.api.libraries.LibraryDefinition ` and mark implementation with
86
104
` JupyterLibrary ` annotation:
87
105
@@ -109,8 +127,9 @@ For a further information see docs for:
109
127
- ` org.jetbrains.kotlinx.jupyter.api.libraries.LibraryDefinitionProducer `
110
128
- ` org.jetbrains.kotlinx.jupyter.api.libraries.LibraryDefinition `
111
129
112
- ### Avoiding using annotation processor
130
+ ### Adding library integration avoiding use of annotation processor
113
131
You may want not to use annotation processing for implementations detection.
132
+ The reason may be, for example, the problems with kapt.
114
133
Then you may refer your implementations right in your buildscript. Note that
115
134
no checking for existence will be performed in this case.
116
135
0 commit comments