Skip to content

Commit

Permalink
Fixed typos in kotlin-plugins.md, & a link in CONTRIBUTING
Browse files Browse the repository at this point in the history
Fixed some typos ./docs/plugin-development/kotlin-plugins.md, and a link to
mkdocs.yml in CONTRIBUTING.md
  • Loading branch information
anurag-verma-india committed Oct 31, 2024
1 parent f9de6bf commit d967c03
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ A few tips:

- All the pages on this site are written in Markdown.
- If needed, we have various tools available, such as code templates and macros, and we can add more MkDocs plugins if necessary.
- The Table of Contents is currently located in [mkdocs.yml](../mkdocs.yml).
- The Table of Contents is currently located in [mkdocs.yml](https://github.com/gradle/cookbook/blob/main/mkdocs.yml).
When adding new pages, please update the ToC to ensure they are discoverable.

### Adding New Categories
Expand Down
8 changes: 4 additions & 4 deletions docs/plugin-development/kotlin-plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ In general Groovy does not know anything about Kotlin. Avoid Kotlin-only feature
- receivers
- etc...

These features may be used in extra functionality for Kotlin callers but it is important that all the base functionality of your plugin does not require them.
These features may be used in extra functionality for Kotlin callers, but it is important that all the base functionality of your plugin does not require them.

### Closures

Expand Down Expand Up @@ -143,18 +143,18 @@ If you are used to writing `build.gradle.kts` files, you may use the `kotlin-dsl

The `kotlin-dls` plugin:
* applies `"java-gradle-plugin"`.
* applies `kotlin-embedded` to use the same Kotlin embeeded version as your Gradle distribution.
* applies `kotlin-embedded` to use the same Kotlin embedded version as your Gradle distribution.
* applies the ``kotlin-dsl-precompiled-script-plugins`` allowing to use `build.gradle.kts` files.
* adds `gradleKotlinDsl()` to the `compileOnly` configuration.
* configures the `sam-with-receiver` Kotlin compiler plugin to transform `it.` usages into `this.`.
* configures the `kotlin-assignment` Kotlin compiler plugin to allow setting `Property` with the `=` operator.
* sets Kotlin `apiVersion` and `languageVersion` according to Gradle [compatibility [atrix](https://docs.gradle.org/current/userguide/compatibility.html#kotlin).
* sets Kotlin `apiVersion` and `languageVersion` according to Gradle [compatibility matrix](https://docs.gradle.org/current/userguide/compatibility.html#kotlin).
* adds the `-Xsam-conversions=class` compiler option.
* adds others compiler options for compatibility:
** `-java-parameters` to support https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Parameter.html[Java 8 Parameter] class and getting method parameters through reflection
** `-Xjvm-default=all` to add link:https://kotlinlang.org/docs/java-to-kotlin-interop.html#default-methods-in-interfaces[Default methods in interfaces]
** `-Xjsr305=strict` for https://kotlinlang.org/docs/java-interop.html#compiler-configuration[increased null safety]

This is a significant departure from the baseline Kotlin configuration so be aware of the tradeoffs when using `kotlin-dsl`.
This is a significant departure from the baseline Kotlin configuration so be aware of the trade-offs when using `kotlin-dsl`.

Also, `kotlin-dsl` targets the Kotlin embedded version of your current distribution. If you want to be compatible with lower versions of Gradle, using the `com.jetbrains.kotlin.jvm` plugin provides more flexibility.

0 comments on commit d967c03

Please sign in to comment.