Currently I'm unable to install plugin from the external Kotlin Script.
Expected Behavior
As project developer I can:
Extract all common project parts to the separate scripts. For example it is better to extract plugin applying (e.g. java + kotlin) and plugin configuring (e.g. byte code version) to the separate script.
Then include this script by line apply(file="common-java.gradle.kts")
As a result: target project is able to use plugin, which was applied in the included file. For example: you can add line compile(group="org.jetbrains.kotlinx", name="kotlinx-coroutines-core", version="1.1.1").
Current Behavior
As project developer I can:
Extract all common project parts to the separate scripts. For example it is better to extract plugin applying (e.g. java + kotlin) and plugin configuring (e.g. byte code version) to the separate script.
Then include this script by line apply(file="common-java.gradle.kts")
However I could not use plugin (which is mentioned in the included file only), because the following construction is not correct (e.g. method was not found): compile(group="org.jetbrains.kotlinx", name="kotlinx-coroutines-core", version="1.1.1").
Context
I'd like to achieve:
Extract project configuration to the include file (or to the analogue)
Then in the target project I can include only part of files. For example:
Add something like apply(file="common-java.gradle.kts") just to have project with Java support, however without artifact publication abilities.
Add something like apply(file="common-server-java.gradle.kts") to have project with Java support, however this project will be published to somewhere.
** Include nothing: for totaly custom projects. As an example: it can be JS project (e.g. just kotlin wrappers upper to node plugin).
Currently I'm unable to install plugin from the external Kotlin Script.
Expected Behavior
As project developer I can:
apply(file="common-java.gradle.kts")
compile(group="org.jetbrains.kotlinx", name="kotlinx-coroutines-core", version="1.1.1")
.Current Behavior
As project developer I can:
apply(file="common-java.gradle.kts")
However I could not use plugin (which is mentioned in the included file only), because the following construction is not correct (e.g. method was not found):
compile(group="org.jetbrains.kotlinx", name="kotlinx-coroutines-core", version="1.1.1")
.Context
I'd like to achieve:
apply(file="common-java.gradle.kts")
just to have project with Java support, however without artifact publication abilities. Add something likeapply(file="common-server-java.gradle.kts")
to have project with Java support, however this project will be published to somewhere. ** Include nothing: for totaly custom projects. As an example: it can be JS project (e.g. just kotlin wrappers upper to node plugin).Steps to Reproduce (for bugs)
n/a (feature request)
Your Environment
n/a