Skip to content
This repository has been archived by the owner on Aug 19, 2020. It is now read-only.

Compilation classpath of applied script does not include classpath of enclosing script #150

Closed
bamboo opened this issue Oct 7, 2016 · 3 comments

Comments

@bamboo
Copy link
Member

bamboo commented Oct 7, 2016

When a Kotlin build script is applied from a main Groovy build script, its compilation classpath won't include the classpath of the main script thus the following will fail to compile even when the main buildscript classpath includes kotlin-gradle-plugin:

tasks.withType<KotlinCompile> {
    kotlinOptions.noOptimize = false
}
@oehme
Copy link

oehme commented Oct 29, 2016

This is intentional. A script plugin cannot include the classpath of the project it is being applied to. Script plugins must be self-contained, as they can be applied to any number of projects.

@oehme
Copy link

oehme commented Oct 29, 2016

In fact, the opposite relationship will be true in the future: The project should see what the script plugin provides. This is part of the stable plugin DSL project.

@bamboo
Copy link
Member Author

bamboo commented Nov 18, 2016

Superseded by #180.

@bamboo bamboo closed this as completed Nov 18, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants