-
Notifications
You must be signed in to change notification settings - Fork 4.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make types from classpath contributed by init scripts available to Kotlin build scripts #9284
Comments
When importing a project in intellij when I apply the build scan plugin from an init script like this: initscript {
repositories {
maven {
url "https://plugins.gradle.org/m2"
}
}
dependencies {
classpath "com.gradle:build-scan-plugin:1.8"
}
}
rootProject { prj ->
apply plugin: initscript.classLoader.loadClass("com.gradle.scan.plugin.BuildScanPlugin")
buildScan {
publishAlways()
}
} I get the following error in IDEA:
I would expect this to work or at least give me a better error message what I should do. |
Blocked by gradle/kotlin-dsl-samples#416. |
Just to explain the behaviour reported here, the latest release provides extension accessors by default. This requires the types of all extensions to be visible in the build script classpath but currently This behaviour can be disabled via a Gradle project property:
|
I'm using the following
Importing official Kotlin DSL samples to IDEA results in the following error:
|
@pioterj, I get the same error with a Groovy based build script so there's something else going on here. |
The following project reproduces the issue with a Groovy build script on the latest 4.1 nightly: |
~./gradle/init.d
scripts are executed and changes to the buildscript classpath are taken into account
This issue has been automatically marked as stale because it has not had recent activity. Given the limited bandwidth of the team, it will be automatically closed if no further activity occurs. If you're interested in how we try to keep the backlog in a healthy state, please read our blog post on how we refine our backlog. If you feel this is something you could contribute, please have a look at our Contributor Guide. Thank you for your contribution. |
This issue has been automatically closed due to inactivity. If you can reproduce this on a recent version of Gradle or if you have a good use case for this feature, please feel free to reopen the issue with steps to reproduce, a quick explanation of your use case or a high-quality pull request. |
For instance:
The text was updated successfully, but these errors were encountered: