intellij-platform-gradle-plugin
intellij-platform-gradle-plugin copied to clipboard
`InstrumentCode` always resolves java-compiler-ant-tasks
What happened?
If the compiler version is not specified, the plugin tries to resolve it every time we run ./gradlew instrumentCode.
Resolving the ant task version forces a few network calls even if the task is up-to-date:
> Task :instrumentCode UP-TO-DATE
[gradle-intellij-plugin :instrumentCode] Resolved non-EAP java-compiler-ant-tasks version: 231.9225.16
Relevant log output or stack trace
No response
Steps to reproduce
Using the build.gradle.kts below:
import org.jetbrains.intellij.tasks.InstrumentCodeTask
plugins {
id("org.jetbrains.intellij") version "1.15.0"
}
group = "com.example"
version = "1.0-SNAPSHOT"
repositories {
mavenCentral()
}
intellij {
type.set("AI")
version.set("2023.1.1.16")
}
tasks.withType<InstrumentCodeTask> {
// Uncomment this to enable caching
// compilerVersion.set("231.9225.16")
}
- Run
./gradlew buildPlugin - Run
./gradlew buildPlugina second time. You should see thatinstrumentCodedoesn't return instantly even though it's up to date. - Uncomment this line:
// compilerVersion.set("231.9225.16") - Run
./gradlew buildPlugin - Run
./gradlew buildPluginagain. Should return almost instantly ( no network call )
Gradle IntelliJ Plugin version
1.15
Gradle version
8.1.1
Operating System
macOS
Link to build, i.e. failing GitHub Action job
No response