Giuseppe Barbieri
02/06/2025, 3:57 PMbuildSrc
with precompiled script plugins in Groovy.
May I add alongside a precompiled script plugin in Kotlin?
trying to add id 'org.gradle.kotlin.kotlin-dsl'
to the buildSrc/build.gradle
, but I do get:
> Plugin [id: 'org.gradle.kotlin.kotlin-dsl'] was not found in any of the following sources:Vampire
02/06/2025, 4:36 PMid 'kotlin-dsl'
I guessVampire
02/06/2025, 4:36 PMGiuseppe Barbieri
02/06/2025, 4:40 PMPlugin [id: 'kotlin-dsl'] was not found in any of the following sources:
Vampire
02/06/2025, 4:41 PMbuildSrc
build script Kotlin DSL?Giuseppe Barbieri
02/06/2025, 4:43 PMGiuseppe Barbieri
02/06/2025, 4:44 PMJendrik Johannes
02/06/2025, 7:22 PMbuildSrc
you need a build.gradle.kts
Everything else can be mixed as far as I know.Vampire
02/06/2025, 9:40 PMimport static org.gradle.kotlin.dsl.support.KotlinDslPluginsKt.expectedKotlinDslPluginsVersion
plugins {
id("org.gradle.kotlin.kotlin-dsl") version "$expectedKotlinDslPluginsVersion"
}
Vampire
02/06/2025, 9:42 PMJendrik Johannes
02/07/2025, 7:50 AMRahul Karyakarte
02/27/2025, 10:22 PMplugins {
`kotlin-dsl`
id("org.jetbrains.kotlin.jvm") version "1.8.20" apply false
id("org.jetbrains.kotlin.plugin.spring") version "1.8.20" apply false
id ("org.jetbrains.kotlin.plugin.serialization") version "1.8.20"
}
but i still get plugin not found build errorVampire
02/28/2025, 2:22 AMRahul Karyakarte
02/28/2025, 6:05 PMVampire
02/28/2025, 11:55 PMVampire
02/28/2025, 11:58 PM--refresh-dependencies
with your build command to recover.
If that was not it, then the most usual other cause is, that something between you and that server is intervening, breaking it.
For example a Firewall or AntiVirus intervening and breaking the download.
Or you need to use a proxy to access the outworld, but did not configure Gradle to use it.
You can try to add besides --refresh-dependencies
additionally --info
or if not enough --debug
to maybe get some more information what exactly happens while trying to download that plugin.Rahul Karyakarte
03/03/2025, 7:39 PM